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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace interpreter { 9 namespace interpreter {
10 10
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 if (FitsInIdx8Operand(feedback_slot)) { 336 if (FitsInIdx8Operand(feedback_slot)) {
337 Output(bytecode, object.ToOperand(), key.ToOperand(), 337 Output(bytecode, object.ToOperand(), key.ToOperand(),
338 static_cast<uint8_t>(feedback_slot)); 338 static_cast<uint8_t>(feedback_slot));
339 } else { 339 } else {
340 UNIMPLEMENTED(); 340 UNIMPLEMENTED();
341 } 341 }
342 return *this; 342 return *this;
343 } 343 }
344 344
345 345
346 BytecodeArrayBuilder& BytecodeArrayBuilder::GenericStoreKeyedProperty(
347 Register object, Register key) {
348 Output(Bytecode::kKeyedStoreICGeneric, object.ToOperand(), key.ToOperand());
349 return *this;
350 }
351
352
346 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( 353 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
347 PretenureFlag tenured) { 354 PretenureFlag tenured) {
348 DCHECK(FitsInImm8Operand(tenured)); 355 DCHECK(FitsInImm8Operand(tenured));
349 Output(Bytecode::kCreateClosure, static_cast<uint8_t>(tenured)); 356 Output(Bytecode::kCreateClosure, static_cast<uint8_t>(tenured));
350 return *this; 357 return *this;
351 } 358 }
352 359
353 360
361 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral(
362 int literal_index, int flags) {
363 DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bytes.
364 if (FitsInIdx8Operand(literal_index)) {
365 Output(Bytecode::kCreateArrayLiteral, static_cast<uint8_t>(literal_index),
366 static_cast<uint8_t>(flags));
367 } else {
368 UNIMPLEMENTED();
369 }
370 return *this;
371 }
372
373
354 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { 374 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) {
355 Output(Bytecode::kPushContext, context.ToOperand()); 375 Output(Bytecode::kPushContext, context.ToOperand());
356 return *this; 376 return *this;
357 } 377 }
358 378
359 379
360 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { 380 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) {
361 Output(Bytecode::kPopContext, context.ToOperand()); 381 Output(Bytecode::kPopContext, context.ToOperand());
362 return *this; 382 return *this;
363 } 383 }
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 817
798 Register TemporaryRegisterScope::NewRegister() { 818 Register TemporaryRegisterScope::NewRegister() {
799 count_++; 819 count_++;
800 last_register_index_ = builder_->BorrowTemporaryRegister(); 820 last_register_index_ = builder_->BorrowTemporaryRegister();
801 return Register(last_register_index_); 821 return Register(last_register_index_);
802 } 822 }
803 823
804 } // namespace interpreter 824 } // namespace interpreter
805 } // namespace internal 825 } // namespace internal
806 } // namespace v8 826 } // namespace v8
OLDNEW
« 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