Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/wasm/wasm-opcodes.h

Issue 2049513003: [wasm] Support undefined indirect table entries, behind a flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [wasm] Patching in the change to have only one runtime check, instead of two. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 461
462 enum WasmOpcode { 462 enum WasmOpcode {
463 // Declare expression opcodes. 463 // Declare expression opcodes.
464 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode, 464 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode,
465 FOREACH_OPCODE(DECLARE_NAMED_ENUM) 465 FOREACH_OPCODE(DECLARE_NAMED_ENUM)
466 #undef DECLARE_NAMED_ENUM 466 #undef DECLARE_NAMED_ENUM
467 }; 467 };
468 468
469 // The reason for a trap. 469 // The reason for a trap.
470 #define FOREACH_WASM_TRAPREASON(V) \ 470 #define FOREACH_WASM_TRAPREASON(V) \
471 V(TrapUnreachable) \ 471 V(TrapUnreachable) \
472 V(TrapMemOutOfBounds) \ 472 V(TrapMemOutOfBounds) \
473 V(TrapDivByZero) \ 473 V(TrapDivByZero) \
474 V(TrapDivUnrepresentable) \ 474 V(TrapDivUnrepresentable) \
475 V(TrapRemByZero) \ 475 V(TrapRemByZero) \
476 V(TrapFloatUnrepresentable) \ 476 V(TrapFloatUnrepresentable) \
477 V(TrapFuncInvalid) \ 477 V(TrapFuncInvalid) \
478 V(TrapFuncSigMismatch) 478 V(TrapFuncSigMismatch)
479 479
480 enum TrapReason { 480 enum TrapReason {
481 #define DECLARE_ENUM(name) k##name, 481 #define DECLARE_ENUM(name) k##name,
482 FOREACH_WASM_TRAPREASON(DECLARE_ENUM) 482 FOREACH_WASM_TRAPREASON(DECLARE_ENUM)
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.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 default: 664 default:
665 return "<unknown>"; 665 return "<unknown>";
666 } 666 }
667 } 667 }
668 }; 668 };
669 } // namespace wasm 669 } // namespace wasm
670 } // namespace internal 670 } // namespace internal
671 } // namespace v8 671 } // namespace v8
672 672
673 #endif // V8_WASM_OPCODES_H_ 673 #endif // V8_WASM_OPCODES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698