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 11259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11270 } | 11270 } |
11271 if (i < scope_info->LocalCount()) { | 11271 if (i < scope_info->LocalCount()) { |
11272 // Get the context containing declarations. | 11272 // Get the context containing declarations. |
11273 Handle<Context> context( | 11273 Handle<Context> context( |
11274 Context::cast(it.frame()->context())->declaration_context()); | 11274 Context::cast(it.frame()->context())->declaration_context()); |
11275 for (; i < scope_info->LocalCount(); ++i) { | 11275 for (; i < scope_info->LocalCount(); ++i) { |
11276 Handle<String> name(scope_info->LocalName(i)); | 11276 Handle<String> name(scope_info->LocalName(i)); |
11277 VariableMode mode; | 11277 VariableMode mode; |
11278 InitializationFlag init_flag; | 11278 InitializationFlag init_flag; |
11279 locals->set(i * 2, *name); | 11279 locals->set(i * 2, *name); |
11280 locals->set(i * 2 + 1, context->get( | 11280 int context_slot_index = |
11281 scope_info->ContextSlotIndex(*name, &mode, &init_flag))); | 11281 scope_info->ContextSlotIndex(*name, &mode, &init_flag); |
| 11282 Object* value = context->get(context_slot_index); |
| 11283 locals->set(i * 2 + 1, value); |
11282 } | 11284 } |
11283 } | 11285 } |
11284 | 11286 |
11285 // Check whether this frame is positioned at return. If not top | 11287 // Check whether this frame is positioned at return. If not top |
11286 // frame or if the frame is optimized it cannot be at a return. | 11288 // frame or if the frame is optimized it cannot be at a return. |
11287 bool at_return = false; | 11289 bool at_return = false; |
11288 if (!is_optimized && index == 0) { | 11290 if (!is_optimized && index == 0) { |
11289 at_return = isolate->debug()->IsBreakAtReturn(it.frame()); | 11291 at_return = isolate->debug()->IsBreakAtReturn(it.frame()); |
11290 } | 11292 } |
11291 | 11293 |
(...skipping 3816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15108 // Handle last resort GC and make sure to allow future allocations | 15110 // Handle last resort GC and make sure to allow future allocations |
15109 // to grow the heap without causing GCs (if possible). | 15111 // to grow the heap without causing GCs (if possible). |
15110 isolate->counters()->gc_last_resort_from_js()->Increment(); | 15112 isolate->counters()->gc_last_resort_from_js()->Increment(); |
15111 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 15113 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
15112 "Runtime::PerformGC"); | 15114 "Runtime::PerformGC"); |
15113 } | 15115 } |
15114 } | 15116 } |
15115 | 15117 |
15116 | 15118 |
15117 } } // namespace v8::internal | 15119 } } // namespace v8::internal |
OLD | NEW |