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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2347143002: [interpreter] Add fast path for dynamic global lookups (Closed)
Patch Set: Fix bytecode operand documentation Created 4 years, 3 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 | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 43ab0e3abe0e0103ac6fde664fcd89138360f67c..3820f4fb5a55a1fc9f6f3415858dee7ba181458a 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1977,6 +1977,12 @@ void BytecodeGenerator::VisitVariableLoad(Variable* variable,
BuildHoleCheckForVariableLoad(variable);
break;
}
+ case DYNAMIC_GLOBAL: {
+ int depth = scope()->ContextChainLengthUntilOutermostSloppyEval();
+ builder()->LoadLookupGlobalSlot(variable->name(), typeof_mode,
+ feedback_index(slot), depth);
+ break;
+ }
default:
builder()->LoadLookupSlot(variable->name(), typeof_mode);
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698