2816
Move all bounds checks for types and recipes to one place.
This commit is contained in:
parent
7cca03bd11
commit
d3902ff0be
2
010vm.cc
2
010vm.cc
|
@ -203,7 +203,7 @@ assert(MAX_PRIMITIVE_RECIPES < 200); // level 0 is primitives; until 199
|
|||
Next_recipe_ordinal = 200;
|
||||
put(Recipe_ordinal, "main", Next_recipe_ordinal++);
|
||||
// End Load Recipes
|
||||
:(before "End Test Run Initialization")
|
||||
:(before "End Commandline Parsing")
|
||||
assert(Next_recipe_ordinal < 1000); // recipes being tested didn't overflow into test space
|
||||
:(before "End Setup")
|
||||
Next_recipe_ordinal = 1000; // consistent new numbers for each test
|
||||
|
|
|
@ -156,7 +156,6 @@ if (argc > 1) {
|
|||
argc--;
|
||||
}
|
||||
if (Run_tests) Recipe.erase(get(Recipe_ordinal, "main"));
|
||||
// End Loading .mu Files
|
||||
}
|
||||
transform_all();
|
||||
save_snapshots();
|
||||
|
|
|
@ -56,7 +56,7 @@ $error: 0
|
|||
:(before "End Globals")
|
||||
// We'll use large type ordinals to mean "the following type of the variable".
|
||||
const int START_TYPE_INGREDIENTS = 2000;
|
||||
:(before "End Test Run Initialization")
|
||||
:(before "End Commandline Parsing") // after loading .mu files
|
||||
assert(Next_type_ordinal < START_TYPE_INGREDIENTS);
|
||||
|
||||
:(before "End type_info Fields")
|
||||
|
|
Loading…
Reference in New Issue