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

Side by Side Diff: src/serialize.cc

Issue 8332026: Get back the performance lost in context creation in 9744. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 if (where == kNewObject && how == kPlain && within == kStartOfObject) {\ 783 if (where == kNewObject && how == kPlain && within == kStartOfObject) {\
784 ASSIGN_DEST_SPACE(space_number) \ 784 ASSIGN_DEST_SPACE(space_number) \
785 ReadObject(space_number, dest_space, current); \ 785 ReadObject(space_number, dest_space, current); \
786 emit_write_barrier = (space_number == NEW_SPACE); \ 786 emit_write_barrier = (space_number == NEW_SPACE); \
787 } else { \ 787 } else { \
788 Object* new_object = NULL; /* May not be a real Object pointer. */ \ 788 Object* new_object = NULL; /* May not be a real Object pointer. */ \
789 if (where == kNewObject) { \ 789 if (where == kNewObject) { \
790 ASSIGN_DEST_SPACE(space_number) \ 790 ASSIGN_DEST_SPACE(space_number) \
791 ReadObject(space_number, dest_space, &new_object); \ 791 ReadObject(space_number, dest_space, &new_object); \
792 } else if (where == kRootArray) { \ 792 } else if (where == kRootArray) { \
793 emit_write_barrier = true; \
794 int root_id = source_->GetInt(); \ 793 int root_id = source_->GetInt(); \
795 new_object = isolate->heap()->roots_array_start()[root_id]; \ 794 new_object = isolate->heap()->roots_array_start()[root_id]; \
795 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
796 } else if (where == kPartialSnapshotCache) { \ 796 } else if (where == kPartialSnapshotCache) { \
797 emit_write_barrier = true; \
798 int cache_index = source_->GetInt(); \ 797 int cache_index = source_->GetInt(); \
799 new_object = isolate->serialize_partial_snapshot_cache() \ 798 new_object = isolate->serialize_partial_snapshot_cache() \
800 [cache_index]; \ 799 [cache_index]; \
800 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \
801 } else if (where == kExternalReference) { \ 801 } else if (where == kExternalReference) { \
802 int reference_id = source_->GetInt(); \ 802 int reference_id = source_->GetInt(); \
803 Address address = external_reference_decoder_-> \ 803 Address address = external_reference_decoder_-> \
804 Decode(reference_id); \ 804 Decode(reference_id); \
805 new_object = reinterpret_cast<Object*>(address); \ 805 new_object = reinterpret_cast<Object*>(address); \
806 } else if (where == kBackref) { \ 806 } else if (where == kBackref) { \
807 emit_write_barrier = (space_number == NEW_SPACE); \ 807 emit_write_barrier = (space_number == NEW_SPACE); \
808 new_object = GetAddressFromEnd(data & kSpaceMask); \ 808 new_object = GetAddressFromEnd(data & kSpaceMask); \
809 } else { \ 809 } else { \
810 ASSERT(where == kFromStart); \ 810 ASSERT(where == kFromStart); \
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1642 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1643 } 1643 }
1644 } 1644 }
1645 int allocation_address = fullness_[space]; 1645 int allocation_address = fullness_[space];
1646 fullness_[space] = allocation_address + size; 1646 fullness_[space] = allocation_address + size;
1647 return allocation_address; 1647 return allocation_address;
1648 } 1648 }
1649 1649
1650 1650
1651 } } // namespace v8::internal 1651 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698