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

Side by Side Diff: test/unittests/interpreter/interpreter-assembler-unittest.cc

Issue 1989363004: [turbofan] Add FixedArray peephole optimizations to CodeStubAssembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Final review feedback Created 4 years, 7 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 | « test/cctest/compiler/test-code-stub-assembler.cc ('k') | 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 "test/unittests/interpreter/interpreter-assembler-unittest.h" 5 #include "test/unittests/interpreter/interpreter-assembler-unittest.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/interface-descriptors.h" 10 #include "src/interface-descriptors.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 IsLoadParentFramePointer(), 513 IsLoadParentFramePointer(),
514 IsWordShl(reg_index_node, IsIntPtrConstant(kPointerSizeLog2)), 514 IsWordShl(reg_index_node, IsIntPtrConstant(kPointerSizeLog2)),
515 store_value)); 515 store_value));
516 } 516 }
517 } 517 }
518 518
519 TARGET_TEST_F(InterpreterAssemblerTest, SmiTag) { 519 TARGET_TEST_F(InterpreterAssemblerTest, SmiTag) {
520 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { 520 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
521 InterpreterAssemblerForTest m(this, bytecode); 521 InterpreterAssemblerForTest m(this, bytecode);
522 Node* value = m.Int32Constant(44); 522 Node* value = m.Int32Constant(44);
523 EXPECT_THAT( 523 EXPECT_THAT(m.SmiTag(value),
524 m.SmiTag(value), 524 IsIntPtrConstant(static_cast<intptr_t>(44)
525 IsWordShl(value, IsIntPtrConstant(kSmiShiftSize + kSmiTagSize))); 525 << (kSmiShiftSize + kSmiTagSize)));
526 EXPECT_THAT( 526 EXPECT_THAT(
527 m.SmiUntag(value), 527 m.SmiUntag(value),
528 IsWordSar(value, IsIntPtrConstant(kSmiShiftSize + kSmiTagSize))); 528 IsWordSar(value, IsIntPtrConstant(kSmiShiftSize + kSmiTagSize)));
529 } 529 }
530 } 530 }
531 531
532 TARGET_TEST_F(InterpreterAssemblerTest, IntPtrAdd) { 532 TARGET_TEST_F(InterpreterAssemblerTest, IntPtrAdd) {
533 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { 533 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
534 InterpreterAssemblerForTest m(this, bytecode); 534 InterpreterAssemblerForTest m(this, bytecode);
535 Node* a = m.Int32Constant(0); 535 Node* a = m.Int32Constant(0);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 feedback_vector, 701 feedback_vector,
702 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher, 702 m.IsLoad(MachineType::AnyTagged(), load_shared_function_info_matcher,
703 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - 703 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset -
704 kHeapObjectTag))); 704 kHeapObjectTag)));
705 } 705 }
706 } 706 }
707 707
708 } // namespace interpreter 708 } // namespace interpreter
709 } // namespace internal 709 } // namespace internal
710 } // namespace v8 710 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698