Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index 47751113628c1b0a2b4176e32aa79cdea664e5e8..1a5204ba6cbe849f99a21f3181af6653c95dd853 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -9,6 +9,7 @@ |
#include "src/ast.h" |
#include "src/bailout-reason.h" |
#include "src/compilation-dependencies.h" |
+#include "src/interpreter/bytecodes.h" |
#include "src/signature.h" |
#include "src/zone.h" |
@@ -135,6 +136,7 @@ class CompilationInfo { |
explicit CompilationInfo(ParseInfo* parse_info); |
CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); |
+ CompilationInfo(interpreter::Bytecode bytecode, Isolate* isolate, Zone* zone); |
virtual ~CompilationInfo(); |
ParseInfo* parse_info() const { return parse_info_; } |
@@ -166,6 +168,7 @@ class CompilationInfo { |
bool is_osr() const { return !osr_ast_id_.IsNone(); } |
Handle<Code> code() const { return code_; } |
CodeStub* code_stub() const { return code_stub_; } |
+ interpreter::Bytecode bytecode() const { return bytecode_; } |
BailoutId osr_ast_id() const { return osr_ast_id_; } |
Handle<Code> unoptimized_code() const { return unoptimized_code_; } |
int opt_count() const { return opt_count_; } |
@@ -295,6 +298,7 @@ class CompilationInfo { |
bool IsOptimizing() const { return mode_ == OPTIMIZE; } |
bool IsOptimizable() const { return mode_ == BASE; } |
bool IsStub() const { return mode_ == STUB; } |
+ bool IsBytecodeHandler() const { return mode_ == BYTECODE_HANDLER; } |
void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) { |
DCHECK(!shared_info().is_null()); |
SetMode(OPTIMIZE); |
@@ -321,6 +325,9 @@ class CompilationInfo { |
DCHECK(IsOptimizable()); |
SetFlag(kDeoptimizationSupport); |
} |
+ bool ShouldEnsureSpaceForLazyDeopt() { |
+ return !IsStub() && !IsBytecodeHandler(); |
+ } |
// Determines whether or not to insert a self-optimization header. |
bool ShouldSelfOptimize(); |
@@ -430,11 +437,13 @@ class CompilationInfo { |
enum Mode { |
BASE, |
OPTIMIZE, |
- STUB |
+ STUB, |
+ BYTECODE_HANDLER |
titzer
2015/08/21 13:37:21
Do we really need a new mode? What does it control
rmcilroy
2015/08/21 16:41:05
Removed this mode and replaced it's need with debu
|
}; |
- CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub, Mode mode, |
- Isolate* isolate, Zone* zone); |
+ CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub, |
+ interpreter::Bytecode bytecode, Mode mode, Isolate* isolate, |
+ Zone* zone); |
Isolate* isolate_; |
@@ -454,6 +463,8 @@ class CompilationInfo { |
// For compiled stubs, the stub object |
CodeStub* code_stub_; |
+ // For compiled bytecode handlers, the bytecode |
+ interpreter::Bytecode bytecode_; |
titzer
2015/08/21 13:37:21
AFAICT this is only used for debugging purposes in
rmcilroy
2015/08/21 16:41:05
Done with GetDebugName as discussed.
|
// The compiled code. |
Handle<Code> code_; |