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 30 matching lines...) Expand all Loading... |
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 CompileBaseline(Handle<JSFunction> function); |
48 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); | 48 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); |
49 static bool CompileDebugCode(Handle<JSFunction> function); | 49 static bool CompileDebugCode(Handle<JSFunction> function); |
50 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); | 50 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
51 static bool CompileForLiveEdit(Handle<Script> script); | 51 static MaybeHandle<JSArray> CompileForLiveEdit(Handle<Script> script); |
52 | 52 |
53 // Generate and install code from previously queued compilation job. | 53 // Generate and install code from previously queued compilation job. |
54 static void FinalizeCompilationJob(CompilationJob* job); | 54 static void FinalizeCompilationJob(CompilationJob* job); |
55 | 55 |
56 // 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 |
57 // 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 |
58 // offer this chance, optimized closure instantiation will not call this. | 58 // offer this chance, optimized closure instantiation will not call this. |
59 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag); | 59 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag); |
60 | 60 |
61 // Parser::Parse, then Compiler::Analyze. | 61 // Parser::Parse, then Compiler::Analyze. |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 MUST_USE_RESULT Status SetLastStatus(Status status) { | 611 MUST_USE_RESULT Status SetLastStatus(Status status) { |
612 last_status_ = status; | 612 last_status_ = status; |
613 return last_status_; | 613 return last_status_; |
614 } | 614 } |
615 }; | 615 }; |
616 | 616 |
617 } // namespace internal | 617 } // namespace internal |
618 } // namespace v8 | 618 } // namespace v8 |
619 | 619 |
620 #endif // V8_COMPILER_H_ | 620 #endif // V8_COMPILER_H_ |
OLD | NEW |