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

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

Issue 1412953007: [Interpreter] Fill out function prologue support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 347
348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( 348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
349 PretenureFlag tenured) { 349 PretenureFlag tenured) {
350 DCHECK(FitsInImm8Operand(tenured)); 350 DCHECK(FitsInImm8Operand(tenured));
351 Output(Bytecode::kCreateClosure, static_cast<uint8_t>(tenured)); 351 Output(Bytecode::kCreateClosure, static_cast<uint8_t>(tenured));
352 return *this; 352 return *this;
353 } 353 }
354 354
355 355
356 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(bool use_strict) {
357 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather
358 // than having two different bytecodes once we have better support for
359 // branches in the InterpreterAssembler.
360 Bytecode bytecode = use_strict ? Bytecode::kCreateArgumentsStrict
361 : Bytecode::kCreateArgumentsSloppy;
362 Output(bytecode);
363 return *this;
364 }
365
366
356 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( 367 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral(
357 int literal_index, Register flags) { 368 int literal_index, Register flags) {
358 if (FitsInIdx8Operand(literal_index)) { 369 if (FitsInIdx8Operand(literal_index)) {
359 Output(Bytecode::kCreateRegExpLiteral, static_cast<uint8_t>(literal_index), 370 Output(Bytecode::kCreateRegExpLiteral, static_cast<uint8_t>(literal_index),
360 flags.ToOperand()); 371 flags.ToOperand());
361 } else { 372 } else {
362 UNIMPLEMENTED(); 373 UNIMPLEMENTED();
363 } 374 }
364 return *this; 375 return *this;
365 } 376 }
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 903
893 Register TemporaryRegisterScope::NewRegister() { 904 Register TemporaryRegisterScope::NewRegister() {
894 count_++; 905 count_++;
895 last_register_index_ = builder_->BorrowTemporaryRegister(); 906 last_register_index_ = builder_->BorrowTemporaryRegister();
896 return Register(last_register_index_); 907 return Register(last_register_index_);
897 } 908 }
898 909
899 } // namespace interpreter 910 } // namespace interpreter
900 } // namespace internal 911 } // namespace internal
901 } // namespace v8 912 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698