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

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

Issue 1431843002: Fix signed-compare error with gcc 4.9.2. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 UNIMPLEMENTED(); 776 UNIMPLEMENTED();
777 } 777 }
778 return *this; 778 return *this;
779 } 779 }
780 780
781 781
782 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, 782 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor,
783 Register first_arg, 783 Register first_arg,
784 size_t arg_count) { 784 size_t arg_count) {
785 if (!first_arg.is_valid()) { 785 if (!first_arg.is_valid()) {
786 DCHECK_EQ(0, arg_count); 786 DCHECK_EQ(0u, arg_count);
787 first_arg = Register(0); 787 first_arg = Register(0);
788 } 788 }
789 DCHECK(FitsInIdx8Operand(arg_count)); 789 DCHECK(FitsInIdx8Operand(arg_count));
790 Output(Bytecode::kNew, constructor.ToOperand(), first_arg.ToOperand(), 790 Output(Bytecode::kNew, constructor.ToOperand(), first_arg.ToOperand(),
791 static_cast<uint8_t>(arg_count)); 791 static_cast<uint8_t>(arg_count));
792 return *this; 792 return *this;
793 } 793 }
794 794
795 795
796 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( 796 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
797 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) { 797 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
798 DCHECK(FitsInIdx16Operand(function_id)); 798 DCHECK(FitsInIdx16Operand(function_id));
799 DCHECK(FitsInIdx8Operand(arg_count)); 799 DCHECK(FitsInIdx8Operand(arg_count));
800 if (!first_arg.is_valid()) { 800 if (!first_arg.is_valid()) {
801 DCHECK_EQ(0, arg_count); 801 DCHECK_EQ(0u, arg_count);
802 first_arg = Register(0); 802 first_arg = Register(0);
803 } 803 }
804 Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id), 804 Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id),
805 first_arg.ToOperand(), static_cast<uint8_t>(arg_count)); 805 first_arg.ToOperand(), static_cast<uint8_t>(arg_count));
806 return *this; 806 return *this;
807 } 807 }
808 808
809 809
810 BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index, 810 BytecodeArrayBuilder& BytecodeArrayBuilder::CallJSRuntime(int context_index,
811 Register receiver, 811 Register receiver,
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 DCHECK_GT(next_consecutive_count_, 0); 1282 DCHECK_GT(next_consecutive_count_, 0);
1283 builder_->BorrowConsecutiveTemporaryRegister(next_consecutive_register_); 1283 builder_->BorrowConsecutiveTemporaryRegister(next_consecutive_register_);
1284 allocated_.push_back(next_consecutive_register_); 1284 allocated_.push_back(next_consecutive_register_);
1285 next_consecutive_count_--; 1285 next_consecutive_count_--;
1286 return Register(next_consecutive_register_++); 1286 return Register(next_consecutive_register_++);
1287 } 1287 }
1288 1288
1289 } // namespace interpreter 1289 } // namespace interpreter
1290 } // namespace internal 1290 } // namespace internal
1291 } // namespace v8 1291 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698