Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index e1e4be3965c9e2c872dd04f1347b9eb28a6df592..45863f6b28d2a4537ae8579692b48f0c08963435 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -17,6 +17,7 @@ namespace internal { |
class AstValueFactory; |
class HydrogenCodeStub; |
+class JavaScriptFrame; |
class ParseInfo; |
class ScriptData; |
@@ -122,14 +123,15 @@ class CompilationInfo { |
kCompilingForDebugging = 1 << 7, |
kSerializing = 1 << 8, |
kContextSpecializing = 1 << 9, |
- kInliningEnabled = 1 << 10, |
- kTypingEnabled = 1 << 11, |
- kDisableFutureOptimization = 1 << 12, |
- kSplittingEnabled = 1 << 13, |
- kTypeFeedbackEnabled = 1 << 14, |
- kDeoptimizationEnabled = 1 << 15, |
- kSourcePositionsEnabled = 1 << 16, |
- kFirstCompile = 1 << 17, |
+ kFrameSpecializing = 1 << 10, |
+ kInliningEnabled = 1 << 11, |
+ kTypingEnabled = 1 << 12, |
+ kDisableFutureOptimization = 1 << 13, |
+ kSplittingEnabled = 1 << 14, |
+ kTypeFeedbackEnabled = 1 << 15, |
+ kDeoptimizationEnabled = 1 << 16, |
+ kSourcePositionsEnabled = 1 << 17, |
+ kFirstCompile = 1 << 18, |
}; |
explicit CompilationInfo(ParseInfo* parse_info); |
@@ -217,6 +219,10 @@ class CompilationInfo { |
bool is_context_specializing() const { return GetFlag(kContextSpecializing); } |
+ void MarkAsFrameSpecializing() { SetFlag(kFrameSpecializing); } |
+ |
+ bool is_frame_specializing() const { return GetFlag(kFrameSpecializing); } |
+ |
void MarkAsTypeFeedbackEnabled() { SetFlag(kTypeFeedbackEnabled); } |
bool is_type_feedback_enabled() const { |
@@ -388,6 +394,8 @@ class CompilationInfo { |
DCHECK(height >= 0); |
osr_expr_stack_height_ = height; |
} |
+ JavaScriptFrame* osr_frame() const { return osr_frame_; } |
+ void set_osr_frame(JavaScriptFrame* osr_frame) { osr_frame_ = osr_frame; } |
#if DEBUG |
void PrintAstForTesting(); |
@@ -492,6 +500,9 @@ class CompilationInfo { |
int osr_expr_stack_height_; |
+ // The current OSR frame for specialization or {nullptr}. |
+ JavaScriptFrame* osr_frame_ = nullptr; |
+ |
Type::FunctionType* function_type_; |
DISALLOW_COPY_AND_ASSIGN(CompilationInfo); |
@@ -662,10 +673,9 @@ class Compiler : public AllStatic { |
// In the latter case, return the InOptimizationQueue builtin. On failure, |
// return the empty handle. |
MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCode( |
- Handle<JSFunction> function, |
- Handle<Code> current_code, |
- ConcurrencyMode mode, |
- BailoutId osr_ast_id = BailoutId::None()); |
+ Handle<JSFunction> function, Handle<Code> current_code, |
+ ConcurrencyMode mode, BailoutId osr_ast_id = BailoutId::None(), |
+ JavaScriptFrame* osr_frame = nullptr); |
// Generate and return code from previously queued optimization job. |
// On failure, return the empty handle. |