OLD | NEW |
---|---|
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 7381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7392 for (int i = 0; i < length; i++) { | 7392 for (int i = 0; i < length; i++) { |
7393 fprintf(file, "%c", Get(i)); | 7393 fprintf(file, "%c", Get(i)); |
7394 } | 7394 } |
7395 } | 7395 } |
7396 | 7396 |
7397 | 7397 |
7398 // Clear a possible back pointer in case the transition leads to a dead map. | 7398 // Clear a possible back pointer in case the transition leads to a dead map. |
7399 // Return true in case a back pointer has been cleared and false otherwise. | 7399 // Return true in case a back pointer has been cleared and false otherwise. |
7400 // Set *keep_entry to true when a live map transition has been found. | 7400 // Set *keep_entry to true when a live map transition has been found. |
7401 static bool ClearBackPointer(Heap* heap, Object* target, bool* keep_entry) { | 7401 static bool ClearBackPointer(Heap* heap, Object* target, bool* keep_entry) { |
7402 if (!target->IsMap()) return false; | 7402 if (!target->IsMap()) { |
7403 *keep_entry = true; | |
Michael Starzinger
2012/06/05 09:12:48
I don't think this fix is completely correct, beca
Toon Verwaest
2012/06/05 10:29:16
Done.
| |
7404 return false; | |
7405 } | |
7403 Map* map = Map::cast(target); | 7406 Map* map = Map::cast(target); |
7404 if (Marking::MarkBitFrom(map).Get()) { | 7407 if (Marking::MarkBitFrom(map).Get()) { |
7405 *keep_entry = true; | 7408 *keep_entry = true; |
7406 return false; | 7409 return false; |
7407 } else { | 7410 } else { |
7408 map->SetBackPointer(heap->undefined_value(), SKIP_WRITE_BARRIER); | 7411 map->SetBackPointer(heap->undefined_value(), SKIP_WRITE_BARRIER); |
7409 return true; | 7412 return true; |
7410 } | 7413 } |
7411 } | 7414 } |
7412 | 7415 |
(...skipping 5805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13218 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13221 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13219 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13222 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13220 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13223 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13221 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13224 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13222 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13225 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13223 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13226 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13224 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13227 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13225 } | 13228 } |
13226 | 13229 |
13227 } } // namespace v8::internal | 13230 } } // namespace v8::internal |
OLD | NEW |