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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1475953002: [stubs] A new approach to TF stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Win64 build Created 5 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/interpreter-assembler.cc ('k') | src/compiler/js-intrinsic-lowering.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 NodeProperties::ChangeOp(node, common()->Call(desc)); 218 NodeProperties::ChangeOp(node, common()->Call(desc));
219 } 219 }
220 220
221 221
222 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, 222 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
223 Runtime::FunctionId f, 223 Runtime::FunctionId f,
224 int nargs_override) { 224 int nargs_override) {
225 Operator::Properties properties = node->op()->properties(); 225 Operator::Properties properties = node->op()->properties();
226 const Runtime::Function* fun = Runtime::FunctionForId(f); 226 const Runtime::Function* fun = Runtime::FunctionForId(f);
227 int nargs = (nargs_override < 0) ? fun->nargs : nargs_override; 227 int nargs = (nargs_override < 0) ? fun->nargs : nargs_override;
228 CallDescriptor* desc = 228 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(
229 Linkage::GetRuntimeCallDescriptor(zone(), f, nargs, properties); 229 zone(), f, nargs, properties, CallDescriptor::kNeedsFrameState);
230 Node* ref = jsgraph()->ExternalConstant(ExternalReference(f, isolate())); 230 Node* ref = jsgraph()->ExternalConstant(ExternalReference(f, isolate()));
231 Node* arity = jsgraph()->Int32Constant(nargs); 231 Node* arity = jsgraph()->Int32Constant(nargs);
232 node->InsertInput(zone(), 0, jsgraph()->CEntryStubConstant(fun->result_size)); 232 node->InsertInput(zone(), 0, jsgraph()->CEntryStubConstant(fun->result_size));
233 node->InsertInput(zone(), nargs + 1, ref); 233 node->InsertInput(zone(), nargs + 1, ref);
234 node->InsertInput(zone(), nargs + 2, arity); 234 node->InsertInput(zone(), nargs + 2, arity);
235 NodeProperties::ChangeOp(node, common()->Call(desc)); 235 NodeProperties::ChangeOp(node, common()->Call(desc));
236 } 236 }
237 237
238 238
239 void JSGenericLowering::LowerJSUnaryNot(Node* node) { 239 void JSGenericLowering::LowerJSUnaryNot(Node* node) {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 Node* object = NodeProperties::GetValueInput(node, 0); 619 Node* object = NodeProperties::GetValueInput(node, 0);
620 Node* context = NodeProperties::GetContextInput(node); 620 Node* context = NodeProperties::GetContextInput(node);
621 Node* effect = NodeProperties::GetEffectInput(node); 621 Node* effect = NodeProperties::GetEffectInput(node);
622 Node* control = NodeProperties::GetControlInput(node); 622 Node* control = NodeProperties::GetControlInput(node);
623 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0); 623 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0);
624 624
625 // Get the set of properties to enumerate. 625 // Get the set of properties to enumerate.
626 Runtime::Function const* function = 626 Runtime::Function const* function =
627 Runtime::FunctionForId(Runtime::kGetPropertyNamesFast); 627 Runtime::FunctionForId(Runtime::kGetPropertyNamesFast);
628 CallDescriptor const* descriptor = Linkage::GetRuntimeCallDescriptor( 628 CallDescriptor const* descriptor = Linkage::GetRuntimeCallDescriptor(
629 zone(), function->function_id, 1, Operator::kNoProperties); 629 zone(), function->function_id, 1, Operator::kNoProperties,
630 CallDescriptor::kNeedsFrameState);
630 Node* cache_type = effect = graph()->NewNode( 631 Node* cache_type = effect = graph()->NewNode(
631 common()->Call(descriptor), 632 common()->Call(descriptor),
632 jsgraph()->CEntryStubConstant(function->result_size), object, 633 jsgraph()->CEntryStubConstant(function->result_size), object,
633 jsgraph()->ExternalConstant(function->function_id), 634 jsgraph()->ExternalConstant(function->function_id),
634 jsgraph()->Int32Constant(1), context, frame_state, effect, control); 635 jsgraph()->Int32Constant(1), context, frame_state, effect, control);
635 control = graph()->NewNode(common()->IfSuccess(), cache_type); 636 control = graph()->NewNode(common()->IfSuccess(), cache_type);
636 637
637 Node* object_map = effect = graph()->NewNode( 638 Node* object_map = effect = graph()->NewNode(
638 machine()->Load(kMachAnyTagged), object, 639 machine()->Load(kMachAnyTagged), object,
639 jsgraph()->IntPtrConstant(HeapObject::kMapOffset - kHeapObjectTag), 640 jsgraph()->IntPtrConstant(HeapObject::kMapOffset - kHeapObjectTag),
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 } 893 }
893 894
894 895
895 MachineOperatorBuilder* JSGenericLowering::machine() const { 896 MachineOperatorBuilder* JSGenericLowering::machine() const {
896 return jsgraph()->machine(); 897 return jsgraph()->machine();
897 } 898 }
898 899
899 } // namespace compiler 900 } // namespace compiler
900 } // namespace internal 901 } // namespace internal
901 } // namespace v8 902 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698