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

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

Issue 1168693002: [turbofan] Allow ReplaceWithValue to kill control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 6 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 class JSTypedLoweringTest : public TypedGraphTest { 74 class JSTypedLoweringTest : public TypedGraphTest {
75 public: 75 public:
76 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {} 76 JSTypedLoweringTest() : TypedGraphTest(3), javascript_(zone()) {}
77 ~JSTypedLoweringTest() override {} 77 ~JSTypedLoweringTest() override {}
78 78
79 protected: 79 protected:
80 Reduction Reduce(Node* node) { 80 Reduction Reduce(Node* node) {
81 MachineOperatorBuilder machine(zone()); 81 MachineOperatorBuilder machine(zone());
82 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 82 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine);
83 // TODO(titzer): mock the GraphReducer here for better unit testing. 83 // TODO(titzer): mock the GraphReducer here for better unit testing.
84 GraphReducer graph_reducer(graph(), zone()); 84 GraphReducer graph_reducer(zone(), graph());
85 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone()); 85 JSTypedLowering reducer(&graph_reducer, &jsgraph, zone());
86 return reducer.Reduce(node); 86 return reducer.Reduce(node);
87 } 87 }
88 88
89 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) { 89 Handle<JSArrayBuffer> NewArrayBuffer(void* bytes, size_t byte_length) {
90 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer(); 90 Handle<JSArrayBuffer> buffer = factory()->NewJSArrayBuffer();
91 Runtime::SetupArrayBuffer(isolate(), buffer, true, bytes, byte_length); 91 Runtime::SetupArrayBuffer(isolate(), buffer, true, bytes, byte_length);
92 return buffer; 92 return buffer;
93 } 93 }
94 94
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 EXPECT_THAT(r.replacement(), 1053 EXPECT_THAT(r.replacement(),
1054 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( 1054 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor(
1055 Context::MIN_CONTEXT_SLOTS)), 1055 Context::MIN_CONTEXT_SLOTS)),
1056 effect, control), 1056 effect, control),
1057 _)); 1057 _));
1058 } 1058 }
1059 1059
1060 } // namespace compiler 1060 } // namespace compiler
1061 } // namespace internal 1061 } // namespace internal
1062 } // namespace v8 1062 } // 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