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

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

Issue 715233002: Zap prototype transitions in release mode, too. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 5350 matching lines...) Expand 10 before | Expand all | Expand 10 after
5361 return GetHeap()->empty_fixed_array(); 5361 return GetHeap()->empty_fixed_array();
5362 } 5362 }
5363 return transitions()->GetPrototypeTransitions(); 5363 return transitions()->GetPrototypeTransitions();
5364 } 5364 }
5365 5365
5366 5366
5367 void Map::SetPrototypeTransitions( 5367 void Map::SetPrototypeTransitions(
5368 Handle<Map> map, Handle<FixedArray> proto_transitions) { 5368 Handle<Map> map, Handle<FixedArray> proto_transitions) {
5369 EnsureHasTransitionArray(map); 5369 EnsureHasTransitionArray(map);
5370 int old_number_of_transitions = map->NumberOfProtoTransitions(); 5370 int old_number_of_transitions = map->NumberOfProtoTransitions();
5371 #ifdef DEBUG 5371 if (Heap::ShouldZapGarbage() && map->HasPrototypeTransitions()) {
5372 if (map->HasPrototypeTransitions()) {
5373 DCHECK(map->GetPrototypeTransitions() != *proto_transitions); 5372 DCHECK(map->GetPrototypeTransitions() != *proto_transitions);
5374 map->ZapPrototypeTransitions(); 5373 map->ZapPrototypeTransitions();
5375 } 5374 }
5376 #endif
5377 map->transitions()->SetPrototypeTransitions(*proto_transitions); 5375 map->transitions()->SetPrototypeTransitions(*proto_transitions);
5378 map->SetNumberOfProtoTransitions(old_number_of_transitions); 5376 map->SetNumberOfProtoTransitions(old_number_of_transitions);
5379 } 5377 }
5380 5378
5381 5379
5382 bool Map::HasPrototypeTransitions() { 5380 bool Map::HasPrototypeTransitions() {
5383 return HasTransitionArray() && transitions()->HasPrototypeTransitions(); 5381 return HasTransitionArray() && transitions()->HasPrototypeTransitions();
5384 } 5382 }
5385 5383
5386 5384
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
7477 #undef READ_SHORT_FIELD 7475 #undef READ_SHORT_FIELD
7478 #undef WRITE_SHORT_FIELD 7476 #undef WRITE_SHORT_FIELD
7479 #undef READ_BYTE_FIELD 7477 #undef READ_BYTE_FIELD
7480 #undef WRITE_BYTE_FIELD 7478 #undef WRITE_BYTE_FIELD
7481 #undef NOBARRIER_READ_BYTE_FIELD 7479 #undef NOBARRIER_READ_BYTE_FIELD
7482 #undef NOBARRIER_WRITE_BYTE_FIELD 7480 #undef NOBARRIER_WRITE_BYTE_FIELD
7483 7481
7484 } } // namespace v8::internal 7482 } } // namespace v8::internal
7485 7483
7486 #endif // V8_OBJECTS_INL_H_ 7484 #endif // V8_OBJECTS_INL_H_
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