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/zone.h" | 10 #include "src/zone.h" |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 // of the source code. | 652 // of the source code. |
653 | 653 |
654 // Please note this interface returns shared function infos. This means you | 654 // Please note this interface returns shared function infos. This means you |
655 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a | 655 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a |
656 // real function with a context. | 656 // real function with a context. |
657 | 657 |
658 class Compiler : public AllStatic { | 658 class Compiler : public AllStatic { |
659 public: | 659 public: |
660 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode( | 660 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode( |
661 Handle<JSFunction> function); | 661 Handle<JSFunction> function); |
| 662 MUST_USE_RESULT static MaybeHandle<Code> GetLazyCode( |
| 663 Handle<JSFunction> function); |
662 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode( | 664 MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCode( |
663 Handle<SharedFunctionInfo> shared); | 665 Handle<SharedFunctionInfo> shared); |
664 static bool EnsureCompiled(Handle<JSFunction> function, | 666 static bool EnsureCompiled(Handle<JSFunction> function, |
665 ClearExceptionFlag flag); | 667 ClearExceptionFlag flag); |
666 MUST_USE_RESULT static MaybeHandle<Code> GetCodeForDebugging( | 668 MUST_USE_RESULT static MaybeHandle<Code> GetDebugCode( |
667 Handle<JSFunction> function); | 669 Handle<JSFunction> function); |
668 | 670 |
669 static void CompileForLiveEdit(Handle<Script> script); | 671 static void CompileForLiveEdit(Handle<Script> script); |
670 | 672 |
671 // Compile a String source within a context for eval. | 673 // Compile a String source within a context for eval. |
672 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( | 674 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( |
673 Handle<String> source, | 675 Handle<String> source, |
674 Handle<Context> context, | 676 Handle<Context> context, |
675 StrictMode strict_mode, | 677 StrictMode strict_mode, |
676 ParseRestriction restriction, | 678 ParseRestriction restriction, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 Zone zone_; | 737 Zone zone_; |
736 unsigned info_zone_start_allocation_size_; | 738 unsigned info_zone_start_allocation_size_; |
737 base::ElapsedTimer timer_; | 739 base::ElapsedTimer timer_; |
738 | 740 |
739 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 741 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
740 }; | 742 }; |
741 | 743 |
742 } } // namespace v8::internal | 744 } } // namespace v8::internal |
743 | 745 |
744 #endif // V8_COMPILER_H_ | 746 #endif // V8_COMPILER_H_ |
OLD | NEW |