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 29 matching lines...) Expand all Loading... |
40 // =========================================================================== | 40 // =========================================================================== |
41 // The following family of methods ensures a given function is compiled. The | 41 // The following family of methods ensures a given function is compiled. The |
42 // general contract is that failures will be reported by returning {false}, | 42 // general contract is that failures will be reported by returning {false}, |
43 // whereas successful compilation ensures the {is_compiled} predicate on the | 43 // whereas successful compilation ensures the {is_compiled} predicate on the |
44 // given function holds (except for live-edit, which compiles the world). | 44 // given function holds (except for live-edit, which compiles the world). |
45 | 45 |
46 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); | 46 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); |
47 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); | 47 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); |
48 static bool CompileDebugCode(Handle<JSFunction> function); | 48 static bool CompileDebugCode(Handle<JSFunction> function); |
49 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); | 49 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
50 static void CompileForLiveEdit(Handle<Script> script); | 50 static bool CompileForLiveEdit(Handle<Script> script); |
51 | 51 |
52 // Generate and install code from previously queued optimization job. | 52 // Generate and install code from previously queued optimization job. |
53 static void FinalizeOptimizedCompileJob(OptimizedCompileJob* job); | 53 static void FinalizeOptimizedCompileJob(OptimizedCompileJob* job); |
54 | 54 |
55 // Give the compiler a chance to perform low-latency initialization tasks of | 55 // Give the compiler a chance to perform low-latency initialization tasks of |
56 // the given {function} on its instantiation. Note that only the runtime will | 56 // the given {function} on its instantiation. Note that only the runtime will |
57 // offer this chance, optimized closure instantiation will not call this. | 57 // offer this chance, optimized closure instantiation will not call this. |
58 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag); | 58 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag); |
59 | 59 |
60 // Parser::Parse, then Compiler::Analyze. | 60 // Parser::Parse, then Compiler::Analyze. |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 MUST_USE_RESULT Status SetLastStatus(Status status) { | 631 MUST_USE_RESULT Status SetLastStatus(Status status) { |
632 last_status_ = status; | 632 last_status_ = status; |
633 return last_status_; | 633 return last_status_; |
634 } | 634 } |
635 }; | 635 }; |
636 | 636 |
637 } // namespace internal | 637 } // namespace internal |
638 } // namespace v8 | 638 } // namespace v8 |
639 | 639 |
640 #endif // V8_COMPILER_H_ | 640 #endif // V8_COMPILER_H_ |
OLD | NEW |