| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // =========================================================================== | 42 // =========================================================================== |
| 43 // The following family of methods ensures a given function is compiled. The | 43 // The following family of methods ensures a given function is compiled. The |
| 44 // general contract is that failures will be reported by returning {false}, | 44 // general contract is that failures will be reported by returning {false}, |
| 45 // whereas successful compilation ensures the {is_compiled} predicate on the | 45 // whereas successful compilation ensures the {is_compiled} predicate on the |
| 46 // given function holds (except for live-edit, which compiles the world). | 46 // given function holds (except for live-edit, which compiles the world). |
| 47 | 47 |
| 48 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); | 48 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); |
| 49 static bool CompileBaseline(Handle<JSFunction> function); | 49 static bool CompileBaseline(Handle<JSFunction> function); |
| 50 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); | 50 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); |
| 51 static bool CompileDebugCode(Handle<JSFunction> function); | |
| 52 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); | 51 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); |
| 53 static MaybeHandle<JSArray> CompileForLiveEdit(Handle<Script> script); | 52 static MaybeHandle<JSArray> CompileForLiveEdit(Handle<Script> script); |
| 54 | 53 |
| 55 // Prepare a compilation job for unoptimized code. Requires ParseAndAnalyse. | 54 // Prepare a compilation job for unoptimized code. Requires ParseAndAnalyse. |
| 56 static CompilationJob* PrepareUnoptimizedCompilationJob( | 55 static CompilationJob* PrepareUnoptimizedCompilationJob( |
| 57 CompilationInfo* info); | 56 CompilationInfo* info); |
| 58 | 57 |
| 59 // Generate and install code from previously queued compilation job. | 58 // Generate and install code from previously queued compilation job. |
| 60 static bool FinalizeCompilationJob(CompilationJob* job); | 59 static bool FinalizeCompilationJob(CompilationJob* job); |
| 61 | 60 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 state_ = State::kFailed; | 221 state_ = State::kFailed; |
| 223 } | 222 } |
| 224 return status; | 223 return status; |
| 225 } | 224 } |
| 226 }; | 225 }; |
| 227 | 226 |
| 228 } // namespace internal | 227 } // namespace internal |
| 229 } // namespace v8 | 228 } // namespace v8 |
| 230 | 229 |
| 231 #endif // V8_COMPILER_H_ | 230 #endif // V8_COMPILER_H_ |
| OLD | NEW |