OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_H_ | 5 #ifndef V8_COMPILER_H_ |
6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // TODO(titzer): inline and delete accessors of ParseInfo | 145 // TODO(titzer): inline and delete accessors of ParseInfo |
146 // ----------------------------------------------------------- | 146 // ----------------------------------------------------------- |
147 Handle<Script> script() const; | 147 Handle<Script> script() const; |
148 bool is_eval() const; | 148 bool is_eval() const; |
149 bool is_native() const; | 149 bool is_native() const; |
150 bool is_module() const; | 150 bool is_module() const; |
151 LanguageMode language_mode() const; | 151 LanguageMode language_mode() const; |
152 Handle<JSFunction> closure() const; | 152 Handle<JSFunction> closure() const; |
153 FunctionLiteral* literal() const; | 153 FunctionLiteral* literal() const; |
154 Scope* scope() const; | 154 Scope* scope() const; |
155 bool MayUseThis() const; | |
156 Handle<Context> context() const; | 155 Handle<Context> context() const; |
157 Handle<SharedFunctionInfo> shared_info() const; | 156 Handle<SharedFunctionInfo> shared_info() const; |
158 bool has_shared_info() const; | 157 bool has_shared_info() const; |
159 bool has_context() const; | 158 bool has_context() const; |
160 bool has_literal() const; | 159 bool has_literal() const; |
161 bool has_scope() const; | 160 bool has_scope() const; |
162 // ----------------------------------------------------------- | 161 // ----------------------------------------------------------- |
163 | 162 |
164 Isolate* isolate() const { | 163 Isolate* isolate() const { |
165 return isolate_; | 164 return isolate_; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 // Deoptimization support. | 312 // Deoptimization support. |
314 bool HasDeoptimizationSupport() const { | 313 bool HasDeoptimizationSupport() const { |
315 return GetFlag(kDeoptimizationSupport); | 314 return GetFlag(kDeoptimizationSupport); |
316 } | 315 } |
317 void EnableDeoptimizationSupport() { | 316 void EnableDeoptimizationSupport() { |
318 DCHECK_EQ(BASE, mode_); | 317 DCHECK_EQ(BASE, mode_); |
319 SetFlag(kDeoptimizationSupport); | 318 SetFlag(kDeoptimizationSupport); |
320 } | 319 } |
321 bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); } | 320 bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); } |
322 | 321 |
| 322 bool MustReplaceUndefinedReceiverWithGlobalProxy(); |
| 323 |
323 // Determines whether or not to insert a self-optimization header. | 324 // Determines whether or not to insert a self-optimization header. |
324 bool ShouldSelfOptimize(); | 325 bool ShouldSelfOptimize(); |
325 | 326 |
326 void set_deferred_handles(DeferredHandles* deferred_handles) { | 327 void set_deferred_handles(DeferredHandles* deferred_handles) { |
327 DCHECK(deferred_handles_ == NULL); | 328 DCHECK(deferred_handles_ == NULL); |
328 deferred_handles_ = deferred_handles; | 329 deferred_handles_ = deferred_handles; |
329 } | 330 } |
330 | 331 |
331 void ReopenHandlesInNewHandleScope() { | 332 void ReopenHandlesInNewHandleScope() { |
332 unoptimized_code_ = Handle<Code>(*unoptimized_code_); | 333 unoptimized_code_ = Handle<Code>(*unoptimized_code_); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 Zone zone_; | 702 Zone zone_; |
702 size_t info_zone_start_allocation_size_; | 703 size_t info_zone_start_allocation_size_; |
703 base::ElapsedTimer timer_; | 704 base::ElapsedTimer timer_; |
704 | 705 |
705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 706 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
706 }; | 707 }; |
707 | 708 |
708 } } // namespace v8::internal | 709 } } // namespace v8::internal |
709 | 710 |
710 #endif // V8_COMPILER_H_ | 711 #endif // V8_COMPILER_H_ |
OLD | NEW |