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

Side by Side Diff: src/objects-inl.h

Issue 8082023: Fix map modification in transition tree traversal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Vyacheslav Egorov. 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 | « src/objects.cc ('k') | 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 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 void HeapObject::set_map(Map* value) { 1232 void HeapObject::set_map(Map* value) {
1233 set_map_word(MapWord::FromMap(value)); 1233 set_map_word(MapWord::FromMap(value));
1234 if (value != NULL) { 1234 if (value != NULL) {
1235 // TODO(1600) We are passing NULL as a slot because maps can never be on 1235 // TODO(1600) We are passing NULL as a slot because maps can never be on
1236 // evacuation candidate. 1236 // evacuation candidate.
1237 value->GetHeap()->incremental_marking()->RecordWrite(this, NULL, value); 1237 value->GetHeap()->incremental_marking()->RecordWrite(this, NULL, value);
1238 } 1238 }
1239 } 1239 }
1240 1240
1241 1241
1242 // Unsafe accessor omitting write barrier.
1243 void HeapObject::set_map_unsafe(Map* value) {
1244 set_map_word(MapWord::FromMap(value));
1245 }
1246
1247
1242 MapWord HeapObject::map_word() { 1248 MapWord HeapObject::map_word() {
1243 return MapWord(reinterpret_cast<uintptr_t>(READ_FIELD(this, kMapOffset))); 1249 return MapWord(reinterpret_cast<uintptr_t>(READ_FIELD(this, kMapOffset)));
1244 } 1250 }
1245 1251
1246 1252
1247 void HeapObject::set_map_word(MapWord map_word) { 1253 void HeapObject::set_map_word(MapWord map_word) {
1248 // WRITE_FIELD does not invoke write barrier, but there is no need 1254 // WRITE_FIELD does not invoke write barrier, but there is no need
1249 // here. 1255 // here.
1250 WRITE_FIELD(this, kMapOffset, reinterpret_cast<Object*>(map_word.value_)); 1256 WRITE_FIELD(this, kMapOffset, reinterpret_cast<Object*>(map_word.value_));
1251 } 1257 }
(...skipping 3434 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 #undef WRITE_INT_FIELD 4692 #undef WRITE_INT_FIELD
4687 #undef READ_SHORT_FIELD 4693 #undef READ_SHORT_FIELD
4688 #undef WRITE_SHORT_FIELD 4694 #undef WRITE_SHORT_FIELD
4689 #undef READ_BYTE_FIELD 4695 #undef READ_BYTE_FIELD
4690 #undef WRITE_BYTE_FIELD 4696 #undef WRITE_BYTE_FIELD
4691 4697
4692 4698
4693 } } // namespace v8::internal 4699 } } // namespace v8::internal
4694 4700
4695 #endif // V8_OBJECTS_INL_H_ 4701 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698