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

Side by Side Diff: src/objects.cc

Issue 10704109: Also in ClearNonLiveTransitions we have to check if there still is a transition array before we acc… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 | src/objects-inl.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 7348 matching lines...) Expand 10 before | Expand all | Expand 10 after
7359 bool getter = ClearAccessorComponent(heap, accessors, ACCESSOR_GETTER); 7359 bool getter = ClearAccessorComponent(heap, accessors, ACCESSOR_GETTER);
7360 bool setter = ClearAccessorComponent(heap, accessors, ACCESSOR_SETTER); 7360 bool setter = ClearAccessorComponent(heap, accessors, ACCESSOR_SETTER);
7361 return getter && setter; 7361 return getter && setter;
7362 } 7362 }
7363 7363
7364 7364
7365 // TODO(mstarzinger): This method should be moved into MarkCompactCollector, 7365 // TODO(mstarzinger): This method should be moved into MarkCompactCollector,
7366 // because it cannot be called from outside the GC and we already have methods 7366 // because it cannot be called from outside the GC and we already have methods
7367 // depending on the transitions layout in the GC anyways. 7367 // depending on the transitions layout in the GC anyways.
7368 void Map::ClearNonLiveTransitions(Heap* heap) { 7368 void Map::ClearNonLiveTransitions(Heap* heap) {
7369 TransitionArray* t = transitions();
7370 // If there are no transitions to be cleared, return. 7369 // If there are no transitions to be cleared, return.
7371 // TODO(verwaest) Should be an assert, otherwise back pointers are not 7370 // TODO(verwaest) Should be an assert, otherwise back pointers are not
7372 // properly cleared. 7371 // properly cleared.
7373 if (t == NULL) return; 7372 if (!HasTransitionArray()) return;
7373
7374 TransitionArray* t = transitions();
7374 7375
7375 int transition_index = 0; 7376 int transition_index = 0;
7376 7377
7377 // Compact all live descriptors to the left. 7378 // Compact all live descriptors to the left.
7378 for (int i = 0; i < t->number_of_transitions(); ++i) { 7379 for (int i = 0; i < t->number_of_transitions(); ++i) {
7379 if (!ClearNonLiveTransition(heap, t, i)) { 7380 if (!ClearNonLiveTransition(heap, t, i)) {
7380 if (i != transition_index) { 7381 if (i != transition_index) {
7381 String* key = t->GetKey(i); 7382 String* key = t->GetKey(i);
7382 Object* value = t->GetValue(i); 7383 Object* value = t->GetValue(i);
7383 t->SetKey(transition_index, key); 7384 t->SetKey(transition_index, key);
(...skipping 5879 matching lines...) Expand 10 before | Expand all | Expand 10 after
13263 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13264 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13264 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13265 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13265 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13266 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13266 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13267 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13267 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13268 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13268 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13269 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13269 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13270 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13270 } 13271 }
13271 13272
13272 } } // namespace v8::internal 13273 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698