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

Side by Side Diff: test/unittests/compiler/js-typed-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-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(), &machine); 83 JSGraph jsgraph(isolate(), graph(), common(), javascript(), nullptr,
84 &machine);
84 // TODO(titzer): mock the GraphReducer here for better unit testing. 85 // TODO(titzer): mock the GraphReducer here for better unit testing.
85 GraphReducer graph_reducer(zone(), graph()); 86 GraphReducer graph_reducer(zone(), graph());
86 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone()); 87 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone());
87 return reducer.Reduce(node); 88 return reducer.Reduce(node);
88 } 89 }
89 90
90 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { 91 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) {
91 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); 92 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer();
92 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length); 93 JSArrayBuffer::Setup(buffer, isolate(), true, bytes, byte_length);
93 return buffer; 94 return buffer;
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 EXPECT_THAT(r.replacement(), 1107 EXPECT_THAT(r.replacement(),
1107 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( 1108 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
1108 Context::MIN_CONTEXT_SLOTS)), 1109 Context::MIN_CONTEXT_SLOTS)),
1109 IsBeginRegion(effect), control), 1110 IsBeginRegion(effect), control),
1110 _)); 1111 _));
1111 } 1112 }
1112 1113
1113 } // namespace compiler 1114 } // namespace compiler
1114 } // namespace internal 1115 } // namespace internal
1115 } // namespace v8 1116 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-type-feedback-unittest.cc ('k') | test/unittests/compiler/liveness-analyzer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698