Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index bdb168fe0d107a397a724bded304902be20a8774..e8e1fc5743a5570ff9a692f62c6004569780cb9b 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -496,11 +496,13 @@ class LChunk; |
// using last_status(). |
class OptimizingCompiler: public ZoneObject { |
public: |
- explicit OptimizingCompiler(CompilationInfo* info) |
+ explicit OptimizingCompiler(CompilationInfo* info, |
+ uint32_t osr_pc_offset = 0) |
: info_(info), |
graph_builder_(NULL), |
graph_(NULL), |
chunk_(NULL), |
+ osr_pc_offset_(osr_pc_offset), |
titzer
2013/09/02 17:03:35
This is the PC offset of the backedge. It seems we
Yang
2013/09/03 08:50:10
Done.
|
last_status_(FAILED) { } |
enum Status { |
@@ -514,6 +516,7 @@ class OptimizingCompiler: public ZoneObject { |
Status last_status() const { return last_status_; } |
CompilationInfo* info() const { return info_; } |
Isolate* isolate() const { return info()->isolate(); } |
+ uint32_t osr_pc_offset() { return osr_pc_offset_; } |
MUST_USE_RESULT Status AbortOptimization() { |
info_->AbortOptimization(); |
@@ -529,6 +532,7 @@ class OptimizingCompiler: public ZoneObject { |
TimeDelta time_taken_to_create_graph_; |
TimeDelta time_taken_to_optimize_; |
TimeDelta time_taken_to_codegen_; |
+ uint32_t osr_pc_offset_; |
Status last_status_; |
MUST_USE_RESULT Status SetLastStatus(Status status) { |
@@ -600,7 +604,8 @@ class Compiler : public AllStatic { |
// success and false if the compilation resulted in a stack overflow. |
static bool CompileLazy(CompilationInfo* info); |
- static void RecompileConcurrent(Handle<JSFunction> function); |
+ static void RecompileConcurrent(Handle<JSFunction> function, |
+ uint32_t osr_pc_offset = 0); |
// Compile a shared function info object (the function is possibly lazily |
// compiled). |
@@ -615,6 +620,12 @@ class Compiler : public AllStatic { |
static void InstallOptimizedCode(OptimizingCompiler* info); |
+ static bool CompileForOnStackReplacement(Handle<JSFunction> function, |
+ BailoutId* ast_id_out); |
+ |
+ static bool CompileForConcurrentOSR(Handle<JSFunction> function, |
+ BailoutId* ast_id_out); |
+ |
#ifdef ENABLE_DEBUGGER_SUPPORT |
static bool MakeCodeForLiveEdit(CompilationInfo* info); |
#endif |