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

Side by Side Diff: src/compiler/pipeline.h

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)
Patch Set: Merging with master Created 4 years 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 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_COMPILER_PIPELINE_H_ 5 #ifndef V8_COMPILER_PIPELINE_H_
6 #define V8_COMPILER_PIPELINE_H_ 6 #define V8_COMPILER_PIPELINE_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/globals.h" 10 #include "src/globals.h"
11 #include "src/objects.h" 11 #include "src/objects.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 class CompilationInfo; 16 class CompilationInfo;
17 class CompilationJob; 17 class CompilationJob;
18 class RegisterConfiguration; 18 class RegisterConfiguration;
19 19
20 namespace trap_handler {
21 struct ProtectedInstructionData;
22 typedef std::vector<ProtectedInstructionData> ProtectedInstructionList;
titzer 2016/11/30 17:31:12 Do you want to use a ZoneVector?
Eric Holk 2016/11/30 20:16:19 Yes. Done.
23 } // namespace trap_handler
24
20 namespace compiler { 25 namespace compiler {
21 26
22 class CallDescriptor; 27 class CallDescriptor;
23 class Graph; 28 class Graph;
24 class InstructionSequence; 29 class InstructionSequence;
25 class Schedule; 30 class Schedule;
26 class SourcePositionTable; 31 class SourcePositionTable;
27 32
28 class Pipeline : public AllStatic { 33 class Pipeline : public AllStatic {
29 public: 34 public:
30 // Returns a new compilation job for the given function. 35 // Returns a new compilation job for the given function.
31 static CompilationJob* NewCompilationJob(Handle<JSFunction> function); 36 static CompilationJob* NewCompilationJob(Handle<JSFunction> function);
32 37
33 // Returns a new compilation job for the WebAssembly compilation info. 38 // Returns a new compilation job for the WebAssembly compilation info.
34 static CompilationJob* NewWasmCompilationJob( 39 static CompilationJob* NewWasmCompilationJob(
35 CompilationInfo* info, Graph* graph, CallDescriptor* descriptor, 40 CompilationInfo* info, Graph* graph, CallDescriptor* descriptor,
36 SourcePositionTable* source_positions); 41 SourcePositionTable* source_positions,
42 trap_handler::ProtectedInstructionList* protected_instructions);
37 43
38 // Run the pipeline on a machine graph and generate code. The {schedule} must 44 // Run the pipeline on a machine graph and generate code. The {schedule} must
39 // be valid, hence the given {graph} does not need to be schedulable. 45 // be valid, hence the given {graph} does not need to be schedulable.
40 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, 46 static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate,
41 CallDescriptor* call_descriptor, 47 CallDescriptor* call_descriptor,
42 Graph* graph, Schedule* schedule, 48 Graph* graph, Schedule* schedule,
43 Code::Flags flags, 49 Code::Flags flags,
44 const char* debug_name); 50 const char* debug_name);
45 51
46 // Run the entire pipeline and generate a handle to a code object suitable for 52 // Run the entire pipeline and generate a handle to a code object suitable for
(...skipping 20 matching lines...) Expand all
67 73
68 private: 74 private:
69 DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline); 75 DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline);
70 }; 76 };
71 77
72 } // namespace compiler 78 } // namespace compiler
73 } // namespace internal 79 } // namespace internal
74 } // namespace v8 80 } // namespace v8
75 81
76 #endif // V8_COMPILER_PIPELINE_H_ 82 #endif // V8_COMPILER_PIPELINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698