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

Side by Side Diff: src/serialize.cc

Issue 195983002: Reland "Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix ia32 and x64 bug/ Created 6 years, 9 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/objects-visiting-inl.h ('k') | src/x64/assembler-x64.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 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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 Cell* cell = Cell::cast(new_object); \ 976 Cell* cell = Cell::cast(new_object); \
977 new_object = reinterpret_cast<Object*>( \ 977 new_object = reinterpret_cast<Object*>( \
978 cell->ValueAddress()); \ 978 cell->ValueAddress()); \
979 } \ 979 } \
980 } \ 980 } \
981 if (how == kFromCode) { \ 981 if (how == kFromCode) { \
982 Address location_of_branch_data = \ 982 Address location_of_branch_data = \
983 reinterpret_cast<Address>(current); \ 983 reinterpret_cast<Address>(current); \
984 Assembler::deserialization_set_special_target_at( \ 984 Assembler::deserialization_set_special_target_at( \
985 location_of_branch_data, \ 985 location_of_branch_data, \
986 Code::cast(HeapObject::FromAddress(current_object_address)), \
986 reinterpret_cast<Address>(new_object)); \ 987 reinterpret_cast<Address>(new_object)); \
987 location_of_branch_data += Assembler::kSpecialTargetSize; \ 988 location_of_branch_data += Assembler::kSpecialTargetSize; \
988 current = reinterpret_cast<Object**>(location_of_branch_data); \ 989 current = reinterpret_cast<Object**>(location_of_branch_data); \
989 current_was_incremented = true; \ 990 current_was_incremented = true; \
990 } else { \ 991 } else { \
991 *current = new_object; \ 992 *current = new_object; \
992 } \ 993 } \
993 } \ 994 } \
994 if (emit_write_barrier && write_barrier_needed) { \ 995 if (emit_write_barrier && write_barrier_needed) { \
995 Address current_address = reinterpret_cast<Address>(current); \ 996 Address current_address = reinterpret_cast<Address>(current); \
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 1854
1854 bool SnapshotByteSource::AtEOF() { 1855 bool SnapshotByteSource::AtEOF() {
1855 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; 1856 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false;
1856 for (int x = position_; x < length_; x++) { 1857 for (int x = position_; x < length_; x++) {
1857 if (data_[x] != SerializerDeserializer::nop()) return false; 1858 if (data_[x] != SerializerDeserializer::nop()) return false;
1858 } 1859 }
1859 return true; 1860 return true;
1860 } 1861 }
1861 1862
1862 } } // namespace v8::internal 1863 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-visiting-inl.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698