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

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

Issue 1410003002: [turbofan] Remove locally constructed simplified builders. (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
« no previous file with comments | « test/unittests/compiler/js-type-feedback-unittest.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 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-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 74
75 class JSTypedLoweringTest : public TypedGraphTest { 75 class JSTypedLoweringTest : public TypedGraphTest {
76 public: 76 public:
77 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {} 77 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {}
78 ~JSTypedLoweringTest() override {} 78 ~JSTypedLoweringTest() override {}
79 79
80 protected: 80 protected:
81 Reduction Reduce(Node* node) { 81 Reduction Reduce(Node* node) {
82 MachineOperatorBuilder machine(zone()); 82 MachineOperatorBuilder machine(zone());
83 JSGraph jsgraph(isolate(), graph(), common(), javascript(), nullptr, 83 SimplifiedOperatorBuilder simplified(zone());
84 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified,
84 &machine); 85 &machine);
85 // TODO(titzer): mock the GraphReducer here for better unit testing. 86 // TODO(titzer): mock the GraphReducer here for better unit testing.
86 GraphReducer graph_reducer(zone(), graph()); 87 GraphReducer graph_reducer(zone(), graph());
87 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone()); 88 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone());
88 return reducer.Reduce(node); 89 return reducer.Reduce(node);
89 } 90 }
90 91
91 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { 92 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) {
92 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); 93 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer();
93 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length); 94 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length);
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 EXPECT_THAT(r.replacement(), 1108 EXPECT_THAT(r.replacement(),
1108 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( 1109 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
1109 Context::MIN_CONTEXT_SLOTS)), 1110 Context::MIN_CONTEXT_SLOTS)),
1110 IsBeginRegion(effect), control), 1111 IsBeginRegion(effect), control),
1111 _)); 1112 _));
1112 } 1113 }
1113 1114
1114 } // namespace compiler 1115 } // namespace compiler
1115 } // namespace internal 1116 } // namespace internal
1116 } // namespace v8 1117 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-type-feedback-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698