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/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 NativesFlag is_natives_code, bool is_module); | 614 NativesFlag is_natives_code, bool is_module); |
615 | 615 |
616 static Handle<SharedFunctionInfo> CompileStreamedScript(Handle<Script> script, | 616 static Handle<SharedFunctionInfo> CompileStreamedScript(Handle<Script> script, |
617 ParseInfo* info, | 617 ParseInfo* info, |
618 int source_length); | 618 int source_length); |
619 | 619 |
620 // Create a shared function info object (the code may be lazily compiled). | 620 // Create a shared function info object (the code may be lazily compiled). |
621 static Handle<SharedFunctionInfo> GetSharedFunctionInfo( | 621 static Handle<SharedFunctionInfo> GetSharedFunctionInfo( |
622 FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer); | 622 FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer); |
623 | 623 |
| 624 // Create a shared function info object for a native function literal. |
| 625 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForNative( |
| 626 v8::Extension* extension, Handle<String> name); |
| 627 |
624 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; | 628 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; |
625 | 629 |
626 // Generate and return optimized code or start a concurrent optimization job. | 630 // Generate and return optimized code or start a concurrent optimization job. |
627 // In the latter case, return the InOptimizationQueue builtin. On failure, | 631 // In the latter case, return the InOptimizationQueue builtin. On failure, |
628 // return the empty handle. | 632 // return the empty handle. |
629 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( | 633 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( |
630 Handle<JSFunction> function, ConcurrencyMode mode, | 634 Handle<JSFunction> function, ConcurrencyMode mode, |
631 BailoutId osr_ast_id = BailoutId::None(), | 635 BailoutId osr_ast_id = BailoutId::None(), |
632 JavaScriptFrame* osr_frame = nullptr); | 636 JavaScriptFrame* osr_frame = nullptr); |
633 | 637 |
(...skipping 23 matching lines...) Expand all Loading... |
657 size_t info_zone_start_allocation_size_; | 661 size_t info_zone_start_allocation_size_; |
658 base::ElapsedTimer timer_; | 662 base::ElapsedTimer timer_; |
659 | 663 |
660 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 664 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
661 }; | 665 }; |
662 | 666 |
663 } // namespace internal | 667 } // namespace internal |
664 } // namespace v8 | 668 } // namespace v8 |
665 | 669 |
666 #endif // V8_COMPILER_H_ | 670 #endif // V8_COMPILER_H_ |
OLD | NEW |