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

Side by Side Diff: src/objects-inl.h

Issue 7553012: Prototype of mark-and-compact support for Harmony weak maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed commented stress test. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/objects-visiting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3786 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 WRITE_FIELD(this, OffsetOfCodeWithId(id), value); 3797 WRITE_FIELD(this, OffsetOfCodeWithId(id), value);
3798 ASSERT(!HEAP->InNewSpace(value)); 3798 ASSERT(!HEAP->InNewSpace(value));
3799 } 3799 }
3800 3800
3801 3801
3802 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) 3802 ACCESSORS(JSProxy, handler, Object, kHandlerOffset)
3803 ACCESSORS(JSProxy, padding, Object, kPaddingOffset) 3803 ACCESSORS(JSProxy, padding, Object, kPaddingOffset)
3804 3804
3805 3805
3806 ACCESSORS(JSWeakMap, table, ObjectHashTable, kTableOffset) 3806 ACCESSORS(JSWeakMap, table, ObjectHashTable, kTableOffset)
3807 ACCESSORS_GCSAFE(JSWeakMap, next, Object, kNextOffset)
3808
3809
3810 ObjectHashTable* JSWeakMap::unchecked_table() {
3811 return reinterpret_cast<ObjectHashTable*>(READ_FIELD(this, kTableOffset));
3812 }
3807 3813
3808 3814
3809 Address Foreign::address() { 3815 Address Foreign::address() {
3810 return AddressFrom<Address>(READ_INTPTR_FIELD(this, kAddressOffset)); 3816 return AddressFrom<Address>(READ_INTPTR_FIELD(this, kAddressOffset));
3811 } 3817 }
3812 3818
3813 3819
3814 void Foreign::set_address(Address value) { 3820 void Foreign::set_address(Address value) {
3815 WRITE_INTPTR_FIELD(this, kAddressOffset, OffsetFrom(value)); 3821 WRITE_INTPTR_FIELD(this, kAddressOffset, OffsetFrom(value));
3816 } 3822 }
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
4402 ASSERT(!maybe_hash->IsFailure()); 4408 ASSERT(!maybe_hash->IsFailure());
4403 return Smi::cast(maybe_hash->ToObjectUnchecked())->value(); 4409 return Smi::cast(maybe_hash->ToObjectUnchecked())->value();
4404 } 4410 }
4405 4411
4406 4412
4407 MaybeObject* ObjectHashTableShape::AsObject(JSObject* key) { 4413 MaybeObject* ObjectHashTableShape::AsObject(JSObject* key) {
4408 return key; 4414 return key;
4409 } 4415 }
4410 4416
4411 4417
4418 void ObjectHashTable::RemoveEntry(int entry) {
4419 RemoveEntry(entry, GetHeap());
4420 }
4421
4422
4412 void Map::ClearCodeCache(Heap* heap) { 4423 void Map::ClearCodeCache(Heap* heap) {
4413 // No write barrier is needed since empty_fixed_array is not in new space. 4424 // No write barrier is needed since empty_fixed_array is not in new space.
4414 // Please note this function is used during marking: 4425 // Please note this function is used during marking:
4415 // - MarkCompactCollector::MarkUnmarkedObject 4426 // - MarkCompactCollector::MarkUnmarkedObject
4416 ASSERT(!heap->InNewSpace(heap->raw_unchecked_empty_fixed_array())); 4427 ASSERT(!heap->InNewSpace(heap->raw_unchecked_empty_fixed_array()));
4417 WRITE_FIELD(this, kCodeCacheOffset, heap->raw_unchecked_empty_fixed_array()); 4428 WRITE_FIELD(this, kCodeCacheOffset, heap->raw_unchecked_empty_fixed_array());
4418 } 4429 }
4419 4430
4420 4431
4421 void JSArray::EnsureSize(int required_size) { 4432 void JSArray::EnsureSize(int required_size) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
4553 #undef WRITE_INT_FIELD 4564 #undef WRITE_INT_FIELD
4554 #undef READ_SHORT_FIELD 4565 #undef READ_SHORT_FIELD
4555 #undef WRITE_SHORT_FIELD 4566 #undef WRITE_SHORT_FIELD
4556 #undef READ_BYTE_FIELD 4567 #undef READ_BYTE_FIELD
4557 #undef WRITE_BYTE_FIELD 4568 #undef WRITE_BYTE_FIELD
4558 4569
4559 4570
4560 } } // namespace v8::internal 4571 } } // namespace v8::internal
4561 4572
4562 #endif // V8_OBJECTS_INL_H_ 4573 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698