Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (163344 => 163345)
--- trunk/Source/_javascript_Core/ChangeLog 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-02-04 00:54:16 UTC (rev 163345)
@@ -1,3 +1,20 @@
+2014-02-03 Mark Hahnenberg <mhahnenb...@apple.com>
+
+ Fix the cloop due to GenGC
+ https://bugs.webkit.org/show_bug.cgi?id=128137
+
+ Reviewed by Geoffrey Garen.
+
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::llint_write_barrier_slow):
+ * llint/LLIntSlowPaths.h:
+ * llint/LowLevelInterpreter.cpp:
+ (JSC::CLoopRegister::operator JSCell*):
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * offlineasm/cloop.rb:
+ * offlineasm/instructions.rb:
+
2014-02-03 Michael Saboff <msab...@apple.com>
REGRESSION (r163011-r163031): Web Inspector: Latest nightly crashes when showing the Web Inspector
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (163344 => 163345)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2014-02-04 00:54:16 UTC (rev 163345)
@@ -1436,10 +1436,9 @@
}
#endif
-extern "C" SlowPathReturnType llint_write_barrier_slow(ExecState*, JSCell* cell)
+extern "C" void llint_write_barrier_slow(ExecState*, JSCell* cell)
{
Heap::writeBarrier(cell);
- return encodeResult(0, 0);
}
} } // namespace JSC::LLInt
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h (163344 => 163345)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.h 2014-02-04 00:54:16 UTC (rev 163345)
@@ -42,7 +42,7 @@
extern "C" SlowPathReturnType llint_trace_operand(ExecState*, Instruction*, int fromWhere, int operand);
extern "C" SlowPathReturnType llint_trace_value(ExecState*, Instruction*, int fromWhere, int operand);
-extern "C" SlowPathReturnType llint_write_barrier_slow(ExecState*, JSCell*) WTF_INTERNAL;
+extern "C" void llint_write_barrier_slow(ExecState*, JSCell*) WTF_INTERNAL;
#define LLINT_SLOW_PATH_DECL(name) \
extern "C" SlowPathReturnType llint_##name(ExecState* exec, Instruction* pc)
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp (163344 => 163345)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2014-02-04 00:54:16 UTC (rev 163345)
@@ -225,6 +225,7 @@
ExecState* execState;
void* instruction;
VM* vm;
+ JSCell* cell;
ProtoCallFrame* protoCallFrame;
NativeFunction nativeFunc;
#if USE(JSVALUE64)
@@ -241,6 +242,7 @@
operator VM*() { return vm; }
operator ProtoCallFrame*() { return protoCallFrame; }
operator Register*() { return reinterpret_cast<Register*>(vp); }
+ operator JSCell*() { return cell; }
#if USE(JSVALUE64)
inline void clearHighWord() { i32padding = 0; }
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (163344 => 163345)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2014-02-04 00:54:16 UTC (rev 163345)
@@ -117,6 +117,14 @@
end
end
+macro cCall2Void(function, arg1, arg2)
+ if C_LOOP
+ cloopCallSlowPathVoid function, arg1, arg2
+ else
+ cCall2(function, arg1, arg2)
+ end
+end
+
# This barely works. arg3 and arg4 should probably be immediates.
macro cCall4(function, arg1, arg2, arg3, arg4)
if ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS
@@ -525,7 +533,7 @@
push cfr, PC
# We make two extra slots because cCall2 will poke.
subp 8, sp
- cCall2(_llint_write_barrier_slow, cfr, t2)
+ cCall2Void(_llint_write_barrier_slow, cfr, t2)
addp 8, sp
pop PC, cfr
end
@@ -558,7 +566,7 @@
push cfr, PC
# We make two extra slots because cCall2 will poke.
subp 8, sp
- cCall2(_llint_write_barrier_slow, cfr, t3)
+ cCall2Void(_llint_write_barrier_slow, cfr, t3)
addp 8, sp
pop PC, cfr
end
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (163344 => 163345)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2014-02-04 00:54:16 UTC (rev 163345)
@@ -68,6 +68,14 @@
end
end
+macro cCall2Void(function, arg1, arg2)
+ if C_LOOP
+ cloopCallSlowPathVoid function, arg1, arg2
+ else
+ cCall2(function, arg1, arg2)
+ end
+end
+
# This barely works. arg3 and arg4 should probably be immediates.
macro cCall4(function, arg1, arg2, arg3, arg4)
checkStackPointerAlignment(t4, 0xbad0c004)
@@ -390,7 +398,7 @@
macro(marked)
btbz marked, .writeBarrierDone
push PB, PC
- cCall2(_llint_write_barrier_slow, cfr, t2)
+ cCall2Void(_llint_write_barrier_slow, cfr, t2)
pop PC, PB
end
)
@@ -421,7 +429,7 @@
macro(marked)
btbz marked, .writeBarrierDone
push PB, PC
- cCall2(_llint_write_barrier_slow, cfr, t3)
+ cCall2Void(_llint_write_barrier_slow, cfr, t3)
pop PC, PB
end
)
Modified: trunk/Source/_javascript_Core/offlineasm/cloop.rb (163344 => 163345)
--- trunk/Source/_javascript_Core/offlineasm/cloop.rb 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/offlineasm/cloop.rb 2014-02-04 00:54:16 UTC (rev 163345)
@@ -548,6 +548,10 @@
$asm.putc "}"
end
+def cloopEmitCallSlowPathVoid(operands)
+ $asm.putc "#{operands[0].cLabel}(#{operands[1].clDump}, #{operands[2].clDump});"
+end
+
class Instruction
@@didReturnFromJSLabelCounter = 0
@@ -1088,9 +1092,15 @@
when "memfence"
when "push"
- $asm.putc "PUSH(#{operands[0].clDump});"
+ operands.each {
+ | op |
+ $asm.putc "PUSH(#{op.clDump});"
+ }
when "pop"
- $asm.putc "POP(#{operands[0].clDump});"
+ operands.each {
+ | op |
+ $asm.putc "POP(#{op.clDump});"
+ }
when "pushCalleeSaves"
when "popCalleeSaves"
@@ -1133,6 +1143,9 @@
when "cloopCallSlowPath"
cloopEmitCallSlowPath(operands)
+ when "cloopCallSlowPathVoid"
+ cloopEmitCallSlowPathVoid(operands)
+
# For debugging only. This is used to insert instrumentation into the
# generated LLIntAssembly.h during llint development only. Do not use
# for production code.
Modified: trunk/Source/_javascript_Core/offlineasm/instructions.rb (163344 => 163345)
--- trunk/Source/_javascript_Core/offlineasm/instructions.rb 2014-02-04 00:45:02 UTC (rev 163344)
+++ trunk/Source/_javascript_Core/offlineasm/instructions.rb 2014-02-04 00:54:16 UTC (rev 163345)
@@ -304,10 +304,11 @@
CXX_INSTRUCTIONS =
[
- "cloopCrash", # no operands
- "cloopCallJSFunction", # operands: callee
- "cloopCallNative", # operands: callee
- "cloopCallSlowPath", # operands: callTarget, currentFrame, currentPC
+ "cloopCrash", # no operands
+ "cloopCallJSFunction", # operands: callee
+ "cloopCallNative", # operands: callee
+ "cloopCallSlowPath", # operands: callTarget, currentFrame, currentPC
+ "cloopCallSlowPathVoid", # operands: callTarget, currentFrame, currentPC
# For debugging only:
# Takes no operands but simply emits whatever follows in // comments as