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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 1419373007: [Interpreter] Adds implementation of bytecode graph builder for LoadICSloppy/Strict (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Modified bytecode-graph-builder-unittest to build bytecode array instead of generating it. Created 5 years, 1 month 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
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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 flags.ToOperand()); 437 flags.ToOperand());
438 } else { 438 } else {
439 UNIMPLEMENTED(); 439 UNIMPLEMENTED();
440 } 440 }
441 return *this; 441 return *this;
442 } 442 }
443 443
444 444
445 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( 445 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral(
446 int literal_index, int flags) { 446 int literal_index, int flags) {
447 DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bytes. 447 DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bits.
448 if (FitsInIdx8Operand(literal_index)) { 448 if (FitsInIdx8Operand(literal_index)) {
449 Output(Bytecode::kCreateArrayLiteral, static_cast<uint8_t>(literal_index), 449 Output(Bytecode::kCreateArrayLiteral, static_cast<uint8_t>(literal_index),
450 static_cast<uint8_t>(flags)); 450 static_cast<uint8_t>(flags));
451 } else { 451 } else {
452 UNIMPLEMENTED(); 452 UNIMPLEMENTED();
453 } 453 }
454 return *this; 454 return *this;
455 } 455 }
456 456
457 457
458 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( 458 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral(
459 int literal_index, int flags) { 459 int literal_index, int flags) {
460 DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bytes. 460 DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bits.
461 if (FitsInIdx8Operand(literal_index)) { 461 if (FitsInIdx8Operand(literal_index)) {
462 Output(Bytecode::kCreateObjectLiteral, static_cast<uint8_t>(literal_index), 462 Output(Bytecode::kCreateObjectLiteral, static_cast<uint8_t>(literal_index),
463 static_cast<uint8_t>(flags)); 463 static_cast<uint8_t>(flags));
464 } else { 464 } else {
465 UNIMPLEMENTED(); 465 UNIMPLEMENTED();
466 } 466 }
467 return *this; 467 return *this;
468 } 468 }
469 469
470 470
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 DCHECK_GT(next_consecutive_count_, 0); 1239 DCHECK_GT(next_consecutive_count_, 0);
1240 builder_->BorrowConsecutiveTemporaryRegister(next_consecutive_register_); 1240 builder_->BorrowConsecutiveTemporaryRegister(next_consecutive_register_);
1241 allocated_.push_back(next_consecutive_register_); 1241 allocated_.push_back(next_consecutive_register_);
1242 next_consecutive_count_--; 1242 next_consecutive_count_--;
1243 return Register(next_consecutive_register_++); 1243 return Register(next_consecutive_register_++);
1244 } 1244 }
1245 1245
1246 } // namespace interpreter 1246 } // namespace interpreter
1247 } // namespace internal 1247 } // namespace internal
1248 } // namespace v8 1248 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698