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

Side by Side Diff: src/serialize.cc

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: <sigh> upload only the one commit... 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
OLDNEW
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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 49, 521 49,
522 "address_of_has_pending_message"); 522 "address_of_has_pending_message");
523 Add(ExternalReference::address_of_pending_message_script(isolate).address(), 523 Add(ExternalReference::address_of_pending_message_script(isolate).address(),
524 UNCLASSIFIED, 524 UNCLASSIFIED,
525 50, 525 50,
526 "pending_message_script"); 526 "pending_message_script");
527 Add(ExternalReference::get_make_code_young_function(isolate).address(), 527 Add(ExternalReference::get_make_code_young_function(isolate).address(),
528 UNCLASSIFIED, 528 UNCLASSIFIED,
529 51, 529 51,
530 "Code::MakeCodeYoung"); 530 "Code::MakeCodeYoung");
531 Add(ExternalReference::get_mark_code_as_executed_function(isolate).address(),
532 UNCLASSIFIED,
533 52,
534 "Code::MarkCodeAsExecuted");
531 Add(ExternalReference::cpu_features().address(), 535 Add(ExternalReference::cpu_features().address(),
532 UNCLASSIFIED, 536 UNCLASSIFIED,
533 52, 537 53,
534 "cpu_features"); 538 "cpu_features");
535 Add(ExternalReference::new_space_allocation_top_address(isolate).address(), 539 Add(ExternalReference::new_space_allocation_top_address(isolate).address(),
536 UNCLASSIFIED, 540 UNCLASSIFIED,
537 53, 541 54,
538 "Heap::NewSpaceAllocationTopAddress"); 542 "Heap::NewSpaceAllocationTopAddress");
539 Add(ExternalReference::new_space_allocation_limit_address(isolate).address(), 543 Add(ExternalReference::new_space_allocation_limit_address(isolate).address(),
540 UNCLASSIFIED, 544 UNCLASSIFIED,
541 54, 545 55,
542 "Heap::NewSpaceAllocationLimitAddress"); 546 "Heap::NewSpaceAllocationLimitAddress");
543 Add(ExternalReference(Runtime::kAllocateInNewSpace, isolate).address(), 547 Add(ExternalReference(Runtime::kAllocateInNewSpace, isolate).address(),
544 UNCLASSIFIED, 548 UNCLASSIFIED,
545 55, 549 56,
546 "Runtime::AllocateInNewSpace"); 550 "Runtime::AllocateInNewSpace");
547 Add(ExternalReference::old_pointer_space_allocation_top_address( 551 Add(ExternalReference::old_pointer_space_allocation_top_address(
548 isolate).address(), 552 isolate).address(),
549 UNCLASSIFIED, 553 UNCLASSIFIED,
550 56, 554 57,
551 "Heap::OldPointerSpaceAllocationTopAddress"); 555 "Heap::OldPointerSpaceAllocationTopAddress");
552 Add(ExternalReference::old_pointer_space_allocation_limit_address( 556 Add(ExternalReference::old_pointer_space_allocation_limit_address(
553 isolate).address(), 557 isolate).address(),
554 UNCLASSIFIED, 558 UNCLASSIFIED,
555 57, 559 58,
556 "Heap::OldPointerSpaceAllocationLimitAddress"); 560 "Heap::OldPointerSpaceAllocationLimitAddress");
557 Add(ExternalReference(Runtime::kAllocateInOldPointerSpace, isolate).address(), 561 Add(ExternalReference(Runtime::kAllocateInOldPointerSpace, isolate).address(),
558 UNCLASSIFIED, 562 UNCLASSIFIED,
559 58, 563 59,
560 "Runtime::AllocateInOldPointerSpace"); 564 "Runtime::AllocateInOldPointerSpace");
561 Add(ExternalReference::old_data_space_allocation_top_address( 565 Add(ExternalReference::old_data_space_allocation_top_address(
562 isolate).address(), 566 isolate).address(),
563 UNCLASSIFIED, 567 UNCLASSIFIED,
564 59, 568 60,
565 "Heap::OldDataSpaceAllocationTopAddress"); 569 "Heap::OldDataSpaceAllocationTopAddress");
566 Add(ExternalReference::old_data_space_allocation_limit_address( 570 Add(ExternalReference::old_data_space_allocation_limit_address(
567 isolate).address(), 571 isolate).address(),
568 UNCLASSIFIED, 572 UNCLASSIFIED,
569 60, 573 61,
570 "Heap::OldDataSpaceAllocationLimitAddress"); 574 "Heap::OldDataSpaceAllocationLimitAddress");
571 Add(ExternalReference(Runtime::kAllocateInOldDataSpace, isolate).address(), 575 Add(ExternalReference(Runtime::kAllocateInOldDataSpace, isolate).address(),
572 UNCLASSIFIED, 576 UNCLASSIFIED,
573 61, 577 62,
574 "Runtime::AllocateInOldDataSpace"); 578 "Runtime::AllocateInOldDataSpace");
575 Add(ExternalReference::new_space_high_promotion_mode_active_address(isolate). 579 Add(ExternalReference::new_space_high_promotion_mode_active_address(isolate).
576 address(), 580 address(),
577 UNCLASSIFIED, 581 UNCLASSIFIED,
578 62, 582 63,
579 "Heap::NewSpaceAllocationLimitAddress"); 583 "Heap::NewSpaceAllocationLimitAddress");
580 Add(ExternalReference::allocation_sites_list_address(isolate).address(), 584 Add(ExternalReference::allocation_sites_list_address(isolate).address(),
581 UNCLASSIFIED, 585 UNCLASSIFIED,
582 63, 586 64,
583 "Heap::allocation_sites_list_address()"); 587 "Heap::allocation_sites_list_address()");
584 588
585 // Add a small set of deopt entry addresses to encoder without generating the 589 // Add a small set of deopt entry addresses to encoder without generating the
586 // deopt table code, which isn't possible at deserialization time. 590 // deopt table code, which isn't possible at deserialization time.
587 HandleScope scope(isolate); 591 HandleScope scope(isolate);
588 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { 592 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) {
589 Address address = Deoptimizer::GetDeoptimizationEntry( 593 Address address = Deoptimizer::GetDeoptimizationEntry(
590 isolate, 594 isolate,
591 entry, 595 entry,
592 Deoptimizer::LAZY, 596 Deoptimizer::LAZY,
593 Deoptimizer::CALCULATE_ENTRY_ADDRESS); 597 Deoptimizer::CALCULATE_ENTRY_ADDRESS);
594 Add(address, LAZY_DEOPTIMIZATION, 64 + entry, "lazy_deopt"); 598 Add(address, LAZY_DEOPTIMIZATION, 65 + entry, "lazy_deopt");
595 } 599 }
596 } 600 }
597 601
598 602
599 ExternalReferenceEncoder::ExternalReferenceEncoder(Isolate* isolate) 603 ExternalReferenceEncoder::ExternalReferenceEncoder(Isolate* isolate)
600 : encodings_(Match), 604 : encodings_(Match),
601 isolate_(isolate) { 605 isolate_(isolate) {
602 ExternalReferenceTable* external_references = 606 ExternalReferenceTable* external_references =
603 ExternalReferenceTable::instance(isolate_); 607 ExternalReferenceTable::instance(isolate_);
604 for (int i = 0; i < external_references->size(); ++i) { 608 for (int i = 0; i < external_references->size(); ++i) {
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 1860
1857 bool SnapshotByteSource::AtEOF() { 1861 bool SnapshotByteSource::AtEOF() {
1858 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1862 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1859 for (int x = position_; x < length_; x++) { 1863 for (int x = position_; x < length_; x++) {
1860 if (data_[x] != SerializerDeserializer::nop()) return false; 1864 if (data_[x] != SerializerDeserializer::nop()) return false;
1861 } 1865 }
1862 return true; 1866 return true;
1863 } 1867 }
1864 1868
1865 } } // namespace v8::internal 1869 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698