| Index: src/deoptimizer.cc
|
| diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
|
| index 6e9ead7e2040c63fda2dbbe4dd3f5853866db775..ce10b6df1f698dad6da3ad770c8f8771bbc4370f 100644
|
| --- a/src/deoptimizer.cc
|
| +++ b/src/deoptimizer.cc
|
| @@ -687,16 +687,17 @@ int Deoptimizer::GetDeoptimizationId(Isolate* isolate,
|
| }
|
|
|
|
|
| -int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
|
| - BailoutId id,
|
| - SharedFunctionInfo* shared) {
|
| +int Deoptimizer::GetOutputInfoIndex(
|
| + DeoptimizationOutputData* data,
|
| + BailoutId id,
|
| + SharedFunctionInfo* shared) {
|
| // TODO(kasperl): For now, we do a simple linear search for the PC
|
| // offset associated with the given node id. This should probably be
|
| // changed to a binary search.
|
| int length = data->DeoptPoints();
|
| for (int i = 0; i < length; i++) {
|
| if (data->AstId(i) == id) {
|
| - return data->PcAndState(i)->value();
|
| + return i;
|
| }
|
| }
|
| PrintF(stderr, "[couldn't find pc offset for node=%d]\n", id.ToInt());
|
| @@ -712,6 +713,27 @@ int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
|
| }
|
|
|
|
|
| +int Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data,
|
| + BailoutId id,
|
| + SharedFunctionInfo* shared) {
|
| + int idx = GetOutputInfoIndex(data, id, shared);
|
| + ASSERT(idx >= 0 && data->AstId(idx) == id);
|
| + return data->PcAndState(idx)->value();
|
| +}
|
| +
|
| +
|
| +#if defined(COMPARE_OPT_STACK_HEIGHT)
|
| +int Deoptimizer::GetOutputInfoStackHeight(
|
| + DeoptimizationOutputData* data,
|
| + BailoutId id,
|
| + SharedFunctionInfo* shared) {
|
| + int idx = GetOutputInfoIndex(data, id, shared);
|
| + ASSERT(idx >= 0 && data->AstId(idx) == id);
|
| + return data->StackHeight(idx)->value();
|
| +}
|
| +#endif
|
| +
|
| +
|
| int Deoptimizer::GetDeoptimizedCodeCount(Isolate* isolate) {
|
| int length = 0;
|
| // Count all entries in the deoptimizing code list of every context.
|
|
|