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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 435393004: Carry along ContextualMode in JSLoadNamed operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 3ae5aa4079d78dee54465565f1da2bd2fbf09c64..383ac93924fc61ab41003b51dd2635bbfc1a52e6 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1685,21 +1685,9 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
switch (variable->location()) {
case Variable::UNALLOCATED: {
// Global var, const, or let variable.
- if (!info()->is_native()) {
- // TODO(turbofan): This special case is needed only because we don't
- // use LoadICs yet. Remove this once LoadNamed is lowered to an IC.
- Node* name = jsgraph()->Constant(variable->name());
- Runtime::FunctionId function_id =
- (contextual_mode == CONTEXTUAL)
- ? Runtime::kLoadLookupSlot
- : Runtime::kLoadLookupSlotNoReferenceError;
- Operator* op = javascript()->Runtime(function_id, 2);
- Node* pair = NewNode(op, current_context(), name);
- return NewNode(common()->Projection(0), pair);
- }
Node* global = BuildLoadGlobalObject();
PrintableUnique<Name> name = MakeUnique(variable->name());
- Operator* op = javascript()->LoadNamed(name);
+ Operator* op = javascript()->LoadNamed(name, contextual_mode);
return NewNode(op, global);
}
case Variable::PARAMETER:
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698