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

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

Issue 2493183002: [ignition] Fix more -Wsign-compare warnings. (Closed)
Patch Set: Address comment Created 4 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 | test/unittests/interpreter/bytecode-array-iterator-unittest.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-writer.h" 5 #include "src/interpreter/bytecode-array-writer.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/interpreter/bytecode-label.h" 8 #include "src/interpreter/bytecode-label.h"
9 #include "src/interpreter/bytecode-register.h" 9 #include "src/interpreter/bytecode-register.h"
10 #include "src/interpreter/constant-array-builder.h" 10 #include "src/interpreter/constant-array-builder.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 PatchJumpWith32BitOperand(jump_location + prefix_offset, delta); 266 PatchJumpWith32BitOperand(jump_location + prefix_offset, delta);
267 break; 267 break;
268 default: 268 default:
269 UNREACHABLE(); 269 UNREACHABLE();
270 } 270 }
271 unbound_jumps_--; 271 unbound_jumps_--;
272 } 272 }
273 273
274 void BytecodeArrayWriter::EmitJump(BytecodeNode* node, BytecodeLabel* label) { 274 void BytecodeArrayWriter::EmitJump(BytecodeNode* node, BytecodeLabel* label) {
275 DCHECK(Bytecodes::IsJump(node->bytecode())); 275 DCHECK(Bytecodes::IsJump(node->bytecode()));
276 DCHECK_EQ(0, node->operand(0)); 276 DCHECK_EQ(0u, node->operand(0));
277 277
278 size_t current_offset = bytecodes()->size(); 278 size_t current_offset = bytecodes()->size();
279 279
280 if (label->is_bound()) { 280 if (label->is_bound()) {
281 CHECK_GE(current_offset, label->offset()); 281 CHECK_GE(current_offset, label->offset());
282 CHECK_LE(current_offset, static_cast<size_t>(kMaxInt)); 282 CHECK_LE(current_offset, static_cast<size_t>(kMaxInt));
283 // Label has been bound already so this is a backwards jump. 283 // Label has been bound already so this is a backwards jump.
284 size_t abs_delta = current_offset - label->offset(); 284 size_t abs_delta = current_offset - label->offset();
285 int delta = -static_cast<int>(abs_delta); 285 int delta = -static_cast<int>(abs_delta);
286 OperandScale operand_scale = Bytecodes::ScaleForSignedOperand(delta); 286 OperandScale operand_scale = Bytecodes::ScaleForSignedOperand(delta);
(...skipping 30 matching lines...) Expand all
317 node->set_bytecode(node->bytecode(), k32BitJumpPlaceholder); 317 node->set_bytecode(node->bytecode(), k32BitJumpPlaceholder);
318 break; 318 break;
319 } 319 }
320 } 320 }
321 EmitBytecode(node); 321 EmitBytecode(node);
322 } 322 }
323 323
324 } // namespace interpreter 324 } // namespace interpreter
325 } // namespace internal 325 } // namespace internal
326 } // namespace v8 326 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/unittests/interpreter/bytecode-array-iterator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698