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