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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 | 686 |
687 // Compile a String source within a context. | 687 // Compile a String source within a context. |
688 static Handle<SharedFunctionInfo> CompileScript( | 688 static Handle<SharedFunctionInfo> CompileScript( |
689 Handle<String> source, Handle<Object> script_name, int line_offset, | 689 Handle<String> source, Handle<Object> script_name, int line_offset, |
690 int column_offset, bool is_shared_cross_origin, Handle<Context> context, | 690 int column_offset, bool is_shared_cross_origin, Handle<Context> context, |
691 v8::Extension* extension, ScriptData** cached_data, | 691 v8::Extension* extension, ScriptData** cached_data, |
692 ScriptCompiler::CompileOptions compile_options, | 692 ScriptCompiler::CompileOptions compile_options, |
693 NativesFlag is_natives_code); | 693 NativesFlag is_natives_code); |
694 | 694 |
695 // Create a shared function info object (the code may be lazily compiled). | 695 // Create a shared function info object (the code may be lazily compiled). |
696 static Handle<SharedFunctionInfo> BuildFunctionInfo(FunctionLiteral* node, | 696 static Handle<SharedFunctionInfo> BuildFunctionInfo( |
697 Handle<Script> script); | 697 FunctionLiteral* node, Handle<Script> script, |
| 698 CompilationInfo* outer = NULL); |
698 | 699 |
699 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; | 700 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; |
700 | 701 |
701 // Generate and return optimized code or start a concurrent optimization job. | 702 // Generate and return optimized code or start a concurrent optimization job. |
702 // In the latter case, return the InOptimizationQueue builtin. On failure, | 703 // In the latter case, return the InOptimizationQueue builtin. On failure, |
703 // return the empty handle. | 704 // return the empty handle. |
704 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( | 705 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( |
705 Handle<JSFunction> function, | 706 Handle<JSFunction> function, |
706 Handle<Code> current_code, | 707 Handle<Code> current_code, |
707 ConcurrencyMode mode, | 708 ConcurrencyMode mode, |
(...skipping 28 matching lines...) Expand all Loading... |
736 Zone zone_; | 737 Zone zone_; |
737 unsigned info_zone_start_allocation_size_; | 738 unsigned info_zone_start_allocation_size_; |
738 base::ElapsedTimer timer_; | 739 base::ElapsedTimer timer_; |
739 | 740 |
740 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 741 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
741 }; | 742 }; |
742 | 743 |
743 } } // namespace v8::internal | 744 } } // namespace v8::internal |
744 | 745 |
745 #endif // V8_COMPILER_H_ | 746 #endif // V8_COMPILER_H_ |
OLD | NEW |