Chromium Code Reviews| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 struct WasmName { | 52 struct WasmName { |
| 53 const char* name; | 53 const char* name; |
| 54 uint32_t length; | 54 uint32_t length; |
| 55 // TODO(clemensh): Remove whole WasmName, replace by Vector<const char> | |
| 56 inline Vector<const char> toVec() const { | |
|
titzer
2016/04/26 12:45:57
We don't need this little helper function. Either
Clemens Hammacher
2016/04/26 12:58:52
Sorry, forgot to mention that. The TODO will be ha
| |
| 57 return Vector<const char>(name, length); | |
| 58 } | |
| 55 }; | 59 }; |
| 56 | 60 |
| 57 // TODO(titzer): Renumber all the opcodes to fill in holes. | 61 // TODO(titzer): Renumber all the opcodes to fill in holes. |
| 58 | 62 |
| 59 // Control expressions and blocks. | 63 // Control expressions and blocks. |
| 60 #define FOREACH_CONTROL_OPCODE(V) \ | 64 #define FOREACH_CONTROL_OPCODE(V) \ |
| 61 V(Nop, 0x00, _) \ | 65 V(Nop, 0x00, _) \ |
| 62 V(Block, 0x01, _) \ | 66 V(Block, 0x01, _) \ |
| 63 V(Loop, 0x02, _) \ | 67 V(Loop, 0x02, _) \ |
| 64 V(If, 0x03, _) \ | 68 V(If, 0x03, _) \ |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 515 default: | 519 default: |
| 516 return "<unknown>"; | 520 return "<unknown>"; |
| 517 } | 521 } |
| 518 } | 522 } |
| 519 }; | 523 }; |
| 520 } // namespace wasm | 524 } // namespace wasm |
| 521 } // namespace internal | 525 } // namespace internal |
| 522 } // namespace v8 | 526 } // namespace v8 |
| 523 | 527 |
| 524 #endif // V8_WASM_OPCODES_H_ | 528 #endif // V8_WASM_OPCODES_H_ |
| OLD | NEW |