OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 8870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8881 for (int i = 0; i < info.NumberOfLocals(); i++) { | 8881 for (int i = 0; i < info.NumberOfLocals(); i++) { |
8882 locals->set(i * 2, *info.LocalName(i)); | 8882 locals->set(i * 2, *info.LocalName(i)); |
8883 } | 8883 } |
8884 | 8884 |
8885 // Fill in the values of the locals. | 8885 // Fill in the values of the locals. |
8886 for (int i = 0; i < info.NumberOfLocals(); i++) { | 8886 for (int i = 0; i < info.NumberOfLocals(); i++) { |
8887 if (is_optimized_frame) { | 8887 if (is_optimized_frame) { |
8888 // If we are inspecting an optimized frame use undefined as the | 8888 // If we are inspecting an optimized frame use undefined as the |
8889 // value for all locals. | 8889 // value for all locals. |
8890 // | 8890 // |
8891 // TODO(3141533): We should be able to get the correct values | 8891 // TODO(1140): We should be able to get the correct values |
8892 // for locals in optimized frames. | 8892 // for locals in optimized frames. |
8893 locals->set(i * 2 + 1, Heap::undefined_value()); | 8893 locals->set(i * 2 + 1, Heap::undefined_value()); |
8894 } else if (i < info.number_of_stack_slots()) { | 8894 } else if (i < info.number_of_stack_slots()) { |
8895 // Get the value from the stack. | 8895 // Get the value from the stack. |
8896 locals->set(i * 2 + 1, it.frame()->GetExpression(i)); | 8896 locals->set(i * 2 + 1, it.frame()->GetExpression(i)); |
8897 } else { | 8897 } else { |
8898 // Traverse the context chain to the function context as all local | 8898 // Traverse the context chain to the function context as all local |
8899 // variables stored in the context will be on the function context. | 8899 // variables stored in the context will be on the function context. |
8900 Handle<String> name = info.LocalName(i); | 8900 Handle<String> name = info.LocalName(i); |
8901 while (!context->is_function_context()) { | 8901 while (!context->is_function_context()) { |
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11098 } else { | 11098 } else { |
11099 // Handle last resort GC and make sure to allow future allocations | 11099 // Handle last resort GC and make sure to allow future allocations |
11100 // to grow the heap without causing GCs (if possible). | 11100 // to grow the heap without causing GCs (if possible). |
11101 Counters::gc_last_resort_from_js.Increment(); | 11101 Counters::gc_last_resort_from_js.Increment(); |
11102 Heap::CollectAllGarbage(false); | 11102 Heap::CollectAllGarbage(false); |
11103 } | 11103 } |
11104 } | 11104 } |
11105 | 11105 |
11106 | 11106 |
11107 } } // namespace v8::internal | 11107 } } // namespace v8::internal |
OLD | NEW |