Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (224625 => 224626)
--- trunk/Source/_javascript_Core/ChangeLog 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-11-09 15:16:22 UTC (rev 224626)
@@ -1,3 +1,68 @@
+2017-11-03 Yusuke Suzuki <utatane....@gmail.com>
+
+ [JSC][JIT] Clean up SlowPathCall stubs
+ https://bugs.webkit.org/show_bug.cgi?id=179247
+
+ Reviewed by Saam Barati.
+
+ We have bunch of duplicate functions that just call a slow path function.
+ This patch cleans up the above duplication.
+
+ * jit/JIT.cpp:
+ (JSC::JIT::emitSlowCaseCall):
+ (JSC::JIT::privateCompileSlowCases):
+ * jit/JIT.h:
+ * jit/JITArithmetic.cpp:
+ (JSC::JIT::emitSlow_op_unsigned): Deleted.
+ (JSC::JIT::emitSlow_op_inc): Deleted.
+ (JSC::JIT::emitSlow_op_dec): Deleted.
+ (JSC::JIT::emitSlow_op_bitand): Deleted.
+ (JSC::JIT::emitSlow_op_bitor): Deleted.
+ (JSC::JIT::emitSlow_op_bitxor): Deleted.
+ (JSC::JIT::emitSlow_op_lshift): Deleted.
+ (JSC::JIT::emitSlow_op_rshift): Deleted.
+ (JSC::JIT::emitSlow_op_urshift): Deleted.
+ (JSC::JIT::emitSlow_op_div): Deleted.
+ * jit/JITArithmetic32_64.cpp:
+ (JSC::JIT::emitSlow_op_unsigned): Deleted.
+ (JSC::JIT::emitSlow_op_inc): Deleted.
+ (JSC::JIT::emitSlow_op_dec): Deleted.
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emitSlow_op_create_this): Deleted.
+ (JSC::JIT::emitSlow_op_check_tdz): Deleted.
+ (JSC::JIT::emitSlow_op_to_this): Deleted.
+ (JSC::JIT::emitSlow_op_to_primitive): Deleted.
+ (JSC::JIT::emitSlow_op_not): Deleted.
+ (JSC::JIT::emitSlow_op_stricteq): Deleted.
+ (JSC::JIT::emitSlow_op_nstricteq): Deleted.
+ (JSC::JIT::emitSlow_op_to_number): Deleted.
+ (JSC::JIT::emitSlow_op_to_string): Deleted.
+ (JSC::JIT::emitSlow_op_to_object): Deleted.
+ (JSC::JIT::emitSlow_op_get_direct_pname): Deleted.
+ (JSC::JIT::emitSlow_op_has_structure_property): Deleted.
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emitSlow_op_to_primitive): Deleted.
+ (JSC::JIT::emitSlow_op_not): Deleted.
+ (JSC::JIT::emitSlow_op_stricteq): Deleted.
+ (JSC::JIT::emitSlow_op_nstricteq): Deleted.
+ (JSC::JIT::emitSlow_op_to_number): Deleted.
+ (JSC::JIT::emitSlow_op_to_string): Deleted.
+ (JSC::JIT::emitSlow_op_to_object): Deleted.
+ (JSC::JIT::emitSlow_op_create_this): Deleted.
+ (JSC::JIT::emitSlow_op_to_this): Deleted.
+ (JSC::JIT::emitSlow_op_check_tdz): Deleted.
+ (JSC::JIT::emitSlow_op_get_direct_pname): Deleted.
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emitSlow_op_resolve_scope): Deleted.
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_resolve_scope):
+ (JSC::JIT::emitSlow_op_resolve_scope): Deleted.
+ * jit/SlowPathCall.h:
+ (JSC::JITSlowPathCall::JITSlowPathCall):
+ * runtime/CommonSlowPaths.cpp:
+ (JSC::SLOW_PATH_DECL):
+ * runtime/CommonSlowPaths.h:
+
2017-11-09 Guillaume Emont <guijem...@igalia.com>
[JSC][MIPS] Use fcsr to check the validity of the result of trunc.w.d
Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JIT.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -166,6 +166,20 @@
NEXT_OPCODE(name); \
}
+#define DEFINE_SLOWCASE_SLOW_OP(name) \
+ case op_##name: { \
+ emitSlowCaseCall(currentInstruction, iter, slow_path_##name); \
+ NEXT_OPCODE(op_##name); \
+ }
+
+void JIT::emitSlowCaseCall(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter, SlowPathFunction stub)
+{
+ linkAllSlowCases(iter);
+
+ JITSlowPathCall slowPathCall(this, currentInstruction, stub);
+ slowPathCall.call();
+}
+
void JIT::privateCompileMainPass()
{
if (false)
@@ -480,9 +494,6 @@
switch (Interpreter::getOpcodeID(currentInstruction->u.opcode)) {
DEFINE_SLOWCASE_OP(op_add)
- DEFINE_SLOWCASE_OP(op_bitand)
- DEFINE_SLOWCASE_OP(op_bitor)
- DEFINE_SLOWCASE_OP(op_bitxor)
DEFINE_SLOWCASE_OP(op_call)
DEFINE_SLOWCASE_OP(op_tail_call)
DEFINE_SLOWCASE_OP(op_call_eval)
@@ -491,10 +502,6 @@
DEFINE_SLOWCASE_OP(op_tail_call_forward_arguments)
DEFINE_SLOWCASE_OP(op_construct_varargs)
DEFINE_SLOWCASE_OP(op_construct)
- DEFINE_SLOWCASE_OP(op_to_this)
- DEFINE_SLOWCASE_OP(op_check_tdz)
- DEFINE_SLOWCASE_OP(op_create_this)
- DEFINE_SLOWCASE_OP(op_div)
DEFINE_SLOWCASE_OP(op_eq)
DEFINE_SLOWCASE_OP(op_try_get_by_id)
case op_get_array_length:
@@ -515,36 +522,43 @@
DEFINE_SLOWCASE_OP(op_jngreatereq)
DEFINE_SLOWCASE_OP(op_loop_hint)
DEFINE_SLOWCASE_OP(op_check_traps)
- DEFINE_SLOWCASE_OP(op_lshift)
DEFINE_SLOWCASE_OP(op_mod)
DEFINE_SLOWCASE_OP(op_mul)
DEFINE_SLOWCASE_OP(op_negate)
DEFINE_SLOWCASE_OP(op_neq)
DEFINE_SLOWCASE_OP(op_new_object)
- DEFINE_SLOWCASE_OP(op_not)
- DEFINE_SLOWCASE_OP(op_nstricteq)
- DEFINE_SLOWCASE_OP(op_dec)
- DEFINE_SLOWCASE_OP(op_inc)
DEFINE_SLOWCASE_OP(op_put_by_id)
case op_put_by_val_direct:
DEFINE_SLOWCASE_OP(op_put_by_val)
- DEFINE_SLOWCASE_OP(op_rshift)
- DEFINE_SLOWCASE_OP(op_unsigned)
- DEFINE_SLOWCASE_OP(op_urshift)
- DEFINE_SLOWCASE_OP(op_stricteq)
DEFINE_SLOWCASE_OP(op_sub)
- DEFINE_SLOWCASE_OP(op_to_number)
- DEFINE_SLOWCASE_OP(op_to_string)
- DEFINE_SLOWCASE_OP(op_to_object)
- DEFINE_SLOWCASE_OP(op_to_primitive)
DEFINE_SLOWCASE_OP(op_has_indexed_property)
- DEFINE_SLOWCASE_OP(op_has_structure_property)
- DEFINE_SLOWCASE_OP(op_get_direct_pname)
-
- DEFINE_SLOWCASE_OP(op_resolve_scope)
DEFINE_SLOWCASE_OP(op_get_from_scope)
DEFINE_SLOWCASE_OP(op_put_to_scope)
+ DEFINE_SLOWCASE_SLOW_OP(unsigned)
+ DEFINE_SLOWCASE_SLOW_OP(inc)
+ DEFINE_SLOWCASE_SLOW_OP(dec)
+ DEFINE_SLOWCASE_SLOW_OP(bitand)
+ DEFINE_SLOWCASE_SLOW_OP(bitor)
+ DEFINE_SLOWCASE_SLOW_OP(bitxor)
+ DEFINE_SLOWCASE_SLOW_OP(lshift)
+ DEFINE_SLOWCASE_SLOW_OP(rshift)
+ DEFINE_SLOWCASE_SLOW_OP(urshift)
+ DEFINE_SLOWCASE_SLOW_OP(div)
+ DEFINE_SLOWCASE_SLOW_OP(create_this)
+ DEFINE_SLOWCASE_SLOW_OP(to_this)
+ DEFINE_SLOWCASE_SLOW_OP(to_primitive)
+ DEFINE_SLOWCASE_SLOW_OP(to_number)
+ DEFINE_SLOWCASE_SLOW_OP(to_string)
+ DEFINE_SLOWCASE_SLOW_OP(to_object)
+ DEFINE_SLOWCASE_SLOW_OP(not)
+ DEFINE_SLOWCASE_SLOW_OP(stricteq)
+ DEFINE_SLOWCASE_SLOW_OP(nstricteq)
+ DEFINE_SLOWCASE_SLOW_OP(get_direct_pname)
+ DEFINE_SLOWCASE_SLOW_OP(has_structure_property)
+ DEFINE_SLOWCASE_SLOW_OP(resolve_scope)
+ DEFINE_SLOWCASE_SLOW_OP(check_tdz)
+
default:
RELEASE_ASSERT_NOT_REACHED();
}
Modified: trunk/Source/_javascript_Core/jit/JIT.h (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JIT.h 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JIT.h 2017-11-09 15:16:22 UTC (rev 224626)
@@ -38,6 +38,7 @@
#define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(expected), static_cast<int>(actual));
#include "CodeBlock.h"
+#include "CommonSlowPaths.h"
#include "JITDisassembler.h"
#include "JITInlineCacheGenerator.h"
#include "JITMathIC.h"
@@ -591,9 +592,6 @@
void emit_op_log_shadow_chicken_tail(Instruction*);
void emitSlow_op_add(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_bitand(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_bitor(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_bitxor(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_call(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_tail_call(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_call_eval(Instruction*, Vector<SlowCaseEntry>::iterator&);
@@ -602,10 +600,6 @@
void emitSlow_op_tail_call_forward_arguments(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_construct_varargs(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_construct(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_to_this(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_create_this(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_check_tdz(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_div(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_eq(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_get_callee(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_try_get_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&);
@@ -627,30 +621,15 @@
void emitSlow_op_jtrue(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_loop_hint(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_check_traps(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_lshift(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_mod(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_mul(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_negate(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_neq(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_new_object(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_not(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_nstricteq(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_dec(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_inc(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_put_by_id(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_put_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_rshift(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_stricteq(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_sub(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_to_number(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_to_string(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_to_object(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_to_primitive(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_unsigned(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_urshift(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_has_indexed_property(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_has_structure_property(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_get_direct_pname(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emit_op_resolve_scope(Instruction*);
void emit_op_get_from_scope(Instruction*);
@@ -657,10 +636,11 @@
void emit_op_put_to_scope(Instruction*);
void emit_op_get_from_arguments(Instruction*);
void emit_op_put_to_arguments(Instruction*);
- void emitSlow_op_resolve_scope(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_get_from_scope(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_put_to_scope(Instruction*, Vector<SlowCaseEntry>::iterator&);
+ void emitSlowCaseCall(Instruction*, Vector<SlowCaseEntry>::iterator&, SlowPathFunction);
+
void emitRightShift(Instruction*, bool isUnsigned);
void emitRightShiftSlowCase(Instruction*, Vector<SlowCaseEntry>::iterator&, bool isUnsigned);
Modified: trunk/Source/_javascript_Core/jit/JITArithmetic.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JITArithmetic.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JITArithmetic.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -245,14 +245,6 @@
emitPutVirtualRegister(result, regT0);
}
-void JIT::emitSlow_op_unsigned(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_unsigned);
- slowPathCall.call();
-}
-
void JIT::emit_compareAndJump(OpcodeID, int op1, int op2, unsigned target, RelationalCondition condition)
{
// We generate inline code for the following cases in the fast path:
@@ -446,14 +438,6 @@
emitPutVirtualRegister(srcDst);
}
-void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_inc);
- slowPathCall.call();
-}
-
void JIT::emit_op_dec(Instruction* currentInstruction)
{
int srcDst = currentInstruction[1].u.operand;
@@ -465,14 +449,6 @@
emitPutVirtualRegister(srcDst);
}
-void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_dec);
- slowPathCall.call();
-}
-
/* ------------------------------ BEGIN: OP_MOD ------------------------------ */
#if CPU(X86_64)
@@ -601,53 +577,21 @@
emitBitBinaryOpFastPath<JITBitAndGenerator>(currentInstruction);
}
-void JIT::emitSlow_op_bitand(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_bitand);
- slowPathCall.call();
-}
-
void JIT::emit_op_bitor(Instruction* currentInstruction)
{
emitBitBinaryOpFastPath<JITBitOrGenerator>(currentInstruction);
}
-void JIT::emitSlow_op_bitor(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_bitor);
- slowPathCall.call();
-}
-
void JIT::emit_op_bitxor(Instruction* currentInstruction)
{
emitBitBinaryOpFastPath<JITBitXorGenerator>(currentInstruction);
}
-void JIT::emitSlow_op_bitxor(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_bitxor);
- slowPathCall.call();
-}
-
void JIT::emit_op_lshift(Instruction* currentInstruction)
{
emitBitBinaryOpFastPath<JITLeftShiftGenerator>(currentInstruction);
}
-void JIT::emitSlow_op_lshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_lshift);
- slowPathCall.call();
-}
-
void JIT::emitRightShiftFastPath(Instruction* currentInstruction, OpcodeID opcodeID)
{
ASSERT(opcodeID == op_rshift || opcodeID == op_urshift);
@@ -705,27 +649,11 @@
emitRightShiftFastPath(currentInstruction, op_rshift);
}
-void JIT::emitSlow_op_rshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_rshift);
- slowPathCall.call();
-}
-
void JIT::emit_op_urshift(Instruction* currentInstruction)
{
emitRightShiftFastPath(currentInstruction, op_urshift);
}
-void JIT::emitSlow_op_urshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_urshift);
- slowPathCall.call();
-}
-
ALWAYS_INLINE static OperandTypes getOperandTypes(Instruction* instruction)
{
return OperandTypes(ArithProfile::fromInt(instruction[4].u.operand).lhsResultType(), ArithProfile::fromInt(instruction[4].u.operand).rhsResultType());
@@ -1046,14 +974,6 @@
}
}
-void JIT::emitSlow_op_div(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_div);
- slowPathCall.call();
-}
-
void JIT::emit_op_mul(Instruction* currentInstruction)
{
ArithProfile* arithProfile = m_codeBlock->arithProfileForPC(currentInstruction);
Modified: trunk/Source/_javascript_Core/jit/JITArithmetic32_64.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JITArithmetic32_64.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JITArithmetic32_64.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -144,14 +144,6 @@
emitStoreInt32(result, regT0, result == op1);
}
-void JIT::emitSlow_op_unsigned(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_unsigned);
- slowPathCall.call();
-}
-
void JIT::emit_op_inc(Instruction* currentInstruction)
{
int srcDst = currentInstruction[1].u.operand;
@@ -163,14 +155,6 @@
emitStoreInt32(srcDst, regT0, true);
}
-void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_inc);
- slowPathCall.call();
-}
-
void JIT::emit_op_dec(Instruction* currentInstruction)
{
int srcDst = currentInstruction[1].u.operand;
@@ -182,14 +166,6 @@
emitStoreInt32(srcDst, regT0, true);
}
-void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_dec);
- slowPathCall.call();
-}
-
void JIT::emitBinaryDoubleOp(OpcodeID opcodeID, int dst, int op1, int op2, OperandTypes types, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters, bool op2IsInRegisters)
{
JumpList end;
Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -783,14 +783,6 @@
emitPutVirtualRegister(currentInstruction[1].u.operand);
}
-void JIT::emitSlow_op_create_this(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_create_this);
- slowPathCall.call();
-}
-
void JIT::emit_op_check_tdz(Instruction* currentInstruction)
{
emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
@@ -797,41 +789,9 @@
addSlowCase(branchTest64(Zero, regT0));
}
-void JIT::emitSlow_op_check_tdz(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_throw_tdz_error);
- slowPathCall.call();
-}
-
-
// Slow cases
-void JIT::emitSlow_op_to_this(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_this);
- slowPathCall.call();
-}
-
-void JIT::emitSlow_op_to_primitive(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_primitive);
- slowPathCall.call();
-}
-
-void JIT::emitSlow_op_not(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_not);
- slowPathCall.call();
-}
-
void JIT::emitSlow_op_eq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
linkAllSlowCases(iter);
@@ -851,22 +811,6 @@
emitPutVirtualRegister(currentInstruction[1].u.operand, returnValueGPR);
}
-void JIT::emitSlow_op_stricteq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_stricteq);
- slowPathCall.call();
-}
-
-void JIT::emitSlow_op_nstricteq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_nstricteq);
- slowPathCall.call();
-}
-
void JIT::emitSlow_op_instanceof(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
linkAllSlowCases(iter);
@@ -899,30 +843,6 @@
emitPutVirtualRegister(dst, returnValueGPR);
}
-void JIT::emitSlow_op_to_number(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_number);
- slowPathCall.call();
-}
-
-void JIT::emitSlow_op_to_string(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_string);
- slowPathCall.call();
-}
-
-void JIT::emitSlow_op_to_object(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_object);
- slowPathCall.call();
-}
-
#endif // USE(JSVALUE64)
void JIT::emit_op_loop_hint(Instruction*)
@@ -1271,14 +1191,6 @@
emitPutVirtualRegister(dst, regT0);
}
-void JIT::emitSlow_op_get_direct_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_get_direct_pname);
- slowPathCall.call();
-}
-
void JIT::emit_op_enumerator_structure_pname(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
@@ -1416,14 +1328,6 @@
#endif // USE(JSVALUE64)
-void JIT::emitSlow_op_has_structure_property(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_has_structure_property);
- slowPathCall.call();
-}
-
void JIT::emit_op_profile_control_flow(Instruction* currentInstruction)
{
BasicBlockLocation* basicBlockLocation = currentInstruction[1].u.basicBlockLocation;
Modified: trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -328,14 +328,6 @@
emitStore(dst, regT1, regT0);
}
-void JIT::emitSlow_op_to_primitive(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_primitive);
- slowPathCall.call();
-}
-
void JIT::emit_op_set_function_name(Instruction* currentInstruction)
{
int func = currentInstruction[1].u.operand;
@@ -359,14 +351,6 @@
emitStoreBool(dst, regT0, (dst == src));
}
-void JIT::emitSlow_op_not(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_not);
- slowPathCall.call();
-}
-
void JIT::emit_op_jfalse(Instruction* currentInstruction)
{
int cond = currentInstruction[1].u.operand;
@@ -585,27 +569,11 @@
compileOpStrictEq(currentInstruction, OpStrictEq);
}
-void JIT::emitSlow_op_stricteq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_stricteq);
- slowPathCall.call();
-}
-
void JIT::emit_op_nstricteq(Instruction* currentInstruction)
{
compileOpStrictEq(currentInstruction, OpNStrictEq);
}
-void JIT::emitSlow_op_nstricteq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_nstricteq);
- slowPathCall.call();
-}
-
void JIT::emit_op_eq_null(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
@@ -693,14 +661,6 @@
emitStore(dst, regT1, regT0);
}
-void JIT::emitSlow_op_to_number(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_number);
- slowPathCall.call();
-}
-
void JIT::emit_op_to_string(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
@@ -715,14 +675,6 @@
emitStore(dst, regT1, regT0);
}
-void JIT::emitSlow_op_to_string(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_string);
- slowPathCall.call();
-}
-
void JIT::emit_op_to_object(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
@@ -738,14 +690,6 @@
emitStore(dst, regT1, regT0);
}
-void JIT::emitSlow_op_to_object(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_object);
- slowPathCall.call();
-}
-
void JIT::emit_op_catch(Instruction* currentInstruction)
{
restoreCalleeSavesFromEntryFrameCalleeSavesBuffer(vm()->topEntryFrame);
@@ -925,14 +869,6 @@
emitStoreCell(currentInstruction[1].u.operand, resultReg);
}
-void JIT::emitSlow_op_create_this(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_create_this);
- slowPathCall.call();
-}
-
void JIT::emit_op_to_this(Instruction* currentInstruction)
{
WriteBarrierBase<Structure>* cachedStructure = ¤tInstruction[2].u.structure;
@@ -947,14 +883,6 @@
addSlowCase(branchPtr(NotEqual, regT0, regT2));
}
-void JIT::emitSlow_op_to_this(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_to_this);
- slowPathCall.call();
-}
-
void JIT::emit_op_check_tdz(Instruction* currentInstruction)
{
emitLoadTag(currentInstruction[1].u.operand, regT0);
@@ -961,14 +889,6 @@
addSlowCase(branch32(Equal, regT0, TrustedImm32(JSValue::EmptyValueTag)));
}
-void JIT::emitSlow_op_check_tdz(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_throw_tdz_error);
- slowPathCall.call();
-}
-
void JIT::emit_op_has_structure_property(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
@@ -1118,14 +1038,6 @@
emitStore(dst, regT1, regT0);
}
-void JIT::emitSlow_op_get_direct_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_get_direct_pname);
- slowPathCall.call();
-}
-
void JIT::emit_op_enumerator_structure_pname(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -816,14 +816,6 @@
}
}
-void JIT::emitSlow_op_resolve_scope(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_resolve_scope);
- slowPathCall.call();
-}
-
void JIT::emitLoadWithStructureCheck(int scope, Structure** structureSlot)
{
loadPtr(structureSlot, regT1);
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -839,14 +839,6 @@
}
}
-void JIT::emitSlow_op_resolve_scope(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkAllSlowCases(iter);
-
- JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_resolve_scope);
- slowPathCall.call();
-}
-
void JIT::emitLoadWithStructureCheck(int scope, Structure** structureSlot)
{
emitLoad(scope, regT1, regT0);
Modified: trunk/Source/_javascript_Core/jit/SlowPathCall.h (224625 => 224626)
--- trunk/Source/_javascript_Core/jit/SlowPathCall.h 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/jit/SlowPathCall.h 2017-11-09 15:16:22 UTC (rev 224626)
@@ -34,7 +34,7 @@
class JITSlowPathCall {
public:
- JITSlowPathCall(JIT* jit, Instruction* pc, SlowPathReturnType (SLOW_PATH *stub)(ExecState* exec, Instruction* pc))
+ JITSlowPathCall(JIT* jit, Instruction* pc, SlowPathFunction stub)
: m_jit(jit)
, m_stub(stub)
, m_pc(pc)
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (224625 => 224626)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2017-11-09 15:16:22 UTC (rev 224626)
@@ -276,6 +276,12 @@
THROW(createTDZError(exec));
}
+SLOW_PATH_DECL(slow_path_check_tdz)
+{
+ BEGIN();
+ THROW(createTDZError(exec));
+}
+
SLOW_PATH_DECL(slow_path_throw_strict_mode_readonly_property_write_error)
{
BEGIN();
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h (224625 => 224626)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h 2017-11-09 15:08:46 UTC (rev 224625)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h 2017-11-09 15:16:22 UTC (rev 224626)
@@ -220,6 +220,7 @@
SLOW_PATH_HIDDEN_DECL(slow_path_get_callee);
SLOW_PATH_HIDDEN_DECL(slow_path_to_this);
SLOW_PATH_HIDDEN_DECL(slow_path_throw_tdz_error);
+SLOW_PATH_HIDDEN_DECL(slow_path_check_tdz);
SLOW_PATH_HIDDEN_DECL(slow_path_throw_strict_mode_readonly_property_write_error);
SLOW_PATH_HIDDEN_DECL(slow_path_not);
SLOW_PATH_HIDDEN_DECL(slow_path_eq);
@@ -285,4 +286,6 @@
SLOW_PATH_HIDDEN_DECL(slow_path_new_array_with_spread);
SLOW_PATH_HIDDEN_DECL(slow_path_spread);
+using SlowPathFunction = SlowPathReturnType(SLOW_PATH *)(ExecState*, Instruction*);
+
} // namespace JSC