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

Side by Side Diff: test/cctest/test-unboxed-doubles.cc

Issue 2759433002: [cctest] Fix invalid assumption in test-unboxed-doubles (Closed)
Patch Set: Alloc a HeapNumber instead Created 3 years, 9 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
« 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 // |double_descriptor|. Call GC and ensure that it did not crash during 1404 // |double_descriptor|. Call GC and ensure that it did not crash during
1405 // store buffer entries updating. 1405 // store buffer entries updating.
1406 1406
1407 Handle<JSObject> obj; 1407 Handle<JSObject> obj;
1408 Handle<HeapObject> obj_value; 1408 Handle<HeapObject> obj_value;
1409 { 1409 {
1410 AlwaysAllocateScope always_allocate(isolate); 1410 AlwaysAllocateScope always_allocate(isolate);
1411 obj = factory->NewJSObjectFromMap(map, TENURED); 1411 obj = factory->NewJSObjectFromMap(map, TENURED);
1412 CHECK(old_space->Contains(*obj)); 1412 CHECK(old_space->Contains(*obj));
1413 1413
1414 obj_value = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS); 1414 obj_value = factory->NewHeapNumber(0.);
1415 } 1415 }
1416 1416
1417 CHECK(heap->InNewSpace(*obj_value)); 1417 CHECK(heap->InNewSpace(*obj_value));
1418 1418
1419 { 1419 {
1420 FieldIndex index = FieldIndex::ForDescriptor(*map, tagged_descriptor); 1420 FieldIndex index = FieldIndex::ForDescriptor(*map, tagged_descriptor);
1421 const int n = 153; 1421 const int n = 153;
1422 for (int i = 0; i < n; i++) { 1422 for (int i = 0; i < n; i++) {
1423 obj->FastPropertyAtPut(index, *obj_value); 1423 obj->FastPropertyAtPut(index, *obj_value);
1424 } 1424 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 1579
1580 // TODO(ishell): add respective tests for property kind reconfiguring from 1580 // TODO(ishell): add respective tests for property kind reconfiguring from
1581 // accessor field to double, once accessor fields are supported by 1581 // accessor field to double, once accessor fields are supported by
1582 // Map::ReconfigureProperty(). 1582 // Map::ReconfigureProperty().
1583 1583
1584 1584
1585 // TODO(ishell): add respective tests for fast property removal case once 1585 // TODO(ishell): add respective tests for fast property removal case once
1586 // Map::ReconfigureProperty() supports that. 1586 // Map::ReconfigureProperty() supports that.
1587 1587
1588 #endif 1588 #endif
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