OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_COMPILATION_INFO_H_ | 5 #ifndef V8_COMPILATION_INFO_H_ |
6 #define V8_COMPILATION_INFO_H_ | 6 #define V8_COMPILATION_INFO_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/compilation-dependencies.h" | 10 #include "src/compilation-dependencies.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 ~CompilationInfo(); | 61 ~CompilationInfo(); |
62 | 62 |
63 ParseInfo* parse_info() const { return parse_info_; } | 63 ParseInfo* parse_info() const { return parse_info_; } |
64 | 64 |
65 // ----------------------------------------------------------- | 65 // ----------------------------------------------------------- |
66 // TODO(titzer): inline and delete accessors of ParseInfo | 66 // TODO(titzer): inline and delete accessors of ParseInfo |
67 // ----------------------------------------------------------- | 67 // ----------------------------------------------------------- |
68 Handle<Script> script() const; | 68 Handle<Script> script() const; |
69 FunctionLiteral* literal() const; | 69 FunctionLiteral* literal() const; |
70 DeclarationScope* scope() const; | 70 DeclarationScope* scope() const; |
71 Handle<Context> context() const; | |
72 Handle<SharedFunctionInfo> shared_info() const; | 71 Handle<SharedFunctionInfo> shared_info() const; |
73 bool has_shared_info() const; | 72 bool has_shared_info() const; |
74 // ----------------------------------------------------------- | 73 // ----------------------------------------------------------- |
75 | 74 |
76 Isolate* isolate() const { return isolate_; } | 75 Isolate* isolate() const { return isolate_; } |
77 Zone* zone() { return zone_; } | 76 Zone* zone() { return zone_; } |
78 bool is_osr() const { return !osr_ast_id_.IsNone(); } | 77 bool is_osr() const { return !osr_ast_id_.IsNone(); } |
79 Handle<JSFunction> closure() const { return closure_; } | 78 Handle<JSFunction> closure() const { return closure_; } |
80 Handle<Code> code() const { return code_; } | 79 Handle<Code> code() const { return code_; } |
81 Code::Flags code_flags() const { return code_flags_; } | 80 Code::Flags code_flags() const { return code_flags_; } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 210 |
212 void SetBytecodeArray(Handle<BytecodeArray> bytecode_array) { | 211 void SetBytecodeArray(Handle<BytecodeArray> bytecode_array) { |
213 bytecode_array_ = bytecode_array; | 212 bytecode_array_ = bytecode_array; |
214 } | 213 } |
215 | 214 |
216 bool ShouldTrapOnDeopt() const { | 215 bool ShouldTrapOnDeopt() const { |
217 return (FLAG_trap_on_deopt && IsOptimizing()) || | 216 return (FLAG_trap_on_deopt && IsOptimizing()) || |
218 (FLAG_trap_on_stub_deopt && IsStub()); | 217 (FLAG_trap_on_stub_deopt && IsStub()); |
219 } | 218 } |
220 | 219 |
| 220 bool has_context() const; |
| 221 Context* context() const; |
| 222 |
221 bool has_native_context() const; | 223 bool has_native_context() const; |
222 Context* native_context() const; | 224 Context* native_context() const; |
223 | 225 |
224 bool has_global_object() const; | 226 bool has_global_object() const; |
225 JSGlobalObject* global_object() const; | 227 JSGlobalObject* global_object() const; |
226 | 228 |
227 // Accessors for the different compilation modes. | 229 // Accessors for the different compilation modes. |
228 bool IsOptimizing() const { return mode_ == OPTIMIZE; } | 230 bool IsOptimizing() const { return mode_ == OPTIMIZE; } |
229 bool IsStub() const { return mode_ == STUB; } | 231 bool IsStub() const { return mode_ == STUB; } |
230 void SetOptimizing(); | 232 void SetOptimizing(); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 395 |
394 Vector<const char> debug_name_; | 396 Vector<const char> debug_name_; |
395 | 397 |
396 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); | 398 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); |
397 }; | 399 }; |
398 | 400 |
399 } // namespace internal | 401 } // namespace internal |
400 } // namespace v8 | 402 } // namespace v8 |
401 | 403 |
402 #endif // V8_COMPILATION_INFO_H_ | 404 #endif // V8_COMPILATION_INFO_H_ |
OLD | NEW |