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

Unified Diff: src/interpreter/bytecode-array-builder.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.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index fe334e16412933e6156099538a84c4139f128701..f14111637ccd4e50960176f1b4a26dea8663251b 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -307,6 +307,18 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupContextSlot(
return *this;
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupGlobalSlot(
+ const Handle<String> name, TypeofMode typeof_mode, int feedback_slot,
+ int depth) {
+ Bytecode bytecode = (typeof_mode == INSIDE_TYPEOF)
+ ? Bytecode::kLdaLookupGlobalSlotInsideTypeof
+ : Bytecode::kLdaLookupGlobalSlot;
+ size_t name_index = GetConstantPoolEntry(name);
+ Output(bytecode, UnsignedOperand(name_index), UnsignedOperand(feedback_slot),
+ UnsignedOperand(depth));
+ return *this;
+}
+
BytecodeArrayBuilder& BytecodeArrayBuilder::StoreLookupSlot(
const Handle<String> name, LanguageMode language_mode) {
Bytecode bytecode = BytecodeForStoreLookupSlot(language_mode);
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698