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

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

Issue 1400753003: [Interpreter] Add array literal support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_literal
Patch Set: 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
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 7984aa7f5ef42254c6d2c679d9f286861848ee9a..7fc665eb32a735a1c72b012c07d512ae6a75fb7a 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -45,7 +45,7 @@ class BytecodeArrayBuilder {
Register Parameter(int parameter_index) const;
- // Constant loads to accumulator.
+ // Constant loads to the accumulator.
BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
BytecodeArrayBuilder& LoadLiteral(Handle<Object> object);
BytecodeArrayBuilder& LoadUndefined();
@@ -54,7 +54,7 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& LoadTrue();
BytecodeArrayBuilder& LoadFalse();
- // Global loads to accumulator and stores from accumulator.
+ // Global loads to accumulator and stores from the accumulator.
BytecodeArrayBuilder& LoadGlobal(int slot_index);
BytecodeArrayBuilder& StoreGlobal(int slot_index, LanguageMode language_mode);
@@ -78,6 +78,8 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key,
int feedback_slot,
LanguageMode language_mode);
+ BytecodeArrayBuilder& GenericStoreKeyedProperty(Register object,
+ Register key);
// Push the context in accumulator as the new context, and store in register
// |context|.
@@ -85,6 +87,8 @@ class BytecodeArrayBuilder {
// Pop the current context and replace with |context|
BytecodeArrayBuilder& PopContext(Register context);
+ // Literals creation. Constant elements should be in the accumulator.
+ BytecodeArrayBuilder& CreateArrayLiteral(int literal_index, int flags);
// Call a JS function. The JSFunction or Callable to be called should be in
// |callable|, the receiver should be in |receiver| and all subsequent

Powered by Google App Engine
This is Rietveld 408576698