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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 1741393002: [wasm] Rename ExprBoolNot to ExprI32Eqz. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | src/wasm/asm-wasm-builder.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 #include "src/compiler/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include "src/isolate-inl.h" 7 #include "src/isolate-inl.h"
8 8
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 10
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 op = UnsupportedOpcode(opcode); 701 op = UnsupportedOpcode(opcode);
702 } 702 }
703 return graph()->NewNode(op, left, right); 703 return graph()->NewNode(op, left, right);
704 } 704 }
705 705
706 706
707 Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input) { 707 Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input) {
708 const Operator* op; 708 const Operator* op;
709 MachineOperatorBuilder* m = jsgraph()->machine(); 709 MachineOperatorBuilder* m = jsgraph()->machine();
710 switch (opcode) { 710 switch (opcode) {
711 case wasm::kExprBoolNot: 711 case wasm::kExprI32Eqz:
712 op = m->Word32Equal(); 712 op = m->Word32Equal();
713 return graph()->NewNode(op, input, jsgraph()->Int32Constant(0)); 713 return graph()->NewNode(op, input, jsgraph()->Int32Constant(0));
714 case wasm::kExprF32Abs: 714 case wasm::kExprF32Abs:
715 op = m->Float32Abs(); 715 op = m->Float32Abs();
716 break; 716 break;
717 case wasm::kExprF32Neg: 717 case wasm::kExprF32Neg:
718 return BuildF32Neg(input); 718 return BuildF32Neg(input);
719 case wasm::kExprF32Sqrt: 719 case wasm::kExprF32Sqrt:
720 op = m->Float32Sqrt(); 720 op = m->Float32Sqrt();
721 break; 721 break;
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 break; 1689 break;
1690 default: 1690 default:
1691 UNREACHABLE(); 1691 UNREACHABLE();
1692 return nullptr; 1692 return nullptr;
1693 } 1693 }
1694 return num; 1694 return num;
1695 } 1695 }
1696 1696
1697 1697
1698 Node* WasmGraphBuilder::Invert(Node* node) { 1698 Node* WasmGraphBuilder::Invert(Node* node) {
1699 return Unop(wasm::kExprBoolNot, node); 1699 return Unop(wasm::kExprI32Eqz, node);
1700 } 1700 }
1701 1701
1702 1702
1703 void WasmGraphBuilder::BuildJSToWasmWrapper(Handle<Code> wasm_code, 1703 void WasmGraphBuilder::BuildJSToWasmWrapper(Handle<Code> wasm_code,
1704 wasm::FunctionSig* sig) { 1704 wasm::FunctionSig* sig) {
1705 int params = static_cast<int>(sig->parameter_count()); 1705 int params = static_cast<int>(sig->parameter_count());
1706 int count = params + 3; 1706 int count = params + 3;
1707 Node** args = Buffer(count); 1707 Node** args = Buffer(count);
1708 1708
1709 // Build the start and the JS parameter nodes. 1709 // Build the start and the JS parameter nodes.
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2263 module_env->module->GetName(function.name_offset)); 2263 module_env->module->GetName(function.name_offset));
2264 } 2264 }
2265 2265
2266 return code; 2266 return code;
2267 } 2267 }
2268 2268
2269 2269
2270 } // namespace compiler 2270 } // namespace compiler
2271 } // namespace internal 2271 } // namespace internal
2272 } // namespace v8 2272 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/wasm/asm-wasm-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698