summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/heap/WriteBarrierBuffer.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
commit41386e9cb918eed93b3f13648cbef387e371e451 (patch)
treea97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/heap/WriteBarrierBuffer.h
parente15dd966d523731101f70ccf768bba12435a0208 (diff)
downloadWebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/heap/WriteBarrierBuffer.h')
-rw-r--r--Source/JavaScriptCore/heap/WriteBarrierBuffer.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/heap/WriteBarrierBuffer.h b/Source/JavaScriptCore/heap/WriteBarrierBuffer.h
index 7359083cd..9126bdbe9 100644
--- a/Source/JavaScriptCore/heap/WriteBarrierBuffer.h
+++ b/Source/JavaScriptCore/heap/WriteBarrierBuffer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 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,7 +33,10 @@ namespace JSC {
class Heap;
class JSCell;
+namespace FTL { class LowerDFGToLLVM; }
+
class WriteBarrierBuffer {
+ friend class FTL::LowerDFGToLLVM;
public:
WriteBarrierBuffer(unsigned capacity);
~WriteBarrierBuffer();
@@ -42,25 +45,25 @@ public:
void flush(Heap&);
void reset();
- unsigned* currentIndexAddress()
+ static ptrdiff_t currentIndexOffset()
{
- return &m_currentIndex;
+ return OBJECT_OFFSETOF(WriteBarrierBuffer, m_currentIndex);
}
- unsigned capacity() const
+ static ptrdiff_t capacityOffset()
{
- return m_capacity;
+ return OBJECT_OFFSETOF(WriteBarrierBuffer, m_capacity);
}
- JSCell** buffer()
+ static ptrdiff_t bufferOffset()
{
- return m_buffer;
+ return OBJECT_OFFSETOF(WriteBarrierBuffer, m_buffer);
}
private:
unsigned m_currentIndex;
- const unsigned m_capacity;
- JSCell** const m_buffer;
+ unsigned m_capacity;
+ JSCell** m_buffer;
};
} // namespace JSC