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

Side by Side Diff: src/objects.cc

Issue 2539503002: [heap] Assert that there's no recodred slot corresponding to unboxed double field. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « src/heap/slot-set.h ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 // Can't use JSObject::FastPropertyAtPut() because proper map was not set 3431 // Can't use JSObject::FastPropertyAtPut() because proper map was not set
3432 // yet. 3432 // yet.
3433 if (new_map->IsUnboxedDoubleField(index)) { 3433 if (new_map->IsUnboxedDoubleField(index)) {
3434 DCHECK(value->IsMutableHeapNumber()); 3434 DCHECK(value->IsMutableHeapNumber());
3435 object->RawFastDoublePropertyAtPut(index, 3435 object->RawFastDoublePropertyAtPut(index,
3436 HeapNumber::cast(value)->value()); 3436 HeapNumber::cast(value)->value());
3437 if (i < old_number_of_fields && !old_map->IsUnboxedDoubleField(index)) { 3437 if (i < old_number_of_fields && !old_map->IsUnboxedDoubleField(index)) {
3438 // Transition from tagged to untagged slot. 3438 // Transition from tagged to untagged slot.
3439 heap->ClearRecordedSlot(*object, 3439 heap->ClearRecordedSlot(*object,
3440 HeapObject::RawField(*object, index.offset())); 3440 HeapObject::RawField(*object, index.offset()));
3441 } else {
3442 DCHECK(!heap->HasRecordedSlot(
3443 *object, HeapObject::RawField(*object, index.offset())));
3441 } 3444 }
3442 } else { 3445 } else {
3443 object->RawFastPropertyAtPut(index, value); 3446 object->RawFastPropertyAtPut(index, value);
3444 } 3447 }
3445 } 3448 }
3446 3449
3447 3450
3448 // If there are properties in the new backing store, trim it to the correct 3451 // If there are properties in the new backing store, trim it to the correct
3449 // size and install the backing store into the object. 3452 // size and install the backing store into the object.
3450 if (external > 0) { 3453 if (external > 0) {
(...skipping 16991 matching lines...) Expand 10 before | Expand all | Expand 10 after
20442 // depend on this. 20445 // depend on this.
20443 return DICTIONARY_ELEMENTS; 20446 return DICTIONARY_ELEMENTS;
20444 } 20447 }
20445 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20448 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20446 return kind; 20449 return kind;
20447 } 20450 }
20448 } 20451 }
20449 20452
20450 } // namespace internal 20453 } // namespace internal
20451 } // namespace v8 20454 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/slot-set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698