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

Side by Side Diff: test/cctest/compiler/codegen-tester.h

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 | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/function-tester.h » ('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 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/instruction-selector.h" 10 #include "src/compiler/instruction-selector.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 void GenerateCode() { Generate(); } 63 void GenerateCode() { Generate(); }
64 64
65 protected: 65 protected:
66 virtual byte* Generate() { 66 virtual byte* Generate() {
67 if (code_.is_null()) { 67 if (code_.is_null()) {
68 Schedule* schedule = this->Export(); 68 Schedule* schedule = this->Export();
69 CallDescriptor* call_descriptor = this->call_descriptor(); 69 CallDescriptor* call_descriptor = this->call_descriptor();
70 Graph* graph = this->graph(); 70 Graph* graph = this->graph();
71 CompilationInfo info(graph->zone()->isolate(), graph->zone()); 71 code_ =
72 Linkage linkage(graph->zone(), call_descriptor); 72 Pipeline::GenerateCodeForTesting(call_descriptor, graph, schedule);
73 Pipeline pipeline(&info);
74 code_ = pipeline.GenerateCodeForMachineGraph(&linkage, graph, schedule);
75 } 73 }
76 return this->code_.ToHandleChecked()->entry(); 74 return this->code_.ToHandleChecked()->entry();
77 } 75 }
78 76
79 private: 77 private:
80 MaybeHandle<Code> code_; 78 MaybeHandle<Code> code_;
81 }; 79 };
82 80
83 81
84 template <typename ReturnType> 82 template <typename ReturnType>
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 330
333 void Run(RawMachineAssemblerTester<int32_t>* m); 331 void Run(RawMachineAssemblerTester<int32_t>* m);
334 void RunLeft(RawMachineAssemblerTester<int32_t>* m); 332 void RunLeft(RawMachineAssemblerTester<int32_t>* m);
335 void RunRight(RawMachineAssemblerTester<int32_t>* m); 333 void RunRight(RawMachineAssemblerTester<int32_t>* m);
336 }; 334 };
337 } // namespace compiler 335 } // namespace compiler
338 } // namespace internal 336 } // namespace internal
339 } // namespace v8 337 } // namespace v8
340 338
341 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 339 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698