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

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

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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/cctest/cctest.h ('k') | test/cctest/compiler/graph-builder-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 14 matching lines...) Expand all
25 MachineAssemblerTester(MachineType return_type, MachineType p0, 25 MachineAssemblerTester(MachineType return_type, MachineType p0,
26 MachineType p1, MachineType p2, MachineType p3, 26 MachineType p1, MachineType p2, MachineType p3,
27 MachineType p4, 27 MachineType p4,
28 MachineOperatorBuilder::Flags flags = 28 MachineOperatorBuilder::Flags flags =
29 MachineOperatorBuilder::Flag::kNoFlags) 29 MachineOperatorBuilder::Flag::kNoFlags)
30 : HandleAndZoneScope(), 30 : HandleAndZoneScope(),
31 CallHelper( 31 CallHelper(
32 main_isolate(), 32 main_isolate(),
33 MakeMachineSignature(main_zone(), return_type, p0, p1, p2, p3, p4)), 33 MakeMachineSignature(main_zone(), return_type, p0, p1, p2, p3, p4)),
34 MachineAssembler( 34 MachineAssembler(
35 new (main_zone()) Graph(main_zone()), 35 main_isolate(), new (main_zone()) Graph(main_zone()),
36 MakeMachineSignature(main_zone(), return_type, p0, p1, p2, p3, p4), 36 MakeMachineSignature(main_zone(), return_type, p0, p1, p2, p3, p4),
37 kMachPtr, flags) {} 37 kMachPtr, flags) {}
38 38
39 Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) { 39 Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) {
40 return this->Load(rep, this->PointerConstant(address), 40 return this->Load(rep, this->PointerConstant(address),
41 this->Int32Constant(offset)); 41 this->Int32Constant(offset));
42 } 42 }
43 43
44 void StoreToPointer(void* address, MachineType rep, Node* node) { 44 void StoreToPointer(void* address, MachineType rep, Node* node) {
45 this->Store(rep, this->PointerConstant(address), node); 45 this->Store(rep, this->PointerConstant(address), node);
(...skipping 15 matching lines...) Expand all
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 code_ = 71 code_ = Pipeline::GenerateCodeForTesting(this->isolate(), call_descriptor,
72 Pipeline::GenerateCodeForTesting(call_descriptor, graph, schedule); 72 graph, schedule);
73 } 73 }
74 return this->code_.ToHandleChecked()->entry(); 74 return this->code_.ToHandleChecked()->entry();
75 } 75 }
76 76
77 private: 77 private:
78 MaybeHandle<Code> code_; 78 MaybeHandle<Code> code_;
79 }; 79 };
80 80
81 81
82 template <typename ReturnType> 82 template <typename ReturnType>
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 void Run(RawMachineAssemblerTester<int32_t>* m); 331 void Run(RawMachineAssemblerTester<int32_t>* m);
332 void RunLeft(RawMachineAssemblerTester<int32_t>* m); 332 void RunLeft(RawMachineAssemblerTester<int32_t>* m);
333 void RunRight(RawMachineAssemblerTester<int32_t>* m); 333 void RunRight(RawMachineAssemblerTester<int32_t>* m);
334 }; 334 };
335 } // namespace compiler 335 } // namespace compiler
336 } // namespace internal 336 } // namespace internal
337 } // namespace v8 337 } // namespace v8
338 338
339 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ 339 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_
OLDNEW
« no previous file with comments | « test/cctest/cctest.h ('k') | test/cctest/compiler/graph-builder-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698