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

Side by Side Diff: test/unittests/interpreter/bytecode-peephole-optimizer-unittest.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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/factory.h" 7 #include "src/factory.h"
8 #include "src/interpreter/bytecode-label.h" 8 #include "src/interpreter/bytecode-label.h"
9 #include "src/interpreter/bytecode-peephole-optimizer.h" 9 #include "src/interpreter/bytecode-peephole-optimizer.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 BytecodeNode first(Bytecode::kLdaZero); 389 BytecodeNode first(Bytecode::kLdaZero);
390 uint32_t reg_operand = Register(0).ToOperand(); 390 uint32_t reg_operand = Register(0).ToOperand();
391 uint32_t idx_operand = 1; 391 uint32_t idx_operand = 1;
392 BytecodeNode second(operator_replacement[0], reg_operand, idx_operand); 392 BytecodeNode second(operator_replacement[0], reg_operand, idx_operand);
393 optimizer()->Write(&first); 393 optimizer()->Write(&first);
394 optimizer()->Write(&second); 394 optimizer()->Write(&second);
395 Flush(); 395 Flush();
396 CHECK_EQ(write_count(), 1); 396 CHECK_EQ(write_count(), 1);
397 CHECK_EQ(last_written().bytecode(), operator_replacement[1]); 397 CHECK_EQ(last_written().bytecode(), operator_replacement[1]);
398 CHECK_EQ(last_written().operand_count(), 3); 398 CHECK_EQ(last_written().operand_count(), 3);
399 CHECK_EQ(last_written().operand(0), 0); 399 CHECK_EQ(last_written().operand(0), 0u);
400 CHECK_EQ(last_written().operand(1), reg_operand); 400 CHECK_EQ(last_written().operand(1), reg_operand);
401 CHECK_EQ(last_written().operand(2), idx_operand); 401 CHECK_EQ(last_written().operand(2), idx_operand);
402 Reset(); 402 Reset();
403 } 403 }
404 } 404 }
405 405
406 } // namespace interpreter 406 } // namespace interpreter
407 } // namespace internal 407 } // namespace internal
408 } // namespace v8 408 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/interpreter/bytecode-array-writer-unittest.cc ('k') | test/unittests/interpreter/bytecode-pipeline-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698