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

Side by Side Diff: test/cctest/compiler/graph-builder-tester.cc

Issue 727373002: [turbofan] add ForTesting to pipeline entry points that are for testing only. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 1 month 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/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-codegen-deopt.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 "test/cctest/compiler/graph-builder-tester.h" 5 #include "test/cctest/compiler/graph-builder-tester.h"
6 6
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/pipeline.h" 8 #include "src/compiler/pipeline.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 17 matching lines...) Expand all
28 parameters_[i] = builder->NewNode(common->Parameter(i), graph_->start()); 28 parameters_[i] = builder->NewNode(common->Parameter(i), graph_->start());
29 } 29 }
30 } 30 }
31 31
32 32
33 byte* MachineCallHelper::Generate() { 33 byte* MachineCallHelper::Generate() {
34 DCHECK(parameter_count() == 0 || parameters_ != NULL); 34 DCHECK(parameter_count() == 0 || parameters_ != NULL);
35 if (!Pipeline::SupportedBackend()) return NULL; 35 if (!Pipeline::SupportedBackend()) return NULL;
36 if (code_.is_null()) { 36 if (code_.is_null()) {
37 Zone* zone = graph_->zone(); 37 Zone* zone = graph_->zone();
38 CompilationInfo info(zone->isolate(), zone); 38 CallDescriptor* desc =
39 Linkage linkage(zone, 39 Linkage::GetSimplifiedCDescriptor(zone, machine_sig_);
40 Linkage::GetSimplifiedCDescriptor(zone, machine_sig_)); 40 code_ = Pipeline::GenerateCodeForTesting(desc, graph_);
41 Pipeline pipeline(&info);
42 code_ = pipeline.GenerateCodeForMachineGraph(&linkage, graph_);
43 } 41 }
44 return code_.ToHandleChecked()->entry(); 42 return code_.ToHandleChecked()->entry();
45 } 43 }
46 44
47 45
48 Node* MachineCallHelper::Parameter(size_t index) { 46 Node* MachineCallHelper::Parameter(size_t index) {
49 DCHECK_NE(NULL, parameters_); 47 DCHECK_NE(NULL, parameters_);
50 DCHECK(index < parameter_count()); 48 DCHECK(index < parameter_count());
51 return parameters_[index]; 49 return parameters_[index];
52 } 50 }
53 51
54 } // namespace compiler 52 } // namespace compiler
55 } // namespace internal 53 } // namespace internal
56 } // namespace v8 54 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-codegen-deopt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698