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 5725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5736 CcTest::InitializeVM(); | 5736 CcTest::InitializeVM(); |
5737 v8::HandleScope scope(CcTest::isolate()); | 5737 v8::HandleScope scope(CcTest::isolate()); |
5738 Isolate* isolate = CcTest::i_isolate(); | 5738 Isolate* isolate = CcTest::i_isolate(); |
5739 Factory* factory = isolate->factory(); | 5739 Factory* factory = isolate->factory(); |
5740 Heap* heap = isolate->heap(); | 5740 Heap* heap = isolate->heap(); |
5741 | 5741 |
5742 Handle<Map> map1 = Map::Create(isolate, 1); | 5742 Handle<Map> map1 = Map::Create(isolate, 1); |
5743 Handle<String> name = factory->NewStringFromStaticChars("foo"); | 5743 Handle<String> name = factory->NewStringFromStaticChars("foo"); |
5744 name = factory->InternalizeString(name); | 5744 name = factory->InternalizeString(name); |
5745 Handle<Map> map2 = | 5745 Handle<Map> map2 = |
5746 Map::CopyWithField(map1, name, FieldType::Any(isolate), NONE, | 5746 Map::CopyWithField(map1, name, FieldType::Any(isolate), NONE, kMutable, |
5747 Representation::Tagged(), OMIT_TRANSITION) | 5747 Representation::Tagged(), OMIT_TRANSITION) |
5748 .ToHandleChecked(); | 5748 .ToHandleChecked(); |
5749 | 5749 |
5750 size_t desired_offset = Page::kPageSize - map1->instance_size(); | 5750 size_t desired_offset = Page::kPageSize - map1->instance_size(); |
5751 | 5751 |
5752 // Allocate padding objects in old pointer space so, that object allocated | 5752 // Allocate padding objects in old pointer space so, that object allocated |
5753 // afterwards would end at the end of the page. | 5753 // afterwards would end at the end of the page. |
5754 heap::SimulateFullSpace(heap->old_space()); | 5754 heap::SimulateFullSpace(heap->old_space()); |
5755 size_t padding_size = desired_offset - Page::kObjectStartOffset; | 5755 size_t padding_size = desired_offset - Page::kObjectStartOffset; |
5756 heap::CreatePadding(heap, static_cast<int>(padding_size), TENURED); | 5756 heap::CreatePadding(heap, static_cast<int>(padding_size), TENURED); |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7089 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); | 7089 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); |
7090 | 7090 |
7091 // Ensure it's not in large object space. | 7091 // Ensure it's not in large object space. |
7092 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); | 7092 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); |
7093 CHECK(chunk->owner()->identity() != LO_SPACE); | 7093 CHECK(chunk->owner()->identity() != LO_SPACE); |
7094 CHECK(chunk->NeverEvacuate()); | 7094 CHECK(chunk->NeverEvacuate()); |
7095 } | 7095 } |
7096 | 7096 |
7097 } // namespace internal | 7097 } // namespace internal |
7098 } // namespace v8 | 7098 } // namespace v8 |
OLD | NEW |