| 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 Handle<Object> source_map_url, Handle<Context> context, | 631 Handle<Object> source_map_url, Handle<Context> context, |
| 632 v8::Extension* extension, ScriptData** cached_data, | 632 v8::Extension* extension, ScriptData** cached_data, |
| 633 ScriptCompiler::CompileOptions compile_options, | 633 ScriptCompiler::CompileOptions compile_options, |
| 634 NativesFlag is_natives_code, bool is_module); | 634 NativesFlag is_natives_code, bool is_module); |
| 635 | 635 |
| 636 static Handle<SharedFunctionInfo> CompileStreamedScript(Handle<Script> script, | 636 static Handle<SharedFunctionInfo> CompileStreamedScript(Handle<Script> script, |
| 637 ParseInfo* info, | 637 ParseInfo* info, |
| 638 int source_length); | 638 int source_length); |
| 639 | 639 |
| 640 // Create a shared function info object (the code may be lazily compiled). | 640 // Create a shared function info object (the code may be lazily compiled). |
| 641 static Handle<SharedFunctionInfo> BuildFunctionInfo(FunctionLiteral* node, | 641 static Handle<SharedFunctionInfo> GetSharedFunctionInfo( |
| 642 Handle<Script> script, | 642 FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer); |
| 643 CompilationInfo* outer); | |
| 644 | 643 |
| 645 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; | 644 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; |
| 646 | 645 |
| 647 // Generate and return optimized code or start a concurrent optimization job. | 646 // Generate and return optimized code or start a concurrent optimization job. |
| 648 // In the latter case, return the InOptimizationQueue builtin. On failure, | 647 // In the latter case, return the InOptimizationQueue builtin. On failure, |
| 649 // return the empty handle. | 648 // return the empty handle. |
| 650 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( | 649 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( |
| 651 Handle<JSFunction> function, | 650 Handle<JSFunction> function, |
| 652 Handle<Code> current_code, | 651 Handle<Code> current_code, |
| 653 ConcurrencyMode mode, | 652 ConcurrencyMode mode, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 682 Zone zone_; | 681 Zone zone_; |
| 683 size_t info_zone_start_allocation_size_; | 682 size_t info_zone_start_allocation_size_; |
| 684 base::ElapsedTimer timer_; | 683 base::ElapsedTimer timer_; |
| 685 | 684 |
| 686 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 685 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 687 }; | 686 }; |
| 688 | 687 |
| 689 } } // namespace v8::internal | 688 } } // namespace v8::internal |
| 690 | 689 |
| 691 #endif // V8_COMPILER_H_ | 690 #endif // V8_COMPILER_H_ |
| OLD | NEW |