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

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

Issue 1400753003: [Interpreter] Add array literal support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_literal
Patch Set: Rebase 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/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 cdc2442888cc29f1692b9972835392bf4fc0ab5b..d99d0db7569ac74830dd27f75dbf1fbefac15fbe 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -343,6 +343,13 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreKeyedProperty(
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::GenericStoreKeyedProperty(
+ Register object, Register key) {
+ Output(Bytecode::kKeyedStoreICGeneric, object.ToOperand(), key.ToOperand());
+ return *this;
+}
+
+
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
PretenureFlag tenured) {
DCHECK(FitsInImm8Operand(tenured));
@@ -351,6 +358,19 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral(
+ int literal_index, int flags) {
+ DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bytes.
+ if (FitsInIdx8Operand(literal_index)) {
+ Output(Bytecode::kCreateArrayLiteral, static_cast<uint8_t>(literal_index),
+ static_cast<uint8_t>(flags));
+ } else {
+ UNIMPLEMENTED();
+ }
+ return *this;
+}
+
+
BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) {
Output(Bytecode::kPushContext, context.ToOperand());
return *this;
« 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