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

Side by Side Diff: src/runtime.cc

Issue 7307035: Add inspection of whether frame is a construct frame to optimized frames (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed 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/debug.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 10041 matching lines...) Expand 10 before | Expand all | Expand 10 after
10052 } 10052 }
10053 ASSERT(save != NULL); 10053 ASSERT(save != NULL);
10054 10054
10055 // Get the frame id. 10055 // Get the frame id.
10056 Handle<Object> frame_id(WrapFrameId(it.frame()->id()), isolate); 10056 Handle<Object> frame_id(WrapFrameId(it.frame()->id()), isolate);
10057 10057
10058 // Find source position. 10058 // Find source position.
10059 int position = 10059 int position =
10060 it.frame()->LookupCode()->SourcePosition(it.frame()->pc()); 10060 it.frame()->LookupCode()->SourcePosition(it.frame()->pc());
10061 10061
10062 // Check for constructor frame. 10062 // Check for constructor frame. Inlined frames cannot be construct calls.
10063 bool constructor = it.frame()->IsConstructor(); 10063 bool inlined_frame =
10064 it.frame()->is_optimized() && deoptimized_frame_index != 0;
10065 bool constructor = !inlined_frame && it.frame()->IsConstructor();
10064 10066
10065 // Get scope info and read from it for local variable information. 10067 // Get scope info and read from it for local variable information.
10066 Handle<JSFunction> function(JSFunction::cast(it.frame()->function())); 10068 Handle<JSFunction> function(JSFunction::cast(it.frame()->function()));
10067 Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info()); 10069 Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info());
10068 ASSERT(*scope_info != SerializedScopeInfo::Empty()); 10070 ASSERT(*scope_info != SerializedScopeInfo::Empty());
10069 ScopeInfo<> info(*scope_info); 10071 ScopeInfo<> info(*scope_info);
10070 10072
10071 // Get the locals names and values into a temporary array. 10073 // Get the locals names and values into a temporary array.
10072 // 10074 //
10073 // TODO(1240907): Hide compiler-introduced stack variables 10075 // TODO(1240907): Hide compiler-introduced stack variables
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after
12610 } else { 12612 } else {
12611 // Handle last resort GC and make sure to allow future allocations 12613 // Handle last resort GC and make sure to allow future allocations
12612 // to grow the heap without causing GCs (if possible). 12614 // to grow the heap without causing GCs (if possible).
12613 isolate->counters()->gc_last_resort_from_js()->Increment(); 12615 isolate->counters()->gc_last_resort_from_js()->Increment();
12614 isolate->heap()->CollectAllGarbage(false); 12616 isolate->heap()->CollectAllGarbage(false);
12615 } 12617 }
12616 } 12618 }
12617 12619
12618 12620
12619 } } // namespace v8::internal 12621 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | test/mjsunit/debug-evaluate-locals-optimized.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698