| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 CHECK(Isolate::Current()->context()->global()-> | 224 CHECK(Isolate::Current()->context()->global()-> |
| 225 GetProperty(obj_name)->ToObjectChecked()->IsJSObject()); | 225 GetProperty(obj_name)->ToObjectChecked()->IsJSObject()); |
| 226 obj = JSObject::cast(Isolate::Current()->context()->global()-> | 226 obj = JSObject::cast(Isolate::Current()->context()->global()-> |
| 227 GetProperty(obj_name)->ToObjectChecked()); | 227 GetProperty(obj_name)->ToObjectChecked()); |
| 228 prop_name = | 228 prop_name = |
| 229 String::cast(HEAP->LookupAsciiSymbol("theSlot")->ToObjectChecked()); | 229 String::cast(HEAP->LookupAsciiSymbol("theSlot")->ToObjectChecked()); |
| 230 CHECK(obj->GetProperty(prop_name) == Smi::FromInt(23)); | 230 CHECK(obj->GetProperty(prop_name) == Smi::FromInt(23)); |
| 231 } | 231 } |
| 232 | 232 |
| 233 | 233 |
| 234 // TODO(gc): compaction of map space is temporary removed from GC. | 234 // TODO(1600): compaction of map space is temporary removed from GC. |
| 235 #if 0 | 235 #if 0 |
| 236 static Handle<Map> CreateMap() { | 236 static Handle<Map> CreateMap() { |
| 237 return FACTORY->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); | 237 return FACTORY->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
| 238 } | 238 } |
| 239 | 239 |
| 240 | 240 |
| 241 TEST(MapCompact) { | 241 TEST(MapCompact) { |
| 242 FLAG_max_map_space_pages = 16; | 242 FLAG_max_map_space_pages = 16; |
| 243 InitializeVM(); | 243 InitializeVM(); |
| 244 | 244 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 Handle<Object> object = | 440 Handle<Object> object = |
| 441 global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked()); | 441 global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked()); |
| 442 | 442 |
| 443 TestRetainedObjectInfo info; | 443 TestRetainedObjectInfo info; |
| 444 global_handles->AddObjectGroup(NULL, 0, &info); | 444 global_handles->AddObjectGroup(NULL, 0, &info); |
| 445 ASSERT(info.has_been_disposed()); | 445 ASSERT(info.has_been_disposed()); |
| 446 | 446 |
| 447 global_handles->AddImplicitReferences( | 447 global_handles->AddImplicitReferences( |
| 448 Handle<HeapObject>::cast(object).location(), NULL, 0); | 448 Handle<HeapObject>::cast(object).location(), NULL, 0); |
| 449 } | 449 } |
| OLD | NEW |