OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_WASM_AST_DECODER_H_ | 5 #ifndef V8_WASM_AST_DECODER_H_ |
6 #define V8_WASM_AST_DECODER_H_ | 6 #define V8_WASM_AST_DECODER_H_ |
7 | 7 |
8 #include "src/signature.h" | 8 #include "src/signature.h" |
9 #include "src/wasm/decoder.h" | 9 #include "src/wasm/decoder.h" |
10 #include "src/wasm/wasm-opcodes.h" | 10 #include "src/wasm/wasm-opcodes.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 unsigned length; | 72 unsigned length; |
73 inline ImmF64Operand(Decoder* decoder, const byte* pc) { | 73 inline ImmF64Operand(Decoder* decoder, const byte* pc) { |
74 value = bit_cast<double>(decoder->checked_read_u64(pc, 1, "immf64")); | 74 value = bit_cast<double>(decoder->checked_read_u64(pc, 1, "immf64")); |
75 length = 8; | 75 length = 8; |
76 } | 76 } |
77 }; | 77 }; |
78 | 78 |
79 struct GlobalIndexOperand { | 79 struct GlobalIndexOperand { |
80 uint32_t index; | 80 uint32_t index; |
81 LocalType type; | 81 LocalType type; |
82 MachineType machine_type; | |
83 unsigned length; | 82 unsigned length; |
84 | 83 |
85 inline GlobalIndexOperand(Decoder* decoder, const byte* pc) { | 84 inline GlobalIndexOperand(Decoder* decoder, const byte* pc) { |
86 index = decoder->checked_read_u32v(pc, 1, &length, "global index"); | 85 index = decoder->checked_read_u32v(pc, 1, &length, "global index"); |
87 type = kAstStmt; | 86 type = kAstStmt; |
88 machine_type = MachineType::None(); | |
89 } | 87 } |
90 }; | 88 }; |
91 | 89 |
92 struct Control; | 90 struct Control; |
93 struct BreakDepthOperand { | 91 struct BreakDepthOperand { |
94 uint32_t arity; | 92 uint32_t arity; |
95 uint32_t depth; | 93 uint32_t depth; |
96 Control* target; | 94 Control* target; |
97 unsigned length; | 95 unsigned length; |
98 inline BreakDepthOperand(Decoder* decoder, const byte* pc) { | 96 inline BreakDepthOperand(Decoder* decoder, const byte* pc) { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 340 } |
343 | 341 |
344 bool has_next() { return pc_ < end_; } | 342 bool has_next() { return pc_ < end_; } |
345 }; | 343 }; |
346 | 344 |
347 } // namespace wasm | 345 } // namespace wasm |
348 } // namespace internal | 346 } // namespace internal |
349 } // namespace v8 | 347 } // namespace v8 |
350 | 348 |
351 #endif // V8_WASM_AST_DECODER_H_ | 349 #endif // V8_WASM_AST_DECODER_H_ |
OLD | NEW |