diff options
Diffstat (limited to 'Source/JavaScriptCore/interpreter')
| -rw-r--r-- | Source/JavaScriptCore/interpreter/CachedCall.h | 3 | ||||
| -rw-r--r-- | Source/JavaScriptCore/interpreter/Interpreter.cpp | 13 | ||||
| -rw-r--r-- | Source/JavaScriptCore/interpreter/Interpreter.h | 4 | ||||
| -rw-r--r-- | Source/JavaScriptCore/interpreter/Register.h | 4 | ||||
| -rw-r--r-- | Source/JavaScriptCore/interpreter/RegisterFile.h | 6 |
5 files changed, 16 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/interpreter/CachedCall.h b/Source/JavaScriptCore/interpreter/CachedCall.h index dfbe658..740001d 100644 --- a/Source/JavaScriptCore/interpreter/CachedCall.h +++ b/Source/JavaScriptCore/interpreter/CachedCall.h @@ -32,7 +32,8 @@ #include "Interpreter.h" namespace JSC { - class CachedCall : public Noncopyable { + class CachedCall { + WTF_MAKE_NONCOPYABLE(CachedCall); WTF_MAKE_FAST_ALLOCATED; public: CachedCall(CallFrame* callFrame, JSFunction* function, int argCount) : m_valid(false) diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp index cf9f8a1..392e8b8 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.cpp +++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp @@ -4802,12 +4802,13 @@ JSValue Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* functio if (codeBlock->usesArguments()) { ASSERT(codeBlock->codeType() == FunctionCode); int argumentsRegister = codeBlock->argumentsRegister(); - if (!functionCallFrame->r(argumentsRegister).jsValue()) { - JSValue arguments = JSValue(new (callFrame) Arguments(functionCallFrame)); - functionCallFrame->r(argumentsRegister) = arguments; - functionCallFrame->r(unmodifiedArgumentsRegister(argumentsRegister)) = arguments; - } - return functionCallFrame->r(argumentsRegister).jsValue(); + int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister); + if (JSValue arguments = functionCallFrame->uncheckedR(argumentsRegister).jsValue()) + return arguments; + JSValue arguments = JSValue(new (callFrame) Arguments(functionCallFrame)); + functionCallFrame->r(argumentsRegister) = arguments; + functionCallFrame->r(realArgumentsRegister) = arguments; + return arguments; } Arguments* arguments = new (functionCallFrame) Arguments(functionCallFrame); diff --git a/Source/JavaScriptCore/interpreter/Interpreter.h b/Source/JavaScriptCore/interpreter/Interpreter.h index 47790cf..753d90e 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.h +++ b/Source/JavaScriptCore/interpreter/Interpreter.h @@ -30,7 +30,6 @@ #define Interpreter_h #include "ArgList.h" -#include "FastAllocBase.h" #include "JSCell.h" #include "JSValue.h" #include "JSObject.h" @@ -65,7 +64,8 @@ namespace JSC { enum { MaxLargeThreadReentryDepth = 256, MaxSmallThreadReentryDepth = 32 }; - class Interpreter : public FastAllocBase { + class Interpreter { + WTF_MAKE_FAST_ALLOCATED; friend class JIT; friend class CachedCall; public: diff --git a/Source/JavaScriptCore/interpreter/Register.h b/Source/JavaScriptCore/interpreter/Register.h index 38d1647..3944642 100644 --- a/Source/JavaScriptCore/interpreter/Register.h +++ b/Source/JavaScriptCore/interpreter/Register.h @@ -31,7 +31,6 @@ #include "JSValue.h" #include <wtf/Assertions.h> -#include <wtf/FastAllocBase.h> #include <wtf/VectorTraits.h> namespace JSC { @@ -47,7 +46,8 @@ namespace JSC { typedef ExecState CallFrame; - class Register : public WTF::FastAllocBase { + class Register { + WTF_MAKE_FAST_ALLOCATED; public: Register(); diff --git a/Source/JavaScriptCore/interpreter/RegisterFile.h b/Source/JavaScriptCore/interpreter/RegisterFile.h index f2e6553..9dfc432 100644 --- a/Source/JavaScriptCore/interpreter/RegisterFile.h +++ b/Source/JavaScriptCore/interpreter/RegisterFile.h @@ -89,7 +89,8 @@ namespace JSC { class JSGlobalObject; - class RegisterFile : public Noncopyable { + class RegisterFile { + WTF_MAKE_NONCOPYABLE(RegisterFile); friend class JIT; public: enum CallFrameHeaderEntry { @@ -131,8 +132,7 @@ namespace JSC { Register* lastGlobal() const { return m_start - m_numGlobals; } - void markGlobals(MarkStack& markStack, Heap* heap) { heap->markConservatively(markStack, lastGlobal(), m_start); } - void markCallFrames(MarkStack& markStack, Heap* heap) { heap->markConservatively(markStack, m_start, m_end); } + void markCallFrames(ConservativeSet& conservativeSet, Heap* heap) { heap->markConservatively(conservativeSet, m_start, m_end); } static size_t committedByteCount(); static void initializeThreading(); |
