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

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

Issue 1409993002: [turbofan] Move SimplifiedOperatorBuilder into JSGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
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 18 matching lines...) Expand all
29 29
30 virtual MachineType WordRepresentation() const = 0; 30 virtual MachineType WordRepresentation() const = 0;
31 31
32 protected: 32 protected:
33 bool Is32() const { return WordRepresentation() == kRepWord32; } 33 bool Is32() const { return WordRepresentation() == kRepWord32; }
34 bool Is64() const { return WordRepresentation() == kRepWord64; } 34 bool Is64() const { return WordRepresentation() == kRepWord64; }
35 35
36 Reduction Reduce(Node* node) { 36 Reduction Reduce(Node* node) {
37 MachineOperatorBuilder machine(zone(), WordRepresentation()); 37 MachineOperatorBuilder machine(zone(), WordRepresentation());
38 JSOperatorBuilder javascript(zone()); 38 JSOperatorBuilder javascript(zone());
39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, &machine); 39 JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr,
40 &machine);
40 ChangeLowering reducer(&jsgraph); 41 ChangeLowering reducer(&jsgraph);
41 return reducer.Reduce(node); 42 return reducer.Reduce(node);
42 } 43 }
43 44
44 SimplifiedOperatorBuilder* simplified() { return &simplified_; } 45 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
45 46
46 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, 47 Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher,
47 const Matcher<Node*>& control_matcher) { 48 const Matcher<Node*>& control_matcher) {
48 return IsCall( 49 return IsCall(
49 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), 50 _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()),
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 CaptureEq(&branch), 460 CaptureEq(&branch),
460 IsBranch(IsUint32LessThanOrEqual( 461 IsBranch(IsUint32LessThanOrEqual(
461 value, IsInt32Constant(Smi::kMaxValue)), 462 value, IsInt32Constant(Smi::kMaxValue)),
462 graph()->start()))), 463 graph()->start()))),
463 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch)))))); 464 AllOf(CaptureEq(&if_false), IsIfFalse(CaptureEq(&branch))))));
464 } 465 }
465 466
466 } // namespace compiler 467 } // namespace compiler
467 } // namespace internal 468 } // namespace internal
468 } // namespace v8 469 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/bytecode-graph-builder-unittest.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698