| 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 18 matching lines...) Expand all Loading... |
| 29 #include <utility> | 29 #include <utility> |
| 30 | 30 |
| 31 #include "src/v8.h" | 31 #include "src/v8.h" |
| 32 | 32 |
| 33 #include "src/compilation-cache.h" | 33 #include "src/compilation-cache.h" |
| 34 #include "src/execution.h" | 34 #include "src/execution.h" |
| 35 #include "src/factory.h" | 35 #include "src/factory.h" |
| 36 #include "src/global-handles.h" | 36 #include "src/global-handles.h" |
| 37 #include "src/ic/ic.h" | 37 #include "src/ic/ic.h" |
| 38 #include "src/macro-assembler.h" | 38 #include "src/macro-assembler.h" |
| 39 #include "src/snapshot.h" | |
| 40 #include "test/cctest/cctest.h" | 39 #include "test/cctest/cctest.h" |
| 41 | 40 |
| 42 using namespace v8::internal; | 41 using namespace v8::internal; |
| 43 using v8::Just; | 42 using v8::Just; |
| 44 | 43 |
| 45 static void CheckMap(Map* map, int type, int instance_size) { | 44 static void CheckMap(Map* map, int type, int instance_size) { |
| 46 CHECK(map->IsHeapObject()); | 45 CHECK(map->IsHeapObject()); |
| 47 #ifdef DEBUG | 46 #ifdef DEBUG |
| 48 CHECK(CcTest::heap()->Contains(map)); | 47 CHECK(CcTest::heap()->Contains(map)); |
| 49 #endif | 48 #endif |
| (...skipping 5142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5192 | 5191 |
| 5193 TEST(WritableVsImmortalRoots) { | 5192 TEST(WritableVsImmortalRoots) { |
| 5194 for (int i = 0; i < Heap::kStrongRootListLength; ++i) { | 5193 for (int i = 0; i < Heap::kStrongRootListLength; ++i) { |
| 5195 Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(i); | 5194 Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(i); |
| 5196 bool writable = Heap::RootCanBeWrittenAfterInitialization(root_index); | 5195 bool writable = Heap::RootCanBeWrittenAfterInitialization(root_index); |
| 5197 bool immortal = Heap::RootIsImmortalImmovable(root_index); | 5196 bool immortal = Heap::RootIsImmortalImmovable(root_index); |
| 5198 // A root value can be writable, immortal, or neither, but not both. | 5197 // A root value can be writable, immortal, or neither, but not both. |
| 5199 CHECK(!immortal || !writable); | 5198 CHECK(!immortal || !writable); |
| 5200 } | 5199 } |
| 5201 } | 5200 } |
| OLD | NEW |