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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1419003002: [Interpreter] Unify global and unallocated variable access. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unallocated variable error Created 5 years, 2 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/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index cd1c001d30bfa96ac3b73c2976358b0285db087c..1f0badb10ece86457beb6f5e822e8718cf82849c 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -64,6 +64,9 @@ class BytecodeArrayBuilder {
// Return true if the register |reg| represents a temporary register.
bool RegisterIsTemporary(Register reg) const;
+ // Gets a constant pool entry for the |object|.
+ size_t GetConstantPoolEntry(Handle<Object> object);
+
// Constant loads to accumulator.
BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
BytecodeArrayBuilder& LoadLiteral(Handle<Object> object);
@@ -74,8 +77,10 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& LoadFalse();
// Global loads to the accumulator and stores from the accumulator.
- BytecodeArrayBuilder& LoadGlobal(int slot_index);
- BytecodeArrayBuilder& StoreGlobal(int slot_index, LanguageMode language_mode);
+ BytecodeArrayBuilder& LoadGlobal(size_t name_index, int feedback_slot,
+ LanguageMode language_mode);
+ BytecodeArrayBuilder& StoreGlobal(size_t name_index, int feedback_slot,
+ LanguageMode language_mode);
// Load the object at |slot_index| in |context| into the accumulator.
BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index);
@@ -87,14 +92,16 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg);
BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg);
- // Load properties. The property name should be in the accumulator.
- BytecodeArrayBuilder& LoadNamedProperty(Register object, int feedback_slot,
+ // Named load property.
+ BytecodeArrayBuilder& LoadNamedProperty(Register object, size_t name_index,
+ int feedback_slot,
LanguageMode language_mode);
+ // Keyed load property. The key should be in the accumulator.
BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot,
LanguageMode language_mode);
// Store properties. The value to be stored should be in the accumulator.
- BytecodeArrayBuilder& StoreNamedProperty(Register object, Register name,
+ BytecodeArrayBuilder& StoreNamedProperty(Register object, size_t name_index,
int feedback_slot,
LanguageMode language_mode);
BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key,
@@ -184,6 +191,8 @@ class BytecodeArrayBuilder {
static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode);
static Bytecode BytecodeForStoreIC(LanguageMode language_mode);
static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode);
+ static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode);
+ static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
static bool FitsInIdx8Operand(int value);
static bool FitsInIdx8Operand(size_t value);
@@ -211,8 +220,6 @@ class BytecodeArrayBuilder {
uint32_t operand_value) const;
bool LastBytecodeInSameBlock() const;
- size_t GetConstantPoolEntry(Handle<Object> object);
-
int BorrowTemporaryRegister();
void ReturnTemporaryRegister(int reg_index);
int PrepareForConsecutiveTemporaryRegisters(size_t count);
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698