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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 // The reason for a trap. | 467 // The reason for a trap. |
468 #define FOREACH_WASM_TRAPREASON(V) \ | 468 #define FOREACH_WASM_TRAPREASON(V) \ |
469 V(TrapUnreachable) \ | 469 V(TrapUnreachable) \ |
470 V(TrapMemOutOfBounds) \ | 470 V(TrapMemOutOfBounds) \ |
471 V(TrapDivByZero) \ | 471 V(TrapDivByZero) \ |
472 V(TrapDivUnrepresentable) \ | 472 V(TrapDivUnrepresentable) \ |
473 V(TrapRemByZero) \ | 473 V(TrapRemByZero) \ |
474 V(TrapFloatUnrepresentable) \ | 474 V(TrapFloatUnrepresentable) \ |
475 V(TrapFuncInvalid) \ | 475 V(TrapFuncInvalid) \ |
476 V(TrapFuncSigMismatch) \ | 476 V(TrapFuncSigMismatch) \ |
477 V(TrapInvalidIndex) | 477 V(TrapInvalidIndex) \ |
| 478 V(TrapStackOverflow) |
478 | 479 |
479 enum TrapReason { | 480 enum TrapReason { |
480 #define DECLARE_ENUM(name) k##name, | 481 #define DECLARE_ENUM(name) k##name, |
481 FOREACH_WASM_TRAPREASON(DECLARE_ENUM) | 482 FOREACH_WASM_TRAPREASON(DECLARE_ENUM) |
482 kTrapCount | 483 kTrapCount |
483 #undef DECLARE_ENUM | 484 #undef DECLARE_ENUM |
484 }; | 485 }; |
485 | 486 |
486 // A collection of opcode-related static methods. | 487 // A collection of opcode-related static methods. |
487 class WasmOpcodes { | 488 class WasmOpcodes { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 default: | 635 default: |
635 return "<unknown>"; | 636 return "<unknown>"; |
636 } | 637 } |
637 } | 638 } |
638 }; | 639 }; |
639 } // namespace wasm | 640 } // namespace wasm |
640 } // namespace internal | 641 } // namespace internal |
641 } // namespace v8 | 642 } // namespace v8 |
642 | 643 |
643 #endif // V8_WASM_OPCODES_H_ | 644 #endif // V8_WASM_OPCODES_H_ |
OLD | NEW |