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

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

Issue 2571813002: [wasm] TrapIf and TrapUnless TurboFan operators implemented on ia32. (Closed)
Patch Set: Rebase 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"
titzer 2016/12/15 14:21:08 I think it's best not to include the runtime heade
ahaas 2016/12/15 16:55:51 I moved the function to wasm-compiler.cc
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 static Runtime::FunctionId TrapReasonToFunctionId(TrapReason reason);
537 538
538 static byte MemSize(MachineType type) { 539 static byte MemSize(MachineType type) {
539 return 1 << ElementSizeLog2Of(type.representation()); 540 return 1 << ElementSizeLog2Of(type.representation());
540 } 541 }
541 542
542 static byte MemSize(LocalType type) { return 1 << ElementSizeLog2Of(type); } 543 static byte MemSize(LocalType type) { return 1 << ElementSizeLog2Of(type); }
543 544
544 static LocalTypeCode LocalTypeCodeFor(LocalType type) { 545 static LocalTypeCode LocalTypeCodeFor(LocalType type) {
545 switch (type) { 546 switch (type) {
546 case kAstI32: 547 case kAstI32:
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 default: 679 default:
679 return "<unknown>"; 680 return "<unknown>";
680 } 681 }
681 } 682 }
682 }; 683 };
683 } // namespace wasm 684 } // namespace wasm
684 } // namespace internal 685 } // namespace internal
685 } // namespace v8 686 } // namespace v8
686 687
687 #endif // V8_WASM_OPCODES_H_ 688 #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