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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 IteratePc(v, pc_address(), LookupCode()); | 1304 IteratePc(v, pc_address(), LookupCode()); |
1305 } | 1305 } |
1306 | 1306 |
1307 | 1307 |
1308 Address StubFailureTrampolineFrame::GetCallerStackPointer() const { | 1308 Address StubFailureTrampolineFrame::GetCallerStackPointer() const { |
1309 return fp() + StandardFrameConstants::kCallerSPOffset; | 1309 return fp() + StandardFrameConstants::kCallerSPOffset; |
1310 } | 1310 } |
1311 | 1311 |
1312 | 1312 |
1313 Code* StubFailureTrampolineFrame::unchecked_code() const { | 1313 Code* StubFailureTrampolineFrame::unchecked_code() const { |
1314 int i = 0; | 1314 Code* trampoline; |
1315 for (; i <= StubFailureTrampolineStub::kMaxExtraExpressionStackCount; ++i) { | 1315 StubFailureTrampolineStub(NOT_JS_FUNCTION_STUB_MODE). |
1316 Code* trampoline; | 1316 FindCodeInCache(&trampoline, isolate()); |
1317 StubFailureTrampolineStub(i).FindCodeInCache(&trampoline, isolate()); | 1317 if (trampoline->contains(pc())) { |
1318 ASSERT(trampoline != NULL); | 1318 return trampoline; |
1319 Address current_pc = pc(); | |
1320 Address code_start = trampoline->instruction_start(); | |
1321 Address code_end = code_start + trampoline->instruction_size(); | |
1322 if (code_start <= current_pc && current_pc < code_end) { | |
1323 return trampoline; | |
1324 } | |
1325 } | 1319 } |
| 1320 |
| 1321 StubFailureTrampolineStub(JS_FUNCTION_STUB_MODE). |
| 1322 FindCodeInCache(&trampoline, isolate()); |
| 1323 if (trampoline->contains(pc())) { |
| 1324 return trampoline; |
| 1325 } |
| 1326 |
1326 UNREACHABLE(); | 1327 UNREACHABLE(); |
1327 return NULL; | 1328 return NULL; |
1328 } | 1329 } |
1329 | 1330 |
1330 | 1331 |
1331 // ------------------------------------------------------------------------- | 1332 // ------------------------------------------------------------------------- |
1332 | 1333 |
1333 | 1334 |
1334 JavaScriptFrame* StackFrameLocator::FindJavaScriptFrame(int n) { | 1335 JavaScriptFrame* StackFrameLocator::FindJavaScriptFrame(int n) { |
1335 ASSERT(n >= 0); | 1336 ASSERT(n >= 0); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 ZoneList<StackFrame*> list(10, zone); | 1494 ZoneList<StackFrame*> list(10, zone); |
1494 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1495 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1495 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1496 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1496 list.Add(frame, zone); | 1497 list.Add(frame, zone); |
1497 } | 1498 } |
1498 return list.ToVector(); | 1499 return list.ToVector(); |
1499 } | 1500 } |
1500 | 1501 |
1501 | 1502 |
1502 } } // namespace v8::internal | 1503 } } // namespace v8::internal |
OLD | NEW |