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

Side by Side Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 1951853002: [turbofan] Inline the allocation fast path. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/change-lowering-unittest.cc » ('j') | 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 <limits> 5 #include <limits>
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/change-lowering.h" 9 #include "src/compiler/change-lowering.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void LowerAllNodesAndLowerChanges() { 60 void LowerAllNodesAndLowerChanges() {
61 this->End(); 61 this->End();
62 typer.Run(); 62 typer.Run();
63 lowering.LowerAllNodes(); 63 lowering.LowerAllNodes();
64 64
65 Schedule* schedule = Scheduler::ComputeSchedule(this->zone(), this->graph(), 65 Schedule* schedule = Scheduler::ComputeSchedule(this->zone(), this->graph(),
66 Scheduler::kNoFlags); 66 Scheduler::kNoFlags);
67 EffectControlLinearizer linearizer(&jsgraph, schedule, this->zone()); 67 EffectControlLinearizer linearizer(&jsgraph, schedule, this->zone());
68 linearizer.Run(); 68 linearizer.Run();
69 69
70 ChangeLowering lowering(&jsgraph);
71 GraphReducer reducer(this->zone(), this->graph()); 70 GraphReducer reducer(this->zone(), this->graph());
71 ChangeLowering lowering(&reducer, &jsgraph);
72 reducer.AddReducer(&lowering); 72 reducer.AddReducer(&lowering);
73 reducer.ReduceGraph(); 73 reducer.ReduceGraph();
74 Verifier::Run(this->graph()); 74 Verifier::Run(this->graph());
75 } 75 }
76 76
77 void CheckNumberCall(double expected, double input) { 77 void CheckNumberCall(double expected, double input) {
78 // TODO(titzer): make calls to NewNumber work in cctests. 78 // TODO(titzer): make calls to NewNumber work in cctests.
79 if (expected <= Smi::kMinValue) return; 79 if (expected <= Smi::kMinValue) return;
80 if (expected >= Smi::kMaxValue) return; 80 if (expected >= Smi::kMaxValue) return;
81 Handle<Object> num = factory()->NewNumber(input); 81 Handle<Object> num = factory()->NewNumber(input);
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 731
732 void LowerAllNodesAndLowerChanges() { 732 void LowerAllNodesAndLowerChanges() {
733 SourcePositionTable table(jsgraph.graph()); 733 SourcePositionTable table(jsgraph.graph());
734 SimplifiedLowering(&jsgraph, jsgraph.zone(), &table).LowerAllNodes(); 734 SimplifiedLowering(&jsgraph, jsgraph.zone(), &table).LowerAllNodes();
735 735
736 Schedule* schedule = Scheduler::ComputeSchedule(this->zone(), this->graph(), 736 Schedule* schedule = Scheduler::ComputeSchedule(this->zone(), this->graph(),
737 Scheduler::kNoFlags); 737 Scheduler::kNoFlags);
738 EffectControlLinearizer linearizer(&jsgraph, schedule, this->zone()); 738 EffectControlLinearizer linearizer(&jsgraph, schedule, this->zone());
739 linearizer.Run(); 739 linearizer.Run();
740 740
741 ChangeLowering lowering(&jsgraph);
742 GraphReducer reducer(this->zone(), this->graph()); 741 GraphReducer reducer(this->zone(), this->graph());
742 ChangeLowering lowering(&reducer, &jsgraph);
743 reducer.AddReducer(&lowering); 743 reducer.AddReducer(&lowering);
744 reducer.ReduceGraph(); 744 reducer.ReduceGraph();
745 Verifier::Run(this->graph()); 745 Verifier::Run(this->graph());
746 } 746 }
747 747
748 // Inserts the node as the return value of the graph. 748 // Inserts the node as the return value of the graph.
749 Node* Return(Node* node) { 749 Node* Return(Node* node) {
750 ret->ReplaceInput(0, node); 750 ret->ReplaceInput(0, node);
751 return node; 751 return node;
752 } 752 }
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 t.Return(use); 1939 t.Return(use);
1940 t.Lower(); 1940 t.Lower();
1941 1941
1942 CHECK_EQ(d.expected, PhiRepresentationOf(phi->op())); 1942 CHECK_EQ(d.expected, PhiRepresentationOf(phi->op()));
1943 } 1943 }
1944 } 1944 }
1945 1945
1946 } // namespace compiler 1946 } // namespace compiler
1947 } // namespace internal 1947 } // namespace internal
1948 } // namespace v8 1948 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/change-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698