Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: src/runtime.cc

Issue 7227006: Add inspection of function for optimized frames (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.cc ('k') | test/mjsunit/debug-evaluate-locals-optimized.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 10147 matching lines...) Expand 10 before | Expand all | Expand 10 after
10158 // Calculate the size of the result. 10158 // Calculate the size of the result.
10159 int details_size = kFrameDetailsFirstDynamicIndex + 10159 int details_size = kFrameDetailsFirstDynamicIndex +
10160 2 * (argument_count + info.NumberOfLocals()) + 10160 2 * (argument_count + info.NumberOfLocals()) +
10161 (at_return ? 1 : 0); 10161 (at_return ? 1 : 0);
10162 Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size); 10162 Handle<FixedArray> details = isolate->factory()->NewFixedArray(details_size);
10163 10163
10164 // Add the frame id. 10164 // Add the frame id.
10165 details->set(kFrameDetailsFrameIdIndex, *frame_id); 10165 details->set(kFrameDetailsFrameIdIndex, *frame_id);
10166 10166
10167 // Add the function (same as in function frame). 10167 // Add the function (same as in function frame).
10168 details->set(kFrameDetailsFunctionIndex, it.frame()->function()); 10168 if (it.frame()->is_optimized()) {
10169 // Get the function from the deoptimized frame.
10170 details->set(kFrameDetailsFunctionIndex, deoptimized_frame->GetFunction());
10171 } else {
10172 // Get the function from the stack.
10173 details->set(kFrameDetailsFunctionIndex, it.frame()->function());
10174 }
10169 10175
10170 // Add the arguments count. 10176 // Add the arguments count.
10171 details->set(kFrameDetailsArgumentCountIndex, Smi::FromInt(argument_count)); 10177 details->set(kFrameDetailsArgumentCountIndex, Smi::FromInt(argument_count));
10172 10178
10173 // Add the locals count 10179 // Add the locals count
10174 details->set(kFrameDetailsLocalCountIndex, 10180 details->set(kFrameDetailsLocalCountIndex,
10175 Smi::FromInt(info.NumberOfLocals())); 10181 Smi::FromInt(info.NumberOfLocals()));
10176 10182
10177 // Add the source position. 10183 // Add the source position.
10178 if (position != RelocInfo::kNoPosition) { 10184 if (position != RelocInfo::kNoPosition) {
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after
12600 } else { 12606 } else {
12601 // Handle last resort GC and make sure to allow future allocations 12607 // Handle last resort GC and make sure to allow future allocations
12602 // to grow the heap without causing GCs (if possible). 12608 // to grow the heap without causing GCs (if possible).
12603 isolate->counters()->gc_last_resort_from_js()->Increment(); 12609 isolate->counters()->gc_last_resort_from_js()->Increment();
12604 isolate->heap()->CollectAllGarbage(false); 12610 isolate->heap()->CollectAllGarbage(false);
12605 } 12611 }
12606 } 12612 }
12607 12613
12608 12614
12609 } } // namespace v8::internal 12615 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | test/mjsunit/debug-evaluate-locals-optimized.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698