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 5578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5589 CcTest::InitializeVM(); | 5589 CcTest::InitializeVM(); |
5590 v8::HandleScope scope(CcTest::isolate()); | 5590 v8::HandleScope scope(CcTest::isolate()); |
5591 Isolate* isolate = CcTest::i_isolate(); | 5591 Isolate* isolate = CcTest::i_isolate(); |
5592 Factory* factory = isolate->factory(); | 5592 Factory* factory = isolate->factory(); |
5593 Heap* heap = isolate->heap(); | 5593 Heap* heap = isolate->heap(); |
5594 | 5594 |
5595 Handle<Map> map1 = Map::Create(isolate, 1); | 5595 Handle<Map> map1 = Map::Create(isolate, 1); |
5596 Handle<String> name = factory->NewStringFromStaticChars("foo"); | 5596 Handle<String> name = factory->NewStringFromStaticChars("foo"); |
5597 name = factory->InternalizeString(name); | 5597 name = factory->InternalizeString(name); |
5598 Handle<Map> map2 = | 5598 Handle<Map> map2 = |
5599 Map::CopyWithField(map1, name, FieldType::Any(isolate), NONE, | 5599 Map::CopyWithField(map1, name, FieldType::Any(isolate), NONE, kMutable, |
5600 Representation::Tagged(), OMIT_TRANSITION) | 5600 Representation::Tagged(), OMIT_TRANSITION) |
5601 .ToHandleChecked(); | 5601 .ToHandleChecked(); |
5602 | 5602 |
5603 size_t desired_offset = Page::kPageSize - map1->instance_size(); | 5603 size_t desired_offset = Page::kPageSize - map1->instance_size(); |
5604 | 5604 |
5605 // Allocate padding objects in old pointer space so, that object allocated | 5605 // Allocate padding objects in old pointer space so, that object allocated |
5606 // afterwards would end at the end of the page. | 5606 // afterwards would end at the end of the page. |
5607 heap::SimulateFullSpace(heap->old_space()); | 5607 heap::SimulateFullSpace(heap->old_space()); |
5608 size_t padding_size = desired_offset - Page::kObjectStartOffset; | 5608 size_t padding_size = desired_offset - Page::kObjectStartOffset; |
5609 heap::CreatePadding(heap, static_cast<int>(padding_size), TENURED); | 5609 heap::CreatePadding(heap, static_cast<int>(padding_size), TENURED); |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6943 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); | 6943 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); |
6944 | 6944 |
6945 // Ensure it's not in large object space. | 6945 // Ensure it's not in large object space. |
6946 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); | 6946 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); |
6947 CHECK(chunk->owner()->identity() != LO_SPACE); | 6947 CHECK(chunk->owner()->identity() != LO_SPACE); |
6948 CHECK(chunk->NeverEvacuate()); | 6948 CHECK(chunk->NeverEvacuate()); |
6949 } | 6949 } |
6950 | 6950 |
6951 } // namespace internal | 6951 } // namespace internal |
6952 } // namespace v8 | 6952 } // namespace v8 |
OLD | NEW |