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

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

Issue 996133002: correctly invalidate global cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 5 years, 9 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
« no previous file with comments | « src/objects-debug.cc ('k') | src/property-details.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 1894
1895 1895
1896 void Cell::set_value(Object* val, WriteBarrierMode ignored) { 1896 void Cell::set_value(Object* val, WriteBarrierMode ignored) {
1897 // The write barrier is not used for global property cells. 1897 // The write barrier is not used for global property cells.
1898 DCHECK(!val->IsPropertyCell() && !val->IsCell()); 1898 DCHECK(!val->IsPropertyCell() && !val->IsCell());
1899 WRITE_FIELD(this, kValueOffset, val); 1899 WRITE_FIELD(this, kValueOffset, val);
1900 } 1900 }
1901 1901
1902 ACCESSORS(PropertyCell, dependent_code, DependentCode, kDependentCodeOffset) 1902 ACCESSORS(PropertyCell, dependent_code, DependentCode, kDependentCodeOffset)
1903 1903
1904 Object* PropertyCell::type_raw() const {
1905 return READ_FIELD(this, kTypeOffset);
1906 }
1907
1908
1909 void PropertyCell::set_type_raw(Object* val, WriteBarrierMode ignored) {
1910 WRITE_FIELD(this, kTypeOffset, val);
1911 }
1912
1913 1904
1914 Object* WeakCell::value() const { return READ_FIELD(this, kValueOffset); } 1905 Object* WeakCell::value() const { return READ_FIELD(this, kValueOffset); }
1915 1906
1916 1907
1917 void WeakCell::clear() { 1908 void WeakCell::clear() {
1918 DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT); 1909 DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT);
1919 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0)); 1910 WRITE_FIELD(this, kValueOffset, Smi::FromInt(0));
1920 } 1911 }
1921 1912
1922 1913
(...skipping 5586 matching lines...) Expand 10 before | Expand all | Expand 10 after
7509 #undef READ_SHORT_FIELD 7500 #undef READ_SHORT_FIELD
7510 #undef WRITE_SHORT_FIELD 7501 #undef WRITE_SHORT_FIELD
7511 #undef READ_BYTE_FIELD 7502 #undef READ_BYTE_FIELD
7512 #undef WRITE_BYTE_FIELD 7503 #undef WRITE_BYTE_FIELD
7513 #undef NOBARRIER_READ_BYTE_FIELD 7504 #undef NOBARRIER_READ_BYTE_FIELD
7514 #undef NOBARRIER_WRITE_BYTE_FIELD 7505 #undef NOBARRIER_WRITE_BYTE_FIELD
7515 7506
7516 } } // namespace v8::internal 7507 } } // namespace v8::internal
7517 7508
7518 #endif // V8_OBJECTS_INL_H_ 7509 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698