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 26 matching lines...) Expand all Loading... |
37 enum ClearExceptionFlag { KEEP_EXCEPTION, CLEAR_EXCEPTION }; | 37 enum ClearExceptionFlag { KEEP_EXCEPTION, CLEAR_EXCEPTION }; |
38 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; | 38 enum ConcurrencyMode { NOT_CONCURRENT, CONCURRENT }; |
39 | 39 |
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 CompileBaseline(Handle<JSFunction> function); |
47 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); | 48 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); |
48 static bool CompileDebugCode(Handle<JSFunction> function); | 49 static bool CompileDebugCode(Handle<JSFunction> function); |
49 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); | 50 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
50 static bool CompileForLiveEdit(Handle<Script> script); | 51 static bool CompileForLiveEdit(Handle<Script> script); |
51 | 52 |
52 // Generate and install code from previously queued optimization job. | 53 // Generate and install code from previously queued optimization job. |
53 static void FinalizeOptimizedCompileJob(OptimizedCompileJob* job); | 54 static void FinalizeOptimizedCompileJob(OptimizedCompileJob* job); |
54 | 55 |
55 // Give the compiler a chance to perform low-latency initialization tasks of | 56 // 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 | 57 // the given {function} on its instantiation. Note that only the runtime will |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 MUST_USE_RESULT Status SetLastStatus(Status status) { | 627 MUST_USE_RESULT Status SetLastStatus(Status status) { |
627 last_status_ = status; | 628 last_status_ = status; |
628 return last_status_; | 629 return last_status_; |
629 } | 630 } |
630 }; | 631 }; |
631 | 632 |
632 } // namespace internal | 633 } // namespace internal |
633 } // namespace v8 | 634 } // namespace v8 |
634 | 635 |
635 #endif // V8_COMPILER_H_ | 636 #endif // V8_COMPILER_H_ |
OLD | NEW |