| 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a | 617 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a |
| 618 // real function with a context. | 618 // real function with a context. |
| 619 | 619 |
| 620 class Compiler : public AllStatic { | 620 class Compiler : public AllStatic { |
| 621 public: | 621 public: |
| 622 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode( | 622 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode( |
| 623 Handle<JSFunction> function); | 623 Handle<JSFunction> function); |
| 624 MUST_USE_RESULT static MaybeHandle<Code> GetLazyCode( | 624 MUST_USE_RESULT static MaybeHandle<Code> GetLazyCode( |
| 625 Handle<JSFunction> function); | 625 Handle<JSFunction> function); |
| 626 | 626 |
| 627 MUST_USE_RESULT static MaybeHandle<Code> GetDebugCode( | 627 static bool CompileDebugCode(Handle<JSFunction> function); |
| 628 Handle<JSFunction> function); | 628 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
| 629 MUST_USE_RESULT static MaybeHandle<Code> GetDebugCode( | |
| 630 Handle<SharedFunctionInfo> shared); | |
| 631 | 629 |
| 632 // Parser::Parse, then Compiler::Analyze. | 630 // Parser::Parse, then Compiler::Analyze. |
| 633 static bool ParseAndAnalyze(ParseInfo* info); | 631 static bool ParseAndAnalyze(ParseInfo* info); |
| 634 // Rewrite, analyze scopes, and renumber. | 632 // Rewrite, analyze scopes, and renumber. |
| 635 static bool Analyze(ParseInfo* info); | 633 static bool Analyze(ParseInfo* info); |
| 636 // Adds deoptimization support, requires ParseAndAnalyze. | 634 // Adds deoptimization support, requires ParseAndAnalyze. |
| 637 static bool EnsureDeoptimizationSupport(CompilationInfo* info); | 635 static bool EnsureDeoptimizationSupport(CompilationInfo* info); |
| 638 | 636 |
| 639 static bool EnsureCompiled(Handle<JSFunction> function, | 637 static bool EnsureCompiled(Handle<JSFunction> function, |
| 640 ClearExceptionFlag flag); | 638 ClearExceptionFlag flag); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 Zone zone_; | 699 Zone zone_; |
| 702 size_t info_zone_start_allocation_size_; | 700 size_t info_zone_start_allocation_size_; |
| 703 base::ElapsedTimer timer_; | 701 base::ElapsedTimer timer_; |
| 704 | 702 |
| 705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 703 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 706 }; | 704 }; |
| 707 | 705 |
| 708 } } // namespace v8::internal | 706 } } // namespace v8::internal |
| 709 | 707 |
| 710 #endif // V8_COMPILER_H_ | 708 #endif // V8_COMPILER_H_ |
| OLD | NEW |