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

Side by Side Diff: test/unittests/compiler/change-lowering-unittest.cc

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 years, 3 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/value-helper.h ('k') | test/unittests/compiler/graph-unittest.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler/change-lowering.h" 6 #include "src/compiler/change-lowering.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 27 matching lines...) Expand all
38 JSOperatorBuilder javascript(zone()); 38 JSOperatorBuilder javascript(zone());
39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine); 39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine);
40 ChangeLowering reducer(&jsgraph); 40 ChangeLowering reducer(&jsgraph);
41 return reducer.Reduce(node); 41 return reducer.Reduce(node);
42 } 42 }
43 43
44 SimplifiedOperatorBuilder* simplified() { return &simplified_; } 44 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
45 45
46 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, 46 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher,
47 const Matcher<Node*>& control_matcher) { 47 const Matcher<Node*>& control_matcher) {
48 return IsCall(_, IsHeapConstant(Unique<HeapObject>::CreateImmovable( 48 return IsCall(
49 AllocateHeapNumberStub(isolate()).GetCode())), 49 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()),
50 IsNumberConstant(BitEq(0.0)), effect_matcher, 50 IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher);
51 control_matcher);
52 } 51 }
53 Matcher<Node*> IsChangeInt32ToSmi(const Matcher<Node*>& value_matcher) { 52 Matcher<Node*> IsChangeInt32ToSmi(const Matcher<Node*>& value_matcher) {
54 return Is64() ? IsWord64Shl(IsChangeInt32ToInt64(value_matcher), 53 return Is64() ? IsWord64Shl(IsChangeInt32ToInt64(value_matcher),
55 IsSmiShiftBitsConstant()) 54 IsSmiShiftBitsConstant())
56 : IsWord32Shl(value_matcher, IsSmiShiftBitsConstant()); 55 : IsWord32Shl(value_matcher, IsSmiShiftBitsConstant());
57 } 56 }
58 Matcher<Node*> IsChangeSmiToInt32(const Matcher<Node*>& value_matcher) { 57 Matcher<Node*> IsChangeSmiToInt32(const Matcher<Node*>& value_matcher) {
59 return Is64() ? IsTruncateInt64ToInt32( 58 return Is64() ? IsTruncateInt64ToInt32(
60 IsWord64Sar(value_matcher, IsSmiShiftBitsConstant())) 59 IsWord64Sar(value_matcher, IsSmiShiftBitsConstant()))
61 : IsWord32Sar(value_matcher, IsSmiShiftBitsConstant()); 60 : IsWord32Sar(value_matcher, IsSmiShiftBitsConstant());
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 CaptureEq(&branch), 455 CaptureEq(&branch),
457 IsBranch(IsUint32LessThanOrEqual( 456 IsBranch(IsUint32LessThanOrEqual(
458 value, IsInt32Constant(Smi::kMaxValue)), 457 value, IsInt32Constant(Smi::kMaxValue)),
459 graph()->start()))), 458 graph()->start()))),
460 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); 459 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch))))));
461 } 460 }
462 461
463 } // namespace compiler 462 } // namespace compiler
464 } // namespace internal 463 } // namespace internal
465 } // namespace v8 464 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/value-helper.h ('k') | test/unittests/compiler/graph-unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698