| OLD | NEW |
| 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 9681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9692 | 9692 |
| 9693 class Cell: public HeapObject { | 9693 class Cell: public HeapObject { |
| 9694 public: | 9694 public: |
| 9695 // [value]: value of the cell. | 9695 // [value]: value of the cell. |
| 9696 DECL_ACCESSORS(value, Object) | 9696 DECL_ACCESSORS(value, Object) |
| 9697 | 9697 |
| 9698 DECLARE_CAST(Cell) | 9698 DECLARE_CAST(Cell) |
| 9699 | 9699 |
| 9700 static inline Cell* FromValueAddress(Address value) { | 9700 static inline Cell* FromValueAddress(Address value) { |
| 9701 Object* result = FromAddress(value - kValueOffset); | 9701 Object* result = FromAddress(value - kValueOffset); |
| 9702 DCHECK(result->IsCell() || result->IsPropertyCell()); | 9702 DCHECK(result->IsCell()); |
| 9703 return static_cast<Cell*>(result); | 9703 return static_cast<Cell*>(result); |
| 9704 } | 9704 } |
| 9705 | 9705 |
| 9706 inline Address ValueAddress() { | 9706 inline Address ValueAddress() { |
| 9707 return address() + kValueOffset; | 9707 return address() + kValueOffset; |
| 9708 } | 9708 } |
| 9709 | 9709 |
| 9710 // Dispatched behavior. | 9710 // Dispatched behavior. |
| 9711 DECLARE_PRINTER(Cell) | 9711 DECLARE_PRINTER(Cell) |
| 9712 DECLARE_VERIFIER(Cell) | 9712 DECLARE_VERIFIER(Cell) |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10995 } else { | 10995 } else { |
| 10996 value &= ~(1 << bit_position); | 10996 value &= ~(1 << bit_position); |
| 10997 } | 10997 } |
| 10998 return value; | 10998 return value; |
| 10999 } | 10999 } |
| 11000 }; | 11000 }; |
| 11001 | 11001 |
| 11002 } } // namespace v8::internal | 11002 } } // namespace v8::internal |
| 11003 | 11003 |
| 11004 #endif // V8_OBJECTS_H_ | 11004 #endif // V8_OBJECTS_H_ |
| OLD | NEW |