(type, supertype_idx = kNoSuperType, is_final = true,
is_shared = false)
| 121 | this.functions = []; |
| 122 | } |
| 123 | addType(type, supertype_idx = kNoSuperType, is_final = true, |
| 124 | is_shared = false) { |
| 125 | var type_copy = {params: type.params, results: type.results, |
| 126 | is_final: is_final, is_shared: is_shared, |
| 127 | supertype: supertype_idx}; |
| 128 | this.types.push(type_copy); |
| 129 | return this.types.length - 1; |
| 130 | } |
| 131 | addStruct(fields = kNoSuperType = false, is_shared = false) { |
| 132 | this.types.push(new WasmStruct(fields)); |
| 133 | } |