| 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // general contract is that failures will be reported by returning {false}, | 591 // general contract is that failures will be reported by returning {false}, |
| 592 // whereas successful compilation ensures the {is_compiled} predicate on the | 592 // whereas successful compilation ensures the {is_compiled} predicate on the |
| 593 // given function holds. | 593 // given function holds. |
| 594 | 594 |
| 595 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); | 595 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); |
| 596 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); | 596 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); |
| 597 static bool CompileDebugCode(Handle<JSFunction> function); | 597 static bool CompileDebugCode(Handle<JSFunction> function); |
| 598 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); | 598 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
| 599 static void CompileForLiveEdit(Handle<Script> script); | 599 static void CompileForLiveEdit(Handle<Script> script); |
| 600 | 600 |
| 601 // Give the compiler a chance to perform low-latency initialization tasks of |
| 602 // the given {function} on its instantiation. Note that only the runtime will |
| 603 // offer this chance, optimized closure instantiation will not call this. |
| 604 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag); |
| 605 |
| 601 // Parser::Parse, then Compiler::Analyze. | 606 // Parser::Parse, then Compiler::Analyze. |
| 602 static bool ParseAndAnalyze(ParseInfo* info); | 607 static bool ParseAndAnalyze(ParseInfo* info); |
| 603 // Rewrite, analyze scopes, and renumber. | 608 // Rewrite, analyze scopes, and renumber. |
| 604 static bool Analyze(ParseInfo* info); | 609 static bool Analyze(ParseInfo* info); |
| 605 // Adds deoptimization support, requires ParseAndAnalyze. | 610 // Adds deoptimization support, requires ParseAndAnalyze. |
| 606 static bool EnsureDeoptimizationSupport(CompilationInfo* info); | 611 static bool EnsureDeoptimizationSupport(CompilationInfo* info); |
| 607 | 612 |
| 608 // =========================================================================== | 613 // =========================================================================== |
| 609 // The following family of methods instantiates new functions for script or | 614 // The following family of methods instantiates new functions for script or |
| 610 // function literals. The decision whether those functions have been compiled | 615 // function literals. The decision whether those functions have been compiled |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 // Generate and return code from previously queued optimization job. | 665 // Generate and return code from previously queued optimization job. |
| 661 // On failure, return the empty handle. | 666 // On failure, return the empty handle. |
| 662 MUST_USE_RESULT static MaybeHandle<Code> GetConcurrentlyOptimizedCode( | 667 MUST_USE_RESULT static MaybeHandle<Code> GetConcurrentlyOptimizedCode( |
| 663 OptimizedCompileJob* job); | 668 OptimizedCompileJob* job); |
| 664 }; | 669 }; |
| 665 | 670 |
| 666 } // namespace internal | 671 } // namespace internal |
| 667 } // namespace v8 | 672 } // namespace v8 |
| 668 | 673 |
| 669 #endif // V8_COMPILER_H_ | 674 #endif // V8_COMPILER_H_ |
| OLD | NEW |