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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 kTrapCount | 483 kTrapCount |
484 #undef DECLARE_ENUM | 484 #undef DECLARE_ENUM |
485 }; | 485 }; |
486 | 486 |
487 // A collection of opcode-related static methods. | 487 // A collection of opcode-related static methods. |
488 class WasmOpcodes { | 488 class WasmOpcodes { |
489 public: | 489 public: |
490 static const char* OpcodeName(WasmOpcode opcode); | 490 static const char* OpcodeName(WasmOpcode opcode); |
491 static const char* ShortOpcodeName(WasmOpcode opcode); | 491 static const char* ShortOpcodeName(WasmOpcode opcode); |
492 static FunctionSig* Signature(WasmOpcode opcode); | 492 static FunctionSig* Signature(WasmOpcode opcode); |
| 493 static FunctionSig* AsmjsSignature(WasmOpcode opcode); |
493 static bool IsPrefixOpcode(WasmOpcode opcode); | 494 static bool IsPrefixOpcode(WasmOpcode opcode); |
494 | 495 |
495 static int TrapReasonToMessageId(TrapReason reason); | 496 static int TrapReasonToMessageId(TrapReason reason); |
496 static const char* TrapReasonMessage(TrapReason reason); | 497 static const char* TrapReasonMessage(TrapReason reason); |
497 | 498 |
498 static byte MemSize(MachineType type) { | 499 static byte MemSize(MachineType type) { |
499 return 1 << ElementSizeLog2Of(type.representation()); | 500 return 1 << ElementSizeLog2Of(type.representation()); |
500 } | 501 } |
501 | 502 |
502 static LocalTypeCode LocalTypeCodeFor(LocalType type) { | 503 static LocalTypeCode LocalTypeCodeFor(LocalType type) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 default: | 637 default: |
637 return "<unknown>"; | 638 return "<unknown>"; |
638 } | 639 } |
639 } | 640 } |
640 }; | 641 }; |
641 } // namespace wasm | 642 } // namespace wasm |
642 } // namespace internal | 643 } // namespace internal |
643 } // namespace v8 | 644 } // namespace v8 |
644 | 645 |
645 #endif // V8_WASM_OPCODES_H_ | 646 #endif // V8_WASM_OPCODES_H_ |
OLD | NEW |