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_OPCODES_H_ | 5 #ifndef V8_WASM_OPCODES_H_ |
6 #define V8_WASM_OPCODES_H_ | 6 #define V8_WASM_OPCODES_H_ |
7 | 7 |
8 #include "src/machine-type.h" | 8 #include "src/machine-type.h" |
9 #include "src/signature.h" | 9 #include "src/signature.h" |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 const LocalType kAstF32 = MachineRepresentation::kFloat32; | 44 const LocalType kAstF32 = MachineRepresentation::kFloat32; |
45 const LocalType kAstF64 = MachineRepresentation::kFloat64; | 45 const LocalType kAstF64 = MachineRepresentation::kFloat64; |
46 // We use kTagged here because kNone is already used by kAstStmt. | 46 // We use kTagged here because kNone is already used by kAstStmt. |
47 const LocalType kAstEnd = MachineRepresentation::kTagged; | 47 const LocalType kAstEnd = MachineRepresentation::kTagged; |
48 | 48 |
49 typedef Signature<LocalType> FunctionSig; | 49 typedef Signature<LocalType> FunctionSig; |
50 std::ostream& operator<<(std::ostream& os, const FunctionSig& function); | 50 std::ostream& operator<<(std::ostream& os, const FunctionSig& function); |
51 | 51 |
52 typedef Vector<const char> WasmName; | 52 typedef Vector<const char> WasmName; |
53 | 53 |
| 54 typedef int WasmCodePosition; |
| 55 const WasmCodePosition kNoCodePosition = -1; |
| 56 |
54 // Control expressions and blocks. | 57 // Control expressions and blocks. |
55 #define FOREACH_CONTROL_OPCODE(V) \ | 58 #define FOREACH_CONTROL_OPCODE(V) \ |
56 V(Nop, 0x00, _) \ | 59 V(Nop, 0x00, _) \ |
57 V(Block, 0x01, _) \ | 60 V(Block, 0x01, _) \ |
58 V(Loop, 0x02, _) \ | 61 V(Loop, 0x02, _) \ |
59 V(If, 0x03, _) \ | 62 V(If, 0x03, _) \ |
60 V(Else, 0x04, _) \ | 63 V(Else, 0x04, _) \ |
61 V(Select, 0x05, _) \ | 64 V(Select, 0x05, _) \ |
62 V(Br, 0x06, _) \ | 65 V(Br, 0x06, _) \ |
63 V(BrIf, 0x07, _) \ | 66 V(BrIf, 0x07, _) \ |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 default: | 514 default: |
512 return "<unknown>"; | 515 return "<unknown>"; |
513 } | 516 } |
514 } | 517 } |
515 }; | 518 }; |
516 } // namespace wasm | 519 } // namespace wasm |
517 } // namespace internal | 520 } // namespace internal |
518 } // namespace v8 | 521 } // namespace v8 |
519 | 522 |
520 #endif // V8_WASM_OPCODES_H_ | 523 #endif // V8_WASM_OPCODES_H_ |
OLD | NEW |