diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-06 14:15:37 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-06 14:21:36 -0800 |
commit | c157066cab02f91b2d5e53dbec09151936538578 (patch) | |
tree | 0125f6d42b84f470b79dc64b2b2c61364b2c2f0b /010vm.cc | |
parent | f3760b0f2828250b4b5fb1a52601fe6b11ff328f (diff) | |
download | mu-c157066cab02f91b2d5e53dbec09151936538578.tar.gz |
2380 - done loading mu code
New assertions still failing during tests. This whole implementation of generic recipes is like an extended spike. I don't have nearly enough tests. Ideally I'd have confidence in generics once layer 59 passed its tests.
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/010vm.cc b/010vm.cc index 31749999..b4ba23f1 100644 --- a/010vm.cc +++ b/010vm.cc @@ -273,12 +273,8 @@ type_tree* new_type_tree(const string_tree* properties) { type_tree* result = new type_tree(0); if (!properties->value.empty()) { const string& type_name = properties->value; - if (!contains_key(Type_ordinal, type_name) - // types can contain integers, like for array sizes - && !is_integer(type_name)) { - put(Type_ordinal, type_name, Next_type_ordinal++); - } - result->value = get(Type_ordinal, type_name); + if (contains_key(Type_ordinal, type_name)) + result->value = get(Type_ordinal, type_name); } result->left = new_type_tree(properties->left); result->right = new_type_tree(properties->right); @@ -412,11 +408,11 @@ void dump_types_tree(const type_tree* type, ostream& out) { out << ">"; } -void dump_type_name(recipe_ordinal type, ostream& out) { +void dump_type_name(type_ordinal type, ostream& out) { if (contains_key(Type, type)) out << get(Type, type).name; else - out << "?"; + out << "?" << type; } string instruction::to_string() const { |