Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: src/mksnapshot.cc

Issue 23468021: move HEAP to /test (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 390 }
391 } 391 }
392 // Make sure all builtin scripts are cached. 392 // Make sure all builtin scripts are cached.
393 { HandleScope scope(isolate); 393 { HandleScope scope(isolate);
394 for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) { 394 for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) {
395 internal_isolate->bootstrapper()->NativesSourceLookup(i); 395 internal_isolate->bootstrapper()->NativesSourceLookup(i);
396 } 396 }
397 } 397 }
398 // If we don't do this then we end up with a stray root pointing at the 398 // If we don't do this then we end up with a stray root pointing at the
399 // context even after we have disposed of the context. 399 // context even after we have disposed of the context.
400 HEAP->CollectAllGarbage(i::Heap::kNoGCFlags, "mksnapshot"); 400 internal_isolate->heap()->CollectAllGarbage(
401 i::Heap::kNoGCFlags, "mksnapshot");
401 i::Object* raw_context = *v8::Utils::OpenPersistent(context); 402 i::Object* raw_context = *v8::Utils::OpenPersistent(context);
402 context.Dispose(); 403 context.Dispose();
403 CppByteSink sink(argv[1]); 404 CppByteSink sink(argv[1]);
404 // This results in a somewhat smaller snapshot, probably because it gets rid 405 // This results in a somewhat smaller snapshot, probably because it gets rid
405 // of some things that are cached between garbage collections. 406 // of some things that are cached between garbage collections.
406 i::StartupSerializer ser(internal_isolate, &sink); 407 i::StartupSerializer ser(internal_isolate, &sink);
407 ser.SerializeStrongReferences(); 408 ser.SerializeStrongReferences();
408 409
409 i::PartialSerializer partial_ser( 410 i::PartialSerializer partial_ser(
410 internal_isolate, &ser, sink.partial_sink()); 411 internal_isolate, &ser, sink.partial_sink());
(...skipping 24 matching lines...) Expand all
435 "", 436 "",
436 ser.CurrentAllocationAddress(i::NEW_SPACE), 437 ser.CurrentAllocationAddress(i::NEW_SPACE),
437 ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE), 438 ser.CurrentAllocationAddress(i::OLD_POINTER_SPACE),
438 ser.CurrentAllocationAddress(i::OLD_DATA_SPACE), 439 ser.CurrentAllocationAddress(i::OLD_DATA_SPACE),
439 ser.CurrentAllocationAddress(i::CODE_SPACE), 440 ser.CurrentAllocationAddress(i::CODE_SPACE),
440 ser.CurrentAllocationAddress(i::MAP_SPACE), 441 ser.CurrentAllocationAddress(i::MAP_SPACE),
441 ser.CurrentAllocationAddress(i::CELL_SPACE), 442 ser.CurrentAllocationAddress(i::CELL_SPACE),
442 ser.CurrentAllocationAddress(i::PROPERTY_CELL_SPACE)); 443 ser.CurrentAllocationAddress(i::PROPERTY_CELL_SPACE));
443 return 0; 444 return 0;
444 } 445 }
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698