| 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 Code* code = reinterpret_cast<Code*>(object); | 1294 Code* code = reinterpret_cast<Code*>(object); |
| 1295 ASSERT(code != NULL && GcSafeCodeContains(code, inner_pointer)); | 1295 ASSERT(code != NULL && GcSafeCodeContains(code, inner_pointer)); |
| 1296 return code; | 1296 return code; |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 | 1299 |
| 1300 Code* InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer( | 1300 Code* InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer( |
| 1301 Address inner_pointer) { | 1301 Address inner_pointer) { |
| 1302 Heap* heap = isolate_->heap(); | 1302 Heap* heap = isolate_->heap(); |
| 1303 // Check if the inner pointer points into a large object chunk. | 1303 // Check if the inner pointer points into a large object chunk. |
| 1304 LargePage* large_page = heap->lo_space()->FindPageContainingPc(inner_pointer); | 1304 LargePage* large_page = heap->lo_space()->FindPage(inner_pointer); |
| 1305 if (large_page != NULL) { | 1305 if (large_page != NULL) { |
| 1306 return GcSafeCastToCode(large_page->GetObject(), inner_pointer); | 1306 return GcSafeCastToCode(large_page->GetObject(), inner_pointer); |
| 1307 } | 1307 } |
| 1308 | 1308 |
| 1309 // Iterate through the page until we reach the end or find an object starting | 1309 // Iterate through the page until we reach the end or find an object starting |
| 1310 // after the inner pointer. | 1310 // after the inner pointer. |
| 1311 Page* page = Page::FromAddress(inner_pointer); | 1311 Page* page = Page::FromAddress(inner_pointer); |
| 1312 | 1312 |
| 1313 Address addr = page->skip_list()->StartFor(inner_pointer); | 1313 Address addr = page->skip_list()->StartFor(inner_pointer); |
| 1314 | 1314 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 ZoneList<StackFrame*> list(10); | 1419 ZoneList<StackFrame*> list(10); |
| 1420 for (StackFrameIterator it; !it.done(); it.Advance()) { | 1420 for (StackFrameIterator it; !it.done(); it.Advance()) { |
| 1421 StackFrame* frame = AllocateFrameCopy(it.frame()); | 1421 StackFrame* frame = AllocateFrameCopy(it.frame()); |
| 1422 list.Add(frame); | 1422 list.Add(frame); |
| 1423 } | 1423 } |
| 1424 return list.ToVector(); | 1424 return list.ToVector(); |
| 1425 } | 1425 } |
| 1426 | 1426 |
| 1427 | 1427 |
| 1428 } } // namespace v8::internal | 1428 } } // namespace v8::internal |
| OLD | NEW |