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

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

Issue 1293283003: [heap,cctest] Get rid of protected-for-sake-of-testing scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add heap-tester.h to cctest.gyp Created 5 years, 4 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 | « test/cctest/test-mark-compact.cc ('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 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/compilation-cache.h" 10 #include "src/compilation-cache.h"
11 #include "src/execution.h" 11 #include "src/execution.h"
12 #include "src/factory.h" 12 #include "src/factory.h"
13 #include "src/global-handles.h" 13 #include "src/global-handles.h"
14 #include "src/ic/ic.h" 14 #include "src/ic/ic.h"
15 #include "src/macro-assembler.h" 15 #include "src/macro-assembler.h"
16 #include "test/cctest/cctest.h" 16 #include "test/cctest/cctest.h"
17 #include "test/cctest/heap-tester.h"
17 18
18 using namespace v8::base; 19 using namespace v8::base;
19 using namespace v8::internal; 20 using namespace v8::internal;
20 21
21 #if V8_DOUBLE_FIELDS_UNBOXING 22 #if V8_DOUBLE_FIELDS_UNBOXING
22 23
23 24
24 // 25 //
25 // Helper functions. 26 // Helper functions.
26 // 27 //
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 1396
1396 CHECK_EQ(boom_value, GetDoubleFieldValue(*obj, field_index)); 1397 CHECK_EQ(boom_value, GetDoubleFieldValue(*obj, field_index));
1397 } 1398 }
1398 1399
1399 1400
1400 static int LenFromSize(int size) { 1401 static int LenFromSize(int size) {
1401 return (size - FixedArray::kHeaderSize) / kPointerSize; 1402 return (size - FixedArray::kHeaderSize) / kPointerSize;
1402 } 1403 }
1403 1404
1404 1405
1405 TEST(WriteBarriersInCopyJSObject) { 1406 HEAP_TEST(WriteBarriersInCopyJSObject) {
1406 FLAG_max_semi_space_size = 1; // Ensure new space is not growing. 1407 FLAG_max_semi_space_size = 1; // Ensure new space is not growing.
1407 CcTest::InitializeVM(); 1408 CcTest::InitializeVM();
1408 Isolate* isolate = CcTest::i_isolate(); 1409 Isolate* isolate = CcTest::i_isolate();
1409 TestHeap* heap = CcTest::test_heap(); 1410 Heap* heap = CcTest::heap();
1410 1411
1411 v8::HandleScope scope(CcTest::isolate()); 1412 v8::HandleScope scope(CcTest::isolate());
1412 1413
1413 // The plan: create JSObject which contains unboxed double value that looks 1414 // The plan: create JSObject which contains unboxed double value that looks
1414 // like a reference to an object in new space. 1415 // like a reference to an object in new space.
1415 // Then clone this object (forcing it to go into old space) and check 1416 // Then clone this object (forcing it to go into old space) and check
1416 // that the value of the unboxed double property of the cloned object has 1417 // that the value of the unboxed double property of the cloned object has
1417 // was not corrupted by GC. 1418 // was not corrupted by GC.
1418 1419
1419 // Step 1: prepare a map for the object. We add unboxed double property to it. 1420 // Step 1: prepare a map for the object. We add unboxed double property to it.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 1681
1681 // TODO(ishell): add respective tests for property kind reconfiguring from 1682 // TODO(ishell): add respective tests for property kind reconfiguring from
1682 // accessor field to double, once accessor fields are supported by 1683 // accessor field to double, once accessor fields are supported by
1683 // Map::ReconfigureProperty(). 1684 // Map::ReconfigureProperty().
1684 1685
1685 1686
1686 // TODO(ishell): add respective tests for fast property removal case once 1687 // TODO(ishell): add respective tests for fast property removal case once
1687 // Map::ReconfigureProperty() supports that. 1688 // Map::ReconfigureProperty() supports that.
1688 1689
1689 #endif 1690 #endif
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698