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

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

Issue 2571813002: [wasm] TrapIf and TrapUnless TurboFan operators implemented on ia32. (Closed)
Patch Set: Move TrapReasonToFunctionId from wasm-opcodes to wasm-compiler Created 4 years 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
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/globals.h" 8 #include "src/globals.h"
9 #include "src/machine-type.h" 9 #include "src/machine-type.h"
10 #include "src/runtime/runtime.h"
10 #include "src/signature.h" 11 #include "src/signature.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 namespace wasm { 15 namespace wasm {
15 16
16 // Binary encoding of local types. 17 // Binary encoding of local types.
17 enum LocalTypeCode { 18 enum LocalTypeCode {
18 kLocalVoid = 0x40, 19 kLocalVoid = 0x40,
19 kLocalI32 = 0x7f, 20 kLocalI32 = 0x7f,
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 public: 527 public:
527 static const char* OpcodeName(WasmOpcode opcode); 528 static const char* OpcodeName(WasmOpcode opcode);
528 static const char* ShortOpcodeName(WasmOpcode opcode); 529 static const char* ShortOpcodeName(WasmOpcode opcode);
529 static FunctionSig* Signature(WasmOpcode opcode); 530 static FunctionSig* Signature(WasmOpcode opcode);
530 static FunctionSig* AsmjsSignature(WasmOpcode opcode); 531 static FunctionSig* AsmjsSignature(WasmOpcode opcode);
531 static FunctionSig* AtomicSignature(WasmOpcode opcode); 532 static FunctionSig* AtomicSignature(WasmOpcode opcode);
532 static bool IsPrefixOpcode(WasmOpcode opcode); 533 static bool IsPrefixOpcode(WasmOpcode opcode);
533 534
534 static int TrapReasonToMessageId(TrapReason reason); 535 static int TrapReasonToMessageId(TrapReason reason);
535 static const char* TrapReasonMessage(TrapReason reason); 536 static const char* TrapReasonMessage(TrapReason reason);
536 static int32_t TrapReasonToFunctionId(TrapReason reason);
537 537
538 static byte MemSize(MachineType type) { 538 static byte MemSize(MachineType type) {
539 return 1 << ElementSizeLog2Of(type.representation()); 539 return 1 << ElementSizeLog2Of(type.representation());
540 } 540 }
541 541
542 static byte MemSize(LocalType type) { return 1 << ElementSizeLog2Of(type); } 542 static byte MemSize(LocalType type) { return 1 << ElementSizeLog2Of(type); }
543 543
544 static LocalTypeCode LocalTypeCodeFor(LocalType type) { 544 static LocalTypeCode LocalTypeCodeFor(LocalType type) {
545 switch (type) { 545 switch (type) {
546 case kAstI32: 546 case kAstI32:
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 default: 678 default:
679 return "<unknown>"; 679 return "<unknown>";
680 } 680 }
681 } 681 }
682 }; 682 };
683 } // namespace wasm 683 } // namespace wasm
684 } // namespace internal 684 } // namespace internal
685 } // namespace v8 685 } // namespace v8
686 686
687 #endif // V8_WASM_OPCODES_H_ 687 #endif // V8_WASM_OPCODES_H_
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698