summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/jit')
-rw-r--r--Source/JavaScriptCore/jit/JITInlineMethods.h3
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes.cpp18
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes32_64.cpp18
-rw-r--r--Source/JavaScriptCore/jit/JITStubs.cpp25
-rw-r--r--Source/JavaScriptCore/jit/JITWriteBarrier.h4
-rw-r--r--Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp1
6 files changed, 28 insertions, 41 deletions
diff --git a/Source/JavaScriptCore/jit/JITInlineMethods.h b/Source/JavaScriptCore/jit/JITInlineMethods.h
index e68ecbe78..3f32597fa 100644
--- a/Source/JavaScriptCore/jit/JITInlineMethods.h
+++ b/Source/JavaScriptCore/jit/JITInlineMethods.h
@@ -422,9 +422,6 @@ template <typename ClassType, bool destructor, typename StructureType> inline vo
// initialize the object's structure
storePtr(structure, Address(result, JSCell::structureOffset()));
- // initialize the object's classInfo pointer
- storePtr(TrustedImmPtr(&ClassType::s_info), Address(result, JSCell::classInfoOffset()));
-
// initialize the object's property storage pointer
storePtr(TrustedImmPtr(0), Address(result, ClassType::offsetOfOutOfLineStorage()));
}
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp
index 9b7dc634f..f859f8b93 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp
@@ -559,25 +559,23 @@ void JIT::emit_op_construct(Instruction* currentInstruction)
void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
{
- unsigned activation = currentInstruction[1].u.operand;
- unsigned arguments = currentInstruction[2].u.operand;
- Jump activationCreated = branchTestPtr(NonZero, addressFor(activation));
- Jump argumentsNotCreated = branchTestPtr(Zero, addressFor(arguments));
- activationCreated.link(this);
+ int activation = currentInstruction[1].u.operand;
+ Jump activationNotCreated = branchTestPtr(Zero, addressFor(activation));
JITStubCall stubCall(this, cti_op_tear_off_activation);
stubCall.addArgument(activation, regT2);
- stubCall.addArgument(unmodifiedArgumentsRegister(arguments), regT2);
stubCall.call();
- argumentsNotCreated.link(this);
+ activationNotCreated.link(this);
}
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
- unsigned dst = currentInstruction[1].u.operand;
+ int arguments = currentInstruction[1].u.operand;
+ int activation = currentInstruction[2].u.operand;
- Jump argsNotCreated = branchTestPtr(Zero, Address(callFrameRegister, sizeof(Register) * (unmodifiedArgumentsRegister(dst))));
+ Jump argsNotCreated = branchTestPtr(Zero, Address(callFrameRegister, sizeof(Register) * (unmodifiedArgumentsRegister(arguments))));
JITStubCall stubCall(this, cti_op_tear_off_arguments);
- stubCall.addArgument(unmodifiedArgumentsRegister(dst), regT2);
+ stubCall.addArgument(unmodifiedArgumentsRegister(arguments), regT2);
+ stubCall.addArgument(activation, regT2);
stubCall.call();
argsNotCreated.link(this);
}
diff --git a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
index c94f5d910..adfb57341 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
@@ -703,24 +703,22 @@ void JIT::emit_op_is_string(Instruction* currentInstruction)
void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
{
unsigned activation = currentInstruction[1].u.operand;
- unsigned arguments = currentInstruction[2].u.operand;
- Jump activationCreated = branch32(NotEqual, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
- Jump argumentsNotCreated = branch32(Equal, tagFor(arguments), TrustedImm32(JSValue::EmptyValueTag));
- activationCreated.link(this);
+ Jump activationNotCreated = branch32(Equal, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
JITStubCall stubCall(this, cti_op_tear_off_activation);
- stubCall.addArgument(currentInstruction[1].u.operand);
- stubCall.addArgument(unmodifiedArgumentsRegister(currentInstruction[2].u.operand));
+ stubCall.addArgument(activation);
stubCall.call();
- argumentsNotCreated.link(this);
+ activationNotCreated.link(this);
}
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
- int dst = currentInstruction[1].u.operand;
+ int arguments = currentInstruction[1].u.operand;
+ int activation = currentInstruction[2].u.operand;
- Jump argsNotCreated = branch32(Equal, tagFor(unmodifiedArgumentsRegister(dst)), TrustedImm32(JSValue::EmptyValueTag));
+ Jump argsNotCreated = branch32(Equal, tagFor(unmodifiedArgumentsRegister(arguments)), TrustedImm32(JSValue::EmptyValueTag));
JITStubCall stubCall(this, cti_op_tear_off_arguments);
- stubCall.addArgument(unmodifiedArgumentsRegister(dst));
+ stubCall.addArgument(unmodifiedArgumentsRegister(arguments));
+ stubCall.addArgument(activation);
stubCall.call();
argsNotCreated.link(this);
}
diff --git a/Source/JavaScriptCore/jit/JITStubs.cpp b/Source/JavaScriptCore/jit/JITStubs.cpp
index 8fc395a63..5fad9c8d7 100644
--- a/Source/JavaScriptCore/jit/JITStubs.cpp
+++ b/Source/JavaScriptCore/jit/JITStubs.cpp
@@ -2311,20 +2311,8 @@ DEFINE_STUB_FUNCTION(void, op_tear_off_activation)
{
STUB_INIT_STACK_FRAME(stackFrame);
- CallFrame* callFrame = stackFrame.callFrame;
- ASSERT(callFrame->codeBlock()->needsFullScopeChain());
- JSValue activationValue = stackFrame.args[0].jsValue();
- if (!activationValue) {
- if (JSValue v = stackFrame.args[1].jsValue()) {
- if (!callFrame->codeBlock()->isStrictMode())
- asArguments(v)->tearOff(callFrame);
- }
- return;
- }
- JSActivation* activation = asActivation(stackFrame.args[0].jsValue());
- activation->tearOff(*stackFrame.globalData);
- if (JSValue v = stackFrame.args[1].jsValue())
- asArguments(v)->didTearOffActivation(*stackFrame.globalData, activation);
+ ASSERT(stackFrame.callFrame->codeBlock()->needsFullScopeChain());
+ jsCast<JSActivation*>(stackFrame.args[0].jsValue())->tearOff(*stackFrame.globalData);
}
DEFINE_STUB_FUNCTION(void, op_tear_off_arguments)
@@ -2332,8 +2320,13 @@ DEFINE_STUB_FUNCTION(void, op_tear_off_arguments)
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
- ASSERT(callFrame->codeBlock()->usesArguments() && !callFrame->codeBlock()->needsFullScopeChain());
- asArguments(stackFrame.args[0].jsValue())->tearOff(callFrame);
+ ASSERT(callFrame->codeBlock()->usesArguments());
+ Arguments* arguments = jsCast<Arguments*>(stackFrame.args[0].jsValue());
+ if (JSValue activationValue = stackFrame.args[1].jsValue()) {
+ arguments->didTearOffActivation(callFrame->globalData(), jsCast<JSActivation*>(activationValue));
+ return;
+ }
+ arguments->tearOff(callFrame);
}
DEFINE_STUB_FUNCTION(void, op_profile_will_call)
diff --git a/Source/JavaScriptCore/jit/JITWriteBarrier.h b/Source/JavaScriptCore/jit/JITWriteBarrier.h
index 81a3653a0..ee73b702f 100644
--- a/Source/JavaScriptCore/jit/JITWriteBarrier.h
+++ b/Source/JavaScriptCore/jit/JITWriteBarrier.h
@@ -29,7 +29,7 @@
#if ENABLE(JIT)
#include "MacroAssembler.h"
-#include "MarkStack.h"
+#include "SlotVisitor.h"
#include "WriteBarrier.h"
namespace JSC {
@@ -135,7 +135,7 @@ public:
}
};
-template<typename T> inline void MarkStack::append(JITWriteBarrier<T>* slot)
+template<typename T> inline void SlotVisitor::append(JITWriteBarrier<T>* slot)
{
internalAppend(slot->get());
}
diff --git a/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp b/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp
index 00311dab4..26eae57be 100644
--- a/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp
+++ b/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp
@@ -29,6 +29,7 @@
#if ENABLE(JIT)
#include "LinkBuffer.h"
+#include "Options.h"
namespace JSC {