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

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

Issue 1150723005: [turbofan] Optimized lowering of DYNAMIC_GLOBAL lookup slot loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 6 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 | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 448
449 449
450 void JSGenericLowering::LowerJSLoadDynamicGlobal(Node* node) { 450 void JSGenericLowering::LowerJSLoadDynamicGlobal(Node* node) {
451 const DynamicGlobalAccess& access = DynamicGlobalAccessOf(node->op()); 451 const DynamicGlobalAccess& access = DynamicGlobalAccessOf(node->op());
452 Runtime::FunctionId function_id = 452 Runtime::FunctionId function_id =
453 (access.mode() == CONTEXTUAL) ? Runtime::kLoadLookupSlot 453 (access.mode() == CONTEXTUAL) ? Runtime::kLoadLookupSlot
454 : Runtime::kLoadLookupSlotNoReferenceError; 454 : Runtime::kLoadLookupSlotNoReferenceError;
455 Node* projection = graph()->NewNode(common()->Projection(0), node); 455 Node* projection = graph()->NewNode(common()->Projection(0), node);
456 NodeProperties::ReplaceWithValue(node, projection, node, node); 456 NodeProperties::ReplaceWithValue(node, projection, node, node);
457 node->RemoveInput(NodeProperties::FirstFrameStateIndex(node) + 1);
457 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); 458 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name()));
458 ReplaceWithRuntimeCall(node, function_id); 459 ReplaceWithRuntimeCall(node, function_id);
459 projection->ReplaceInput(0, node); 460 projection->ReplaceInput(0, node);
460 } 461 }
461 462
462 463
463 void JSGenericLowering::LowerJSLoadDynamicContext(Node* node) { 464 void JSGenericLowering::LowerJSLoadDynamicContext(Node* node) {
464 const DynamicContextAccess& access = DynamicContextAccessOf(node->op()); 465 const DynamicContextAccess& access = DynamicContextAccessOf(node->op());
465 Node* projection = graph()->NewNode(common()->Projection(0), node); 466 Node* projection = graph()->NewNode(common()->Projection(0), node);
466 NodeProperties::ReplaceWithValue(node, projection, node, node); 467 NodeProperties::ReplaceWithValue(node, projection, node, node);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 } 831 }
831 832
832 833
833 MachineOperatorBuilder* JSGenericLowering::machine() const { 834 MachineOperatorBuilder* JSGenericLowering::machine() const {
834 return jsgraph()->machine(); 835 return jsgraph()->machine();
835 } 836 }
836 837
837 } // namespace compiler 838 } // namespace compiler
838 } // namespace internal 839 } // namespace internal
839 } // namespace v8 840 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698