OLD | NEW |
---|---|
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 10042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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. |
10063 bool constructor = it.frame()->IsConstructor(); | 10063 bool constructor; |
10064 if (it.frame()->is_optimized() && deoptimized_frame_index != 0) { | |
10065 // Inlined frames cannot be construct calls. | |
10066 constructor = false; | |
10067 } else { | |
10068 constructor = it.frame()->IsConstructor(); | |
10069 } | |
Sven Panne
2011/07/08 08:17:37
This is a bit hard to read, perhaps:
bool inlined
Søren Thygesen Gjesse
2011/07/08 08:43:09
Done. It cannot go into IsConstructor as IsConstru
| |
10064 | 10070 |
10065 // Get scope info and read from it for local variable information. | 10071 // Get scope info and read from it for local variable information. |
10066 Handle<JSFunction> function(JSFunction::cast(it.frame()->function())); | 10072 Handle<JSFunction> function(JSFunction::cast(it.frame()->function())); |
10067 Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info()); | 10073 Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info()); |
10068 ASSERT(*scope_info != SerializedScopeInfo::Empty()); | 10074 ASSERT(*scope_info != SerializedScopeInfo::Empty()); |
10069 ScopeInfo<> info(*scope_info); | 10075 ScopeInfo<> info(*scope_info); |
10070 | 10076 |
10071 // Get the locals names and values into a temporary array. | 10077 // Get the locals names and values into a temporary array. |
10072 // | 10078 // |
10073 // TODO(1240907): Hide compiler-introduced stack variables | 10079 // TODO(1240907): Hide compiler-introduced stack variables |
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12610 } else { | 12616 } else { |
12611 // Handle last resort GC and make sure to allow future allocations | 12617 // Handle last resort GC and make sure to allow future allocations |
12612 // to grow the heap without causing GCs (if possible). | 12618 // to grow the heap without causing GCs (if possible). |
12613 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12619 isolate->counters()->gc_last_resort_from_js()->Increment(); |
12614 isolate->heap()->CollectAllGarbage(false); | 12620 isolate->heap()->CollectAllGarbage(false); |
12615 } | 12621 } |
12616 } | 12622 } |
12617 | 12623 |
12618 | 12624 |
12619 } } // namespace v8::internal | 12625 } } // namespace v8::internal |
OLD | NEW |