| 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 | 953 |
| 954 accumulator->Add("] "); | 954 accumulator->Add("] "); |
| 955 } | 955 } |
| 956 } | 956 } |
| 957 | 957 |
| 958 accumulator->Add("(this=%o", receiver); | 958 accumulator->Add("(this=%o", receiver); |
| 959 | 959 |
| 960 // Get scope information for nicer output, if possible. If code is | 960 // Get scope information for nicer output, if possible. If code is |
| 961 // NULL, or doesn't contain scope info, info will return 0 for the | 961 // NULL, or doesn't contain scope info, info will return 0 for the |
| 962 // number of parameters, stack slots, or context slots. | 962 // number of parameters, stack slots, or context slots. |
| 963 ScopeInfo<PreallocatedStorage> info(*scope_info); | 963 ScopeInfo<PreallocatedStorageAllocator> info(*scope_info); |
| 964 | 964 |
| 965 // Print the parameters. | 965 // Print the parameters. |
| 966 int parameters_count = ComputeParametersCount(); | 966 int parameters_count = ComputeParametersCount(); |
| 967 for (int i = 0; i < parameters_count; i++) { | 967 for (int i = 0; i < parameters_count; i++) { |
| 968 accumulator->Add(","); | 968 accumulator->Add(","); |
| 969 // If we have a name for the parameter we print it. Nameless | 969 // If we have a name for the parameter we print it. Nameless |
| 970 // parameters are either because we have more actual parameters | 970 // parameters are either because we have more actual parameters |
| 971 // than formal parameters or because we have no scope information. | 971 // than formal parameters or because we have no scope information. |
| 972 if (i < info.number_of_parameters()) { | 972 if (i < info.number_of_parameters()) { |
| 973 accumulator->PrintName(*info.parameter_name(i)); | 973 accumulator->PrintName(*info.parameter_name(i)); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 | 1261 |
| 1262 switch (frame->type()) { | 1262 switch (frame->type()) { |
| 1263 STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE) | 1263 STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE) |
| 1264 default: UNREACHABLE(); | 1264 default: UNREACHABLE(); |
| 1265 } | 1265 } |
| 1266 #undef FRAME_TYPE_CASE | 1266 #undef FRAME_TYPE_CASE |
| 1267 return NULL; | 1267 return NULL; |
| 1268 } | 1268 } |
| 1269 | 1269 |
| 1270 Vector<StackFrame*> CreateStackMap() { | 1270 Vector<StackFrame*> CreateStackMap() { |
| 1271 ZoneList<StackFrame*> list(10); | 1271 ZoneList<StackFrame*> list(ZONE, 10); |
| 1272 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1272 for (StackFrameIterator it; !it.done(); it.Advance()) { |
| 1273 StackFrame* frame = AllocateFrameCopy(it.frame()); | 1273 StackFrame* frame = AllocateFrameCopy(it.frame()); |
| 1274 list.Add(frame); | 1274 list.Add(frame); |
| 1275 } | 1275 } |
| 1276 return list.ToVector(); | 1276 return list.ToVector(); |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 | 1279 |
| 1280 } } // namespace v8::internal | 1280 } } // namespace v8::internal |
| OLD | NEW |