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

Side by Side Diff: test/unittests/compiler/js-type-feedback-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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 25 matching lines...) Expand all
36 protected: 36 protected:
37 Reduction Reduce(Node* node, 37 Reduction Reduce(Node* node,
38 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { 38 JSTypeFeedbackSpecializer::DeoptimizationMode mode) {
39 Handle<GlobalObject> global_object( 39 Handle<GlobalObject> global_object(
40 isolate()->native_context()->global_object(), isolate()); 40 isolate()->native_context()->global_object(), isolate());
41 41
42 MachineOperatorBuilder machine(zone()); 42 MachineOperatorBuilder machine(zone());
43 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 43 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine);
44 JSTypeFeedbackTable table(zone()); 44 JSTypeFeedbackTable table(zone());
45 // TODO(titzer): mock the GraphReducer here for better unit testing. 45 // TODO(titzer): mock the GraphReducer here for better unit testing.
46 GraphReducer graph_reducer(graph(), zone()); 46 GraphReducer graph_reducer(zone(), graph());
47 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr, 47 JSTypeFeedbackSpecializer reducer(&graph_reducer, &jsgraph, &table, nullptr,
48 global_object, mode, &dependencies_); 48 global_object, mode, &dependencies_);
49 return reducer.Reduce(node); 49 return reducer.Reduce(node);
50 } 50 }
51 51
52 Node* EmptyFrameState() { 52 Node* EmptyFrameState() {
53 MachineOperatorBuilder machine(zone()); 53 MachineOperatorBuilder machine(zone());
54 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine); 54 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &machine);
55 return jsgraph.EmptyFrameState(); 55 return jsgraph.EmptyFrameState();
56 } 56 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 IsReturn(load_field_match, load_field_match, graph()->start())); 335 IsReturn(load_field_match, load_field_match, graph()->start()));
336 EXPECT_THAT(graph()->end(), IsEnd(ret)); 336 EXPECT_THAT(graph()->end(), IsEnd(ret));
337 337
338 EXPECT_FALSE(dependencies()->IsEmpty()); 338 EXPECT_FALSE(dependencies()->IsEmpty());
339 dependencies()->Rollback(); 339 dependencies()->Rollback();
340 } 340 }
341 341
342 } // namespace compiler 342 } // namespace compiler
343 } // namespace internal 343 } // namespace internal
344 } // namespace v8 344 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-intrinsic-lowering-unittest.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698