diff options
Diffstat (limited to 'deps/v8/src/deoptimizer.h')
-rw-r--r-- | deps/v8/src/deoptimizer.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/deps/v8/src/deoptimizer.h b/deps/v8/src/deoptimizer.h index 64823183a5..9265905366 100644 --- a/deps/v8/src/deoptimizer.h +++ b/deps/v8/src/deoptimizer.h @@ -194,7 +194,7 @@ class Deoptimizer : public Malloced { void MaterializeHeapNumbers(); #ifdef ENABLE_DEBUGGER_SUPPORT void MaterializeHeapNumbersForDebuggerInspectableFrame( - Address top, intptr_t size, DeoptimizedFrameInfo* info); + Address top, uint32_t size, DeoptimizedFrameInfo* info); #endif static void ComputeOutputFrames(Deoptimizer* deoptimizer); @@ -400,6 +400,12 @@ class FrameDescription { void SetKind(Code::Kind kind) { kind_ = kind; } #endif + // Get the incoming arguments count. + int ComputeParametersCount(); + + // Get a parameter value for an unoptimized frame. + Object* GetParameter(Deoptimizer* deoptimizer, int index); + // Get the expression stack height for a unoptimized frame. unsigned GetExpressionCount(Deoptimizer* deoptimizer); @@ -662,9 +668,23 @@ class DeoptimizedFrameInfo : public Malloced { // GC support. void Iterate(ObjectVisitor* v); + // Return the number of incoming arguments. + int parameters_count() { return parameters_count_; } + // Return the height of the expression stack. int expression_count() { return expression_count_; } + // Get the frame function. + JSFunction* GetFunction() { + return function_; + } + + // Get an incoming argument. + Object* GetParameter(int index) { + ASSERT(0 <= index && index < parameters_count()); + return parameters_[index]; + } + // Get an expression from the expression stack. Object* GetExpression(int index) { ASSERT(0 <= index && index < expression_count()); @@ -672,13 +692,27 @@ class DeoptimizedFrameInfo : public Malloced { } private: + // Set the frame function. + void SetFunction(JSFunction* function) { + function_ = function; + } + + // Set an incoming argument. + void SetParameter(int index, Object* obj) { + ASSERT(0 <= index && index < parameters_count()); + parameters_[index] = obj; + } + // Set an expression on the expression stack. void SetExpression(int index, Object* obj) { ASSERT(0 <= index && index < expression_count()); expression_stack_[index] = obj; } + JSFunction* function_; + int parameters_count_; int expression_count_; + Object** parameters_; Object** expression_stack_; friend class Deoptimizer; |