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

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

Issue 3764011: Link all global contexts into a weak list. (Closed)
Patch Set: Created 10 years, 2 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
OLDNEW
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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 } 1478 }
1479 1479
1480 1480
1481 void FixedArray::set_unchecked(int index, Smi* value) { 1481 void FixedArray::set_unchecked(int index, Smi* value) {
1482 ASSERT(reinterpret_cast<Object*>(value)->IsSmi()); 1482 ASSERT(reinterpret_cast<Object*>(value)->IsSmi());
1483 int offset = kHeaderSize + index * kPointerSize; 1483 int offset = kHeaderSize + index * kPointerSize;
1484 WRITE_FIELD(this, offset, value); 1484 WRITE_FIELD(this, offset, value);
1485 } 1485 }
1486 1486
1487 1487
1488 void FixedArray::set_unchecked(int index,
1489 Object* value,
1490 WriteBarrierMode mode) {
1491 int offset = kHeaderSize + index * kPointerSize;
1492 WRITE_FIELD(this, offset, value);
1493 CONDITIONAL_WRITE_BARRIER(this, offset, mode);
1494 }
1495
1496
1488 void FixedArray::set_null_unchecked(int index) { 1497 void FixedArray::set_null_unchecked(int index) {
1489 ASSERT(index >= 0 && index < this->length()); 1498 ASSERT(index >= 0 && index < this->length());
1490 ASSERT(!Heap::InNewSpace(Heap::null_value())); 1499 ASSERT(!Heap::InNewSpace(Heap::null_value()));
1491 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::null_value()); 1500 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, Heap::null_value());
1492 } 1501 }
1493 1502
1494 1503
1495 Object** FixedArray::data_start() { 1504 Object** FixedArray::data_start() {
1496 return HeapObject::RawField(this, kHeaderSize); 1505 return HeapObject::RawField(this, kHeaderSize);
1497 } 1506 }
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 #undef WRITE_INT_FIELD 3559 #undef WRITE_INT_FIELD
3551 #undef READ_SHORT_FIELD 3560 #undef READ_SHORT_FIELD
3552 #undef WRITE_SHORT_FIELD 3561 #undef WRITE_SHORT_FIELD
3553 #undef READ_BYTE_FIELD 3562 #undef READ_BYTE_FIELD
3554 #undef WRITE_BYTE_FIELD 3563 #undef WRITE_BYTE_FIELD
3555 3564
3556 3565
3557 } } // namespace v8::internal 3566 } } // namespace v8::internal
3558 3567
3559 #endif // V8_OBJECTS_INL_H_ 3568 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/mark-compact.cc ('K') | « src/objects.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698