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

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

Issue 1434873004: [turbofan] Pass new target to JSCreate nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_inlining-constructor-1
Patch Set: Created 5 years, 1 month 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/compiler/js-inlining.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 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 Node* projection = graph()->NewNode(common()->Projection(0), node); 450 Node* projection = graph()->NewNode(common()->Projection(0), node);
451 NodeProperties::ReplaceUses(node, projection, node, node, node); 451 NodeProperties::ReplaceUses(node, projection, node, node, node);
452 node->RemoveInput(NodeProperties::FirstValueIndex(node)); 452 node->RemoveInput(NodeProperties::FirstValueIndex(node));
453 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); 453 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name()));
454 ReplaceWithRuntimeCall(node, function_id); 454 ReplaceWithRuntimeCall(node, function_id);
455 projection->ReplaceInput(0, node); 455 projection->ReplaceInput(0, node);
456 } 456 }
457 457
458 458
459 void JSGenericLowering::LowerJSCreate(Node* node) { 459 void JSGenericLowering::LowerJSCreate(Node* node) {
460 // TODO(4544): The duplication of the constructor function is only valid if
461 // actual constructor and original constructor coincide. Fix this!
462 node->InsertInput(zone(), 1, node->InputAt(0)); // Duplicate constructor.
463 ReplaceWithRuntimeCall(node, Runtime::kNewObject); 460 ReplaceWithRuntimeCall(node, Runtime::kNewObject);
464 } 461 }
465 462
466 463
467 void JSGenericLowering::LowerJSCreateArguments(Node* node) { 464 void JSGenericLowering::LowerJSCreateArguments(Node* node) {
468 const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op()); 465 const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op());
469 switch (p.type()) { 466 switch (p.type()) {
470 case CreateArgumentsParameters::kMappedArguments: 467 case CreateArgumentsParameters::kMappedArguments:
471 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); 468 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic);
472 break; 469 break;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 } 855 }
859 856
860 857
861 MachineOperatorBuilder* JSGenericLowering::machine() const { 858 MachineOperatorBuilder* JSGenericLowering::machine() const {
862 return jsgraph()->machine(); 859 return jsgraph()->machine();
863 } 860 }
864 861
865 } // namespace compiler 862 } // namespace compiler
866 } // namespace internal 863 } // namespace internal
867 } // namespace v8 864 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698