diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
| commit | a4e969f4965059196ca948db781e52f7cfebf19e (patch) | |
| tree | 6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/heap/WriteBarrierBuffer.h | |
| parent | 41386e9cb918eed93b3f13648cbef387e371e451 (diff) | |
| download | WebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz | |
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/heap/WriteBarrierBuffer.h')
| -rw-r--r-- | Source/JavaScriptCore/heap/WriteBarrierBuffer.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/JavaScriptCore/heap/WriteBarrierBuffer.h b/Source/JavaScriptCore/heap/WriteBarrierBuffer.h index 9126bdbe9..7359083cd 100644 --- a/Source/JavaScriptCore/heap/WriteBarrierBuffer.h +++ b/Source/JavaScriptCore/heap/WriteBarrierBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,10 +33,7 @@ namespace JSC { class Heap; class JSCell; -namespace FTL { class LowerDFGToLLVM; } - class WriteBarrierBuffer { - friend class FTL::LowerDFGToLLVM; public: WriteBarrierBuffer(unsigned capacity); ~WriteBarrierBuffer(); @@ -45,25 +42,25 @@ public: void flush(Heap&); void reset(); - static ptrdiff_t currentIndexOffset() + unsigned* currentIndexAddress() { - return OBJECT_OFFSETOF(WriteBarrierBuffer, m_currentIndex); + return &m_currentIndex; } - static ptrdiff_t capacityOffset() + unsigned capacity() const { - return OBJECT_OFFSETOF(WriteBarrierBuffer, m_capacity); + return m_capacity; } - static ptrdiff_t bufferOffset() + JSCell** buffer() { - return OBJECT_OFFSETOF(WriteBarrierBuffer, m_buffer); + return m_buffer; } private: unsigned m_currentIndex; - unsigned m_capacity; - JSCell** m_buffer; + const unsigned m_capacity; + JSCell** const m_buffer; }; } // namespace JSC |
