| 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 4306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4317 "gc();" | 4317 "gc();" |
| 4318 "gc();" | 4318 "gc();" |
| 4319 "array.shift();" | 4319 "array.shift();" |
| 4320 "array;"); | 4320 "array;"); |
| 4321 | 4321 |
| 4322 Handle<JSObject> o = | 4322 Handle<JSObject> o = |
| 4323 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result)); | 4323 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result)); |
| 4324 CHECK(heap->InOldPointerSpace(o->elements())); | 4324 CHECK(heap->InOldPointerSpace(o->elements())); |
| 4325 CHECK(heap->InOldPointerSpace(*o)); | 4325 CHECK(heap->InOldPointerSpace(*o)); |
| 4326 Page* page = Page::FromAddress(o->elements()->address()); | 4326 Page* page = Page::FromAddress(o->elements()->address()); |
| 4327 CHECK(page->WasSwept() || | 4327 CHECK(page->parallel_sweeping() <= MemoryChunk::PARALLEL_SWEEPING_FINALIZE || |
| 4328 Marking::IsBlack(Marking::MarkBitFrom(o->elements()))); | 4328 Marking::IsBlack(Marking::MarkBitFrom(o->elements()))); |
| 4329 } | 4329 } |
| 4330 | 4330 |
| 4331 | 4331 |
| 4332 #ifdef DEBUG | 4332 #ifdef DEBUG |
| 4333 TEST(PathTracer) { | 4333 TEST(PathTracer) { |
| 4334 CcTest::InitializeVM(); | 4334 CcTest::InitializeVM(); |
| 4335 v8::HandleScope scope(CcTest::isolate()); | 4335 v8::HandleScope scope(CcTest::isolate()); |
| 4336 | 4336 |
| 4337 v8::Local<v8::Value> result = CompileRun("'abc'"); | 4337 v8::Local<v8::Value> result = CompileRun("'abc'"); |
| 4338 Handle<Object> o = v8::Utils::OpenHandle(*result); | 4338 Handle<Object> o = v8::Utils::OpenHandle(*result); |
| 4339 CcTest::i_isolate()->heap()->TracePathToObject(*o); | 4339 CcTest::i_isolate()->heap()->TracePathToObject(*o); |
| 4340 } | 4340 } |
| 4341 #endif // DEBUG | 4341 #endif // DEBUG |
| OLD | NEW |