Chromium Code Reviews| Index: src/compiler.h |
| diff --git a/src/compiler.h b/src/compiler.h |
| index bfeaa8e7c336f739514de2d8db7b39d7ad2fdff2..e983ecebf574206c5299b9f4a02c9ea23d1d6a25 100644 |
| --- a/src/compiler.h |
| +++ b/src/compiler.h |
| @@ -6,6 +6,7 @@ |
| #define V8_COMPILER_H_ |
| #include <memory> |
| +#include <vector> |
| #include "src/allocation.h" |
| #include "src/bailout-reason.h" |
| @@ -23,6 +24,8 @@ class JavaScriptFrame; |
| class ParseInfo; |
| class ScriptData; |
| +enum class ShouldCompile { kIfNecessary, kNever }; |
| + |
| // The V8 compiler API. |
| // |
| // This is the central hub for dispatching to the various compilers within V8. |
| @@ -53,8 +56,8 @@ class Compiler : public AllStatic { |
| static MaybeHandle<JSArray> CompileForLiveEdit(Handle<Script> script); |
| // Prepare a compilation job for unoptimized code. Requires ParseAndAnalyse. |
| - static CompilationJob* PrepareUnoptimizedCompilationJob( |
| - CompilationInfo* info); |
| + static std::vector<std::unique_ptr<CompilationJob>> |
| + PrepareUnoptimizedCompilationJob(CompilationInfo* info); |
|
rmcilroy
2016/10/07 14:26:34
nit - Job->Jobs
|
| // Generate and install code from previously queued compilation job. |
| static bool FinalizeCompilationJob(CompilationJob* job); |
| @@ -116,7 +119,8 @@ class Compiler : public AllStatic { |
| // Create a shared function info object (the code may be lazily compiled). |
| static Handle<SharedFunctionInfo> GetSharedFunctionInfo( |
| - FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer); |
| + FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer, |
| + ShouldCompile should_compile = ShouldCompile::kIfNecessary); |
| // Create a shared function info object for a native function literal. |
| static Handle<SharedFunctionInfo> GetSharedFunctionInfoForNative( |