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