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

Side by Side Diff: src/serialize.cc

Issue 18746: Fixing alignment issue allowing serialization to run on ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 | test/cctest/cctest.status » ('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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 virtual void VisitRuntimeEntry(RelocInfo* rinfo) { 807 virtual void VisitRuntimeEntry(RelocInfo* rinfo) {
808 Address target = rinfo->target_address(); 808 Address target = rinfo->target_address();
809 uint32_t encoding = reference_encoder_->Encode(target); 809 uint32_t encoding = reference_encoder_->Encode(target);
810 CHECK(target == NULL ? encoding == 0 : encoding != 0); 810 CHECK(target == NULL ? encoding == 0 : encoding != 0);
811 offsets_.Add(rinfo->target_address_address() - obj_address_); 811 offsets_.Add(rinfo->target_address_address() - obj_address_);
812 addresses_.Add(reinterpret_cast<Address>(encoding)); 812 addresses_.Add(reinterpret_cast<Address>(encoding));
813 } 813 }
814 814
815 void Update(Address start_address) { 815 void Update(Address start_address) {
816 for (int i = 0; i < offsets_.length(); i++) { 816 for (int i = 0; i < offsets_.length(); i++) {
817 Address* p = reinterpret_cast<Address*>(start_address + offsets_[i]); 817 memcpy(start_address + offsets_[i], &addresses_[i], sizeof(Address));
818 *p = addresses_[i];
819 } 818 }
820 } 819 }
821 820
822 private: 821 private:
823 Address obj_address_; 822 Address obj_address_;
824 Serializer* serializer_; 823 Serializer* serializer_;
825 ExternalReferenceEncoder* reference_encoder_; 824 ExternalReferenceEncoder* reference_encoder_;
826 List<int> offsets_; 825 List<int> offsets_;
827 List<Address> addresses_; 826 List<Address> addresses_;
828 }; 827 };
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 ASSERT(index < large_objects_.length()); 1518 ASSERT(index < large_objects_.length());
1520 } 1519 }
1521 return large_objects_[index]; // s.page_offset() is ignored. 1520 return large_objects_[index]; // s.page_offset() is ignored.
1522 } 1521 }
1523 UNREACHABLE(); 1522 UNREACHABLE();
1524 return NULL; 1523 return NULL;
1525 } 1524 }
1526 1525
1527 1526
1528 } } // namespace v8::internal 1527 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698