Index: src/compiler/js-generic-lowering.cc |
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc |
index 146185ef9f7a0d5e741f58233b8d1c0cf7c758bd..78ead5e91b2f3026bb8793e86fed795ff1288e4d 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -281,9 +281,9 @@ void JSGenericLowering::LowerJSLoadProperty(Node* node) { |
void JSGenericLowering::LowerJSLoadNamed(Node* node) { |
- LoadNamedParameters p = OpParameter<LoadNamedParameters>(node); |
- Callable callable = CodeFactory::LoadIC(isolate(), p.contextual_mode); |
- PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name)); |
+ const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); |
+ Callable callable = CodeFactory::LoadIC(isolate(), p.contextual_mode()); |
+ PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
} |
@@ -296,9 +296,9 @@ void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
void JSGenericLowering::LowerJSStoreNamed(Node* node) { |
- StoreNamedParameters params = OpParameter<StoreNamedParameters>(node); |
- Callable callable = CodeFactory::StoreIC(isolate(), params.strict_mode); |
- PatchInsertInput(node, 1, jsgraph()->HeapConstant(params.name)); |
+ const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); |
+ Callable callable = CodeFactory::StoreIC(isolate(), p.strict_mode()); |
+ PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
} |
@@ -330,10 +330,10 @@ void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
void JSGenericLowering::LowerJSLoadContext(Node* node) { |
- ContextAccess access = OpParameter<ContextAccess>(node); |
+ const ContextAccess& access = ContextAccessOf(node->op()); |
// TODO(mstarzinger): Use simplified operators instead of machine operators |
// here so that load/store optimization can be applied afterwards. |
- for (int i = 0; i < access.depth(); ++i) { |
+ for (size_t i = 0; i < access.depth(); ++i) { |
node->ReplaceInput( |
0, graph()->NewNode( |
machine()->Load(kMachAnyTagged), |
@@ -341,16 +341,17 @@ void JSGenericLowering::LowerJSLoadContext(Node* node) { |
Int32Constant(Context::SlotOffset(Context::PREVIOUS_INDEX)), |
NodeProperties::GetEffectInput(node))); |
} |
- node->ReplaceInput(1, Int32Constant(Context::SlotOffset(access.index()))); |
+ node->ReplaceInput( |
+ 1, Int32Constant(Context::SlotOffset(static_cast<int>(access.index())))); |
PatchOperator(node, machine()->Load(kMachAnyTagged)); |
} |
void JSGenericLowering::LowerJSStoreContext(Node* node) { |
- ContextAccess access = OpParameter<ContextAccess>(node); |
+ const ContextAccess& access = ContextAccessOf(node->op()); |
// TODO(mstarzinger): Use simplified operators instead of machine operators |
// here so that load/store optimization can be applied afterwards. |
- for (int i = 0; i < access.depth(); ++i) { |
+ for (size_t i = 0; i < access.depth(); ++i) { |
node->ReplaceInput( |
0, graph()->NewNode( |
machine()->Load(kMachAnyTagged), |
@@ -359,7 +360,8 @@ void JSGenericLowering::LowerJSStoreContext(Node* node) { |
NodeProperties::GetEffectInput(node))); |
} |
node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); |
- node->ReplaceInput(1, Int32Constant(Context::SlotOffset(access.index()))); |
+ node->ReplaceInput( |
+ 1, Int32Constant(Context::SlotOffset(static_cast<int>(access.index())))); |
PatchOperator(node, machine()->Store(StoreRepresentation(kMachAnyTagged, |
kFullWriteBarrier))); |
} |
@@ -382,11 +384,11 @@ void JSGenericLowering::LowerJSCallConstruct(Node* node) { |
void JSGenericLowering::LowerJSCallFunction(Node* node) { |
- CallParameters p = OpParameter<CallParameters>(node); |
- CallFunctionStub stub(isolate(), p.arity - 2, p.flags); |
+ const CallFunctionParameters& p = CallFunctionParametersOf(node->op()); |
+ CallFunctionStub stub(isolate(), static_cast<int>(p.arity() - 2), p.flags()); |
CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor(); |
- CallDescriptor* desc = |
- linkage()->GetStubCallDescriptor(d, p.arity - 1, FlagsForNode(node)); |
+ CallDescriptor* desc = linkage()->GetStubCallDescriptor( |
+ d, static_cast<int>(p.arity() - 1), FlagsForNode(node)); |
Node* stub_code = CodeConstant(stub.GetCode()); |
PatchInsertInput(node, 0, stub_code); |
PatchOperator(node, common()->Call(desc)); |
@@ -394,9 +396,8 @@ void JSGenericLowering::LowerJSCallFunction(Node* node) { |
void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
- Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); |
- int arity = OperatorProperties::GetValueInputCount(node->op()); |
- ReplaceWithRuntimeCall(node, function, arity); |
+ const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); |
+ ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
} |
} // namespace compiler |