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

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

Issue 1402153004: Revert of [Interpreter] Support for operator new. (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
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 size_t arg_count) { 591 size_t arg_count) {
592 if (FitsInIdx8Operand(arg_count)) { 592 if (FitsInIdx8Operand(arg_count)) {
593 Output(Bytecode::kCall, callable.ToOperand(), receiver.ToOperand(), 593 Output(Bytecode::kCall, callable.ToOperand(), receiver.ToOperand(),
594 static_cast<uint8_t>(arg_count)); 594 static_cast<uint8_t>(arg_count));
595 } else { 595 } else {
596 UNIMPLEMENTED(); 596 UNIMPLEMENTED();
597 } 597 }
598 return *this; 598 return *this;
599 } 599 }
600 600
601
602 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
603 Register first_arg,
604 size_t arg_count) {
605 DCHECK(FitsInIdx8Operand(arg_count));
606 Output(Bytecode::kNew, constructor.ToOperand(), first_arg.ToOperand(),
607 static_cast<uint8_t>(arg_count));
608 return *this;
609 }
610
611 601
612 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( 602 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
613 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) { 603 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
614 DCHECK(FitsInIdx16Operand(function_id)); 604 DCHECK(FitsInIdx16Operand(function_id));
615 DCHECK(FitsInIdx8Operand(arg_count)); 605 DCHECK(FitsInIdx8Operand(arg_count));
616 Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id), 606 Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id),
617 first_arg.ToOperand(), static_cast<uint8_t>(arg_count)); 607 first_arg.ToOperand(), static_cast<uint8_t>(arg_count));
618 return *this; 608 return *this;
619 } 609 }
620 610
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 845
856 Register TemporaryRegisterScope::NewRegister() { 846 Register TemporaryRegisterScope::NewRegister() {
857 count_++; 847 count_++;
858 last_register_index_ = builder_->BorrowTemporaryRegister(); 848 last_register_index_ = builder_->BorrowTemporaryRegister();
859 return Register(last_register_index_); 849 return Register(last_register_index_);
860 } 850 }
861 851
862 } // namespace interpreter 852 } // namespace interpreter
863 } // namespace internal 853 } // namespace internal
864 } // namespace v8 854 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698