X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/fb8617cde5834786bd4e4afd579883e4acf5666e..4e4e5a6f2694187498445a6ac6f1634ce8141119:/interpreter/RegisterFile.h diff --git a/interpreter/RegisterFile.h b/interpreter/RegisterFile.h index 1fc4f82..def9e25 100644 --- a/interpreter/RegisterFile.h +++ b/interpreter/RegisterFile.h @@ -32,6 +32,7 @@ #include "Collector.h" #include "ExecutableAllocator.h" #include "Register.h" +#include "WeakGCPtr.h" #include #include #include @@ -124,8 +125,9 @@ namespace JSC { Register* end() const { return m_end; } size_t size() const { return m_end - m_start; } - void setGlobalObject(JSGlobalObject* globalObject) { m_globalObject = globalObject; } - JSGlobalObject* globalObject() { return m_globalObject; } + void setGlobalObject(JSGlobalObject*); + bool clearGlobalObject(JSGlobalObject*); + JSGlobalObject* globalObject(); bool grow(Register* newEnd); void shrink(Register* newEnd); @@ -153,7 +155,7 @@ namespace JSC { Register* m_commitEnd; #endif - JSGlobalObject* m_globalObject; // The global object whose vars are currently stored in the register file. + WeakGCPtr m_globalObject; // The global object whose vars are currently stored in the register file. }; // FIXME: Add a generic getpagesize() to WTF, then move this function to WTF as well. @@ -166,7 +168,6 @@ namespace JSC { , m_end(0) , m_max(0) , m_buffer(0) - , m_globalObject(0) { // Verify that our values will play nice with mmap and VirtualAlloc. ASSERT(isPageAligned(maxGlobals));