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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1770333002: [wasm] Use MachineOperatorBuilder::word() instead of kPointerSize to determine the word size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use Is32 instead of word() == MachineRepresentation::kWord32 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 4daa7cba1eda77f15543f21047df9c76c57977f7..ab90efd4789cacd304823e3aacc4aeb8f85b52fb 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -862,28 +862,28 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input) {
// kExprI64Popcnt:
// kExprF32SConvertI64:
case wasm::kExprF32SConvertI64:
- if (kPointerSize == 4) {
+ if (m->Is32()) {
return BuildF32SConvertI64(input);
}
op = m->RoundInt64ToFloat32();
break;
// kExprF32UConvertI64:
case wasm::kExprF32UConvertI64:
- if (kPointerSize == 4) {
+ if (m->Is32()) {
return BuildF32UConvertI64(input);
}
op = m->RoundUint64ToFloat32();
break;
// kExprF64SConvertI64:
case wasm::kExprF64SConvertI64:
- if (kPointerSize == 4) {
+ if (m->Is32()) {
return BuildF64SConvertI64(input);
}
op = m->RoundInt64ToFloat64();
break;
// kExprF64UConvertI64:
case wasm::kExprF64UConvertI64:
- if (kPointerSize == 4) {
+ if (m->Is32()) {
return BuildF64UConvertI64(input);
}
op = m->RoundUint64ToFloat64();
@@ -2196,7 +2196,7 @@ Node* WasmGraphBuilder::String(const char* string) {
Graph* WasmGraphBuilder::graph() { return jsgraph()->graph(); }
void WasmGraphBuilder::Int64LoweringForTesting() {
- if (kPointerSize == 4) {
+ if (jsgraph()->machine()->Is32()) {
Int64Lowering r(jsgraph()->graph(), jsgraph()->machine(),
jsgraph()->common(), jsgraph()->zone(),
function_signature_);
@@ -2442,7 +2442,7 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
// Run the compiler pipeline to generate machine code.
CallDescriptor* descriptor =
wasm::ModuleEnv::GetWasmCallDescriptor(&zone, function.sig);
- if (kPointerSize == 4) {
+ if (machine.Is32()) {
descriptor = module_env->GetI32WasmCallDescriptor(&zone, descriptor);
}
Code::Flags flags = Code::ComputeFlags(Code::WASM_FUNCTION);
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698