| Index: src/compiler.h
|
| diff --git a/src/compiler.h b/src/compiler.h
|
| index bfeaa8e7c336f739514de2d8db7b39d7ad2fdff2..67e41ef061252d42db36bc05f1fed87c516d96de 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);
|
|
|
| // Generate and install code from previously queued compilation job.
|
| static bool FinalizeCompilationJob(CompilationJob* job);
|
| @@ -68,6 +71,8 @@ class Compiler : public AllStatic {
|
| static bool ParseAndAnalyze(ParseInfo* info);
|
| // Rewrite, analyze scopes, and renumber.
|
| static bool Analyze(ParseInfo* info);
|
| + // Renumber.
|
| + static bool Renumber(ParseInfo* info);
|
| // Adds deoptimization support, requires ParseAndAnalyze.
|
| static bool EnsureDeoptimizationSupport(CompilationInfo* info);
|
| // Ensures that bytecode is generated, calls ParseAndAnalyze internally.
|
| @@ -116,7 +121,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(
|
|
|