| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 10349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10360 // Find source position in unoptimized code. | 10360 // Find source position in unoptimized code. |
| 10361 int position = frame_inspector.GetSourcePosition(); | 10361 int position = frame_inspector.GetSourcePosition(); |
| 10362 | 10362 |
| 10363 // Check for constructor frame. | 10363 // Check for constructor frame. |
| 10364 bool constructor = frame_inspector.IsConstructor(); | 10364 bool constructor = frame_inspector.IsConstructor(); |
| 10365 | 10365 |
| 10366 // Get scope info and read from it for local variable information. | 10366 // Get scope info and read from it for local variable information. |
| 10367 Handle<JSFunction> function(JSFunction::cast(frame_inspector.GetFunction())); | 10367 Handle<JSFunction> function(JSFunction::cast(frame_inspector.GetFunction())); |
| 10368 Handle<SharedFunctionInfo> shared(function->shared()); | 10368 Handle<SharedFunctionInfo> shared(function->shared()); |
| 10369 Handle<ScopeInfo> scope_info(shared->scope_info()); | 10369 Handle<ScopeInfo> scope_info(shared->scope_info()); |
| 10370 ASSERT(*scope_info != ScopeInfo::Empty()); | 10370 ASSERT(*scope_info != ScopeInfo::Empty(isolate)); |
| 10371 | 10371 |
| 10372 // Get the locals names and values into a temporary array. | 10372 // Get the locals names and values into a temporary array. |
| 10373 // | 10373 // |
| 10374 // TODO(1240907): Hide compiler-introduced stack variables | 10374 // TODO(1240907): Hide compiler-introduced stack variables |
| 10375 // (e.g. .result)? For users of the debugger, they will probably be | 10375 // (e.g. .result)? For users of the debugger, they will probably be |
| 10376 // confusing. | 10376 // confusing. |
| 10377 Handle<FixedArray> locals = | 10377 Handle<FixedArray> locals = |
| 10378 isolate->factory()->NewFixedArray(scope_info->LocalCount() * 2); | 10378 isolate->factory()->NewFixedArray(scope_info->LocalCount() * 2); |
| 10379 | 10379 |
| 10380 // Fill in the values of the locals. | 10380 // Fill in the values of the locals. |
| (...skipping 2919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13300 // Handle last resort GC and make sure to allow future allocations | 13300 // Handle last resort GC and make sure to allow future allocations |
| 13301 // to grow the heap without causing GCs (if possible). | 13301 // to grow the heap without causing GCs (if possible). |
| 13302 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13302 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13303 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13303 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13304 "Runtime::PerformGC"); | 13304 "Runtime::PerformGC"); |
| 13305 } | 13305 } |
| 13306 } | 13306 } |
| 13307 | 13307 |
| 13308 | 13308 |
| 13309 } } // namespace v8::internal | 13309 } } // namespace v8::internal |
| OLD | NEW |