Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (96174 => 96175)
--- trunk/Source/_javascript_Core/ChangeLog 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-09-28 01:09:33 UTC (rev 96175)
@@ -1,3 +1,18 @@
+2011-09-27 Gavin Barraclough <[email protected]>
+
+ Get JSVALUE32_64 DFG JIT building on OS X.
+ https://bugs.webkit.org/show_bug.cgi?id=68961
+
+ Reviewed by Geoff Garen.
+
+ * Merge bug #68763 (DFG JIT should not eagerly initialize integer tags in the register file).
+ * Forward-declare functions in DFGOperations.cpp
+ * UNUSED_PARAM for unused arguments
+ * NO_RETURN for unimplemented function that ASSERT_NOT_REACHED
+ * Fix argument types handled by OpInfo constructor.
+ * Use SYMBOL_STRING instead of STRINGIZE for asm symbols.
+ * Add files to Xcode project.
+
2011-09-27 Yuqiang Xian <[email protected]>
Bug fixes for GetById, PutById, and GetByOffset in JSVALUE32_64 DFG JIT
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (96174 => 96175)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2011-09-28 01:09:33 UTC (rev 96175)
@@ -296,6 +296,10 @@
86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8112DBA33700A9FE7B /* YarrParser.h */; settings = {ATTRIBUTES = (); }; };
86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B8212DBA33700A9FE7B /* YarrPattern.cpp */; };
86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8312DBA33700A9FE7B /* YarrPattern.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 86880F1C14328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86880F1814328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp */; };
+ 86880F1D14328BB900B08D42 /* DFGJITCompiler32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86880F1914328BB900B08D42 /* DFGJITCompiler32_64.cpp */; };
+ 86880F1E14328BB900B08D42 /* DFGJITCompilerInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = 86880F1A14328BB900B08D42 /* DFGJITCompilerInlineMethods.h */; };
+ 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */; };
868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA00117CEFD100B908B1 /* AtomicString.cpp */; };
868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA01117CEFD100B908B1 /* AtomicString.h */; settings = {ATTRIBUTES = (Private, ); }; };
868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1054,6 +1058,10 @@
86704B8312DBA33700A9FE7B /* YarrPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrPattern.h; path = yarr/YarrPattern.h; sourceTree = "<group>"; };
867FC35F11B763950025105E /* _javascript_Core.JSVALUE32_64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = _javascript_Core.JSVALUE32_64only.exp; sourceTree = "<group>"; };
867FC36111B763950025105E /* _javascript_Core.JSVALUE64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = _javascript_Core.JSVALUE64only.exp; sourceTree = "<group>"; };
+ 86880F1814328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCodeGenerator32_64.cpp; path = dfg/DFGJITCodeGenerator32_64.cpp; sourceTree = "<group>"; };
+ 86880F1914328BB900B08D42 /* DFGJITCompiler32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCompiler32_64.cpp; path = dfg/DFGJITCompiler32_64.cpp; sourceTree = "<group>"; };
+ 86880F1A14328BB900B08D42 /* DFGJITCompilerInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGJITCompilerInlineMethods.h; path = dfg/DFGJITCompilerInlineMethods.h; sourceTree = "<group>"; };
+ 86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSpeculativeJIT32_64.cpp; path = dfg/DFGSpeculativeJIT32_64.cpp; sourceTree = "<group>"; };
868BFA00117CEFD100B908B1 /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtomicString.cpp; path = text/AtomicString.cpp; sourceTree = "<group>"; };
868BFA01117CEFD100B908B1 /* AtomicString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicString.h; path = text/AtomicString.h; sourceTree = "<group>"; };
868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicStringImpl.h; path = text/AtomicStringImpl.h; sourceTree = "<group>"; };
@@ -2247,35 +2255,39 @@
86EC9DB31328DF44002B2AD7 /* dfg */ = {
isa = PBXGroup;
children = (
- 0FD82EF31423073900179C94 /* DFGIntrinsic.h */,
- 0FD82E52141DAEDE00179C94 /* DFGOSREntry.cpp */,
- 0FD82E53141DAEDE00179C94 /* DFGOSREntry.h */,
+ 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */,
+ 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */,
0FD82E1E14172C2F00179C94 /* DFGCapabilities.cpp */,
0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */,
- 0FD3C82414115D2200FD81CB /* DFGPropagator.h */,
- 0FD3C82314115D1A00FD81CB /* DFGPropagator.cpp */,
0FD3C82214115D0E00FD81CB /* DFGDriver.h */,
0FD3C82014115CF800FD81CB /* DFGDriver.cpp */,
- 86EC9DB41328DF82002B2AD7 /* DFGByteCodeParser.cpp */,
- 86EC9DB51328DF82002B2AD7 /* DFGByteCodeParser.h */,
86AE6C4B136A11E400963012 /* DFGFPRInfo.h */,
86EC9DB61328DF82002B2AD7 /* DFGGenerationInfo.h */,
86AE6C4C136A11E400963012 /* DFGGPRInfo.h */,
86EC9DB71328DF82002B2AD7 /* DFGGraph.cpp */,
+ 0FD82EF31423073900179C94 /* DFGIntrinsic.h */,
86EC9DB81328DF82002B2AD7 /* DFGGraph.h */,
86EC9DB91328DF82002B2AD7 /* DFGJITCodeGenerator.cpp */,
86EC9DBA1328DF82002B2AD7 /* DFGJITCodeGenerator.h */,
+ 86880F1814328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp */,
86EC9DBB1328DF82002B2AD7 /* DFGJITCompiler.cpp */,
86EC9DBC1328DF82002B2AD7 /* DFGJITCompiler.h */,
+ 86880F1914328BB900B08D42 /* DFGJITCompiler32_64.cpp */,
+ 86880F1A14328BB900B08D42 /* DFGJITCompilerInlineMethods.h */,
86ECA3E9132DEF1C002B2AD7 /* DFGNode.h */,
+ 0FD82E52141DAEDE00179C94 /* DFGOSREntry.cpp */,
+ 0FD82E53141DAEDE00179C94 /* DFGOSREntry.h */,
86EC9DBF1328DF82002B2AD7 /* DFGOperations.cpp */,
86EC9DC01328DF82002B2AD7 /* DFGOperations.h */,
+ 0FD3C82414115D2200FD81CB /* DFGPropagator.h */,
+ 0FD3C82314115D1A00FD81CB /* DFGPropagator.cpp */,
86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */,
86BB09BE138E381B0056702F /* DFGRepatch.cpp */,
86BB09BF138E381B0056702F /* DFGRepatch.h */,
86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */,
86EC9DC21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp */,
86EC9DC31328DF82002B2AD7 /* DFGSpeculativeJIT.h */,
+ 86880F1B14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp */,
);
name = dfg;
sourceTree = "<group>";
@@ -2825,6 +2837,7 @@
A70456B01427FB910037DA68 /* AllocationSpace.h in Headers */,
86FA9E92142BBB2E001773B7 /* JSBoundFunction.h in Headers */,
A7521E131429169A003C8D0C /* CardSet.h in Headers */,
+ 86880F1E14328BB900B08D42 /* DFGJITCompilerInlineMethods.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3350,6 +3363,9 @@
A70456B11427FB950037DA68 /* AllocationSpace.cpp in Sources */,
86FA9E91142BBB2E001773B7 /* JSBoundFunction.cpp in Sources */,
0F604E8B142D696D009CEB92 /* BitVector.cpp in Sources */,
+ 86880F1C14328BB900B08D42 /* DFGJITCodeGenerator32_64.cpp in Sources */,
+ 86880F1D14328BB900B08D42 /* DFGJITCompiler32_64.cpp in Sources */,
+ 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator.h 2011-09-28 01:09:33 UTC (rev 96175)
@@ -388,6 +388,7 @@
m_jit.loadDouble(JITCompiler::addressFor(spillMe), info.fpr());
#elif USE(JSVALUE32_64)
+ UNUSED_PARAM(canTrample);
ASSERT(info.registerFormat() == DataFormatDouble || info.registerFormat() == DataFormatJSDouble);
m_jit.emitLoadDouble(nodeIndex, info.fpr());
#endif
@@ -1283,12 +1284,15 @@
appendCallWithExceptionCheck(operation);
}
- void callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
+
+ void NO_RETURN callOperation(D_DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)
{
ASSERT(isFlushed());
// FIXME: Need to to pass doubles.
ASSERT_NOT_REACHED();
+ UNUSED_PARAM(arg1);
+ UNUSED_PARAM(arg2);
m_jit.appendCall(operation);
m_jit.moveDouble(FPRInfo::returnValueFPR, result);
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCodeGenerator32_64.cpp 2011-09-28 01:09:33 UTC (rev 96175)
@@ -219,6 +219,8 @@
bool JITCodeGenerator::fillJSValue(NodeIndex nodeIndex, GPRReg& tagGPR, GPRReg& payloadGPR, FPRReg& fpr)
{
// FIXME: For double we could fill with a FPR.
+ UNUSED_PARAM(fpr);
+
Node& node = m_jit.graph()[nodeIndex];
VirtualRegister virtualRegister = node.virtualRegister();
GenerationInfo& info = m_generationInfo[virtualRegister];
@@ -1893,10 +1895,11 @@
jsValueResult(resultTagGPR, resultPayloadGPR, m_compileIndex, DataFormatJSBoolean, UseChildrenCalledExplicitly);
}
-void JITCodeGenerator::emitCall(Node& node)
+void NO_RETURN JITCodeGenerator::emitCall(Node& node)
{
// FIXME: It's not supported yet!
ASSERT_NOT_REACHED();
+ UNUSED_PARAM(node);
}
void JITCodeGenerator::speculationCheck(MacroAssembler::Jump jumpToFail)
Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler32_64.cpp (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler32_64.cpp 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler32_64.cpp 2011-09-28 01:09:33 UTC (rev 96175)
@@ -79,9 +79,11 @@
}
// This method used to fill a JSValue to a GPR when linking speculative -> non-speculative.
-void JITCompiler::fillToJS(NodeIndex nodeIndex, GPRReg gpr)
+void NO_RETURN JITCompiler::fillToJS(NodeIndex nodeIndex, GPRReg gpr)
{
ASSERT_NOT_REACHED();
+ UNUSED_PARAM(nodeIndex);
+ UNUSED_PARAM(gpr);
}
void JITCompiler::exitSpeculativeWithOSR(const OSRExit& exit, SpeculationRecovery* recovery, Vector<BytecodeAndMachineOffset>& decodedCodeMap)
Modified: trunk/Source/_javascript_Core/dfg/DFGNode.h (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGNode.h 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGNode.h 2011-09-28 01:09:33 UTC (rev 96175)
@@ -333,11 +333,9 @@
// distinguishes an immediate value (typically an index into a CodeBlock data structure -
// a constant index, argument, or identifier) from a NodeIndex.
struct OpInfo {
- explicit OpInfo(int value) : m_value(value) { }
-#if USE(JSVALUE64)
- explicit OpInfo(unsigned value) : m_value(value) { }
-#endif
- explicit OpInfo(uintptr_t value) : m_value(value) { }
+ explicit OpInfo(int32_t value) : m_value(static_cast<uintptr_t>(value)) { }
+ explicit OpInfo(uint32_t value) : m_value(static_cast<uintptr_t>(value)) { }
+ explicit OpInfo(size_t value) : m_value(static_cast<uintptr_t>(value)) { }
explicit OpInfo(void* value) : m_value(reinterpret_cast<uintptr_t>(value)) { }
uintptr_t m_value;
};
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2011-09-28 01:09:33 UTC (rev 96175)
@@ -35,21 +35,28 @@
#include "JSGlobalData.h"
#include "Operations.h"
+
+#if OS(DARWIN) || (OS(WINDOWS) && CPU(X86))
+#define SYMBOL_STRING(name) "_" #name
+#else
+#define SYMBOL_STRING(name) #name
+#endif
+
#if CPU(X86_64)
#define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, register) \
asm( \
- ".globl _" STRINGIZE(function) "\n" \
- "_" STRINGIZE(function) ":" "\n" \
+ ".globl " SYMBOL_STRING(function) "\n" \
+ SYMBOL_STRING(function) ":" "\n" \
"mov (%rsp), %" STRINGIZE(register) "\n" \
- "jmp _" STRINGIZE(function) "WithReturnAddress" "\n" \
+ "jmp " SYMBOL_STRING(function) "WithReturnAddress" "\n" \
);
#elif CPU(X86)
#define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, register) \
asm( \
- ".globl " STRINGIZE(function) "\n" \
- STRINGIZE(function) ":" "\n" \
+ ".globl " SYMBOL_STRING(function) "\n" \
+ SYMBOL_STRING(function) ":" "\n" \
"push (%esp)\n" \
- "jmp " STRINGIZE(function) "WithReturnAddress" "\n" \
+ "jmp " SYMBOL_STRING(function) "WithReturnAddress" "\n" \
);
#endif
#define FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rsi)
@@ -265,6 +272,7 @@
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetMethodOptimize);
EncodedJSValue operationGetMethodOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+EncodedJSValue operationGetMethodOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetMethodOptimize);
EncodedJSValue operationGetMethodOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -287,6 +295,7 @@
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdBuildList);
EncodedJSValue operationGetByIdBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+EncodedJSValue operationGetByIdBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdBuildList);
EncodedJSValue operationGetByIdBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -306,6 +315,7 @@
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdProtoBuildList);
EncodedJSValue operationGetByIdProtoBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+EncodedJSValue operationGetByIdProtoBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdProtoBuildList);
EncodedJSValue operationGetByIdProtoBuildListWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -325,6 +335,7 @@
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdOptimize);
EncodedJSValue operationGetByIdOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+EncodedJSValue operationGetByIdOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG4_RETURN_ADDRESS(operationGetByIdOptimize);
EncodedJSValue operationGetByIdOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -388,6 +399,7 @@
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdStrictOptimize);
void operationPutByIdStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+void operationPutByIdStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdStrictOptimize);
void operationPutByIdStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -410,6 +422,7 @@
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdNonStrictOptimize);
void operationPutByIdNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+void operationPutByIdNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdNonStrictOptimize);
void operationPutByIdNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -432,6 +445,7 @@
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdDirectStrictOptimize);
void operationPutByIdDirectStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+void operationPutByIdDirectStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdDirectStrictOptimize);
void operationPutByIdDirectStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -454,6 +468,7 @@
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdDirectNonStrictOptimize);
void operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+void operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName);
FUNCTION_WRAPPER_WITH_ARG5_RETURN_ADDRESS(operationPutByIdDirectNonStrictOptimize);
void operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedBase, Identifier* propertyName)
#endif
@@ -517,19 +532,19 @@
#if CPU(X86_64)
asm (
-".globl _" STRINGIZE(getHostCallReturnValue) "\n"
-"_" STRINGIZE(getHostCallReturnValue) ":" "\n"
+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
+SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov -40(%r13), %r13\n"
"mov %r13, %rdi\n"
- "jmp _" STRINGIZE(getHostCallReturnValueWithExecState) "\n"
+ "jmp " SYMBOL_STRING(getHostCallReturnValueWithExecState) "\n"
);
#elif CPU(X86)
asm (
-".globl " STRINGIZE(getHostCallReturnValue) "\n"
-STRINGIZE(getHostCallReturnValue) ":" "\n"
+".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
+SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov -40(%edi), %edi\n"
"push %edi\n"
- "jmp " STRINGIZE(getHostCallReturnValueWithExecState) "\n"
+ "jmp " SYMBOL_STRING(getHostCallReturnValueWithExecState) "\n"
);
#endif
@@ -637,6 +652,7 @@
FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(operationLinkCall);
void* operationLinkCallWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+void* operationLinkCallWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee);
FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(operationLinkCall);
void* operationLinkCallWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee)
#endif
@@ -649,6 +665,7 @@
FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(operationLinkConstruct);
void* operationLinkConstructWithReturnAddress(ExecState* execCallee, ReturnAddressPtr returnAddress)
#elif CPU(X86)
+void* operationLinkConstructWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee);
FUNCTION_WRAPPER_WITH_ARG2_RETURN_ADDRESS(operationLinkConstruct);
void* operationLinkConstructWithReturnAddress(ReturnAddressPtr returnAddress, ExecState* execCallee)
#endif
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2011-09-28 01:09:33 UTC (rev 96175)
@@ -2096,7 +2096,7 @@
jsValueResult(resultGPR, m_compileIndex);
break;
}
-
+
case ForceOSRExit: {
terminateSpeculativeExecution();
break;
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (96174 => 96175)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-09-28 01:01:59 UTC (rev 96174)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-09-28 01:09:33 UTC (rev 96175)
@@ -126,6 +126,9 @@
case AlreadyInRegisterFile:
fprintf(out, "-");
break;
+ case AlreadyInRegisterFileAsUnboxedInt32:
+ fprintf(out, "(int32)");
+ break;
case InGPR:
fprintf(out, "%%%s", GPRInfo::debugName(gpr()));
break;
@@ -167,9 +170,9 @@
{
ASSERT(m_bytecodeIndex != std::numeric_limits<uint32_t>::max());
for (unsigned argument = 0; argument < m_arguments.size(); ++argument)
- m_arguments[argument] = jit->computeValueRecoveryFor(jit->m_arguments[argument]);
+ m_arguments[argument] = jit->computeValueRecoveryFor(operandForArgument(argument), jit->m_arguments[argument]);
for (unsigned variable = 0; variable < m_variables.size(); ++variable)
- m_variables[variable] = jit->computeValueRecoveryFor(jit->m_variables[variable]);
+ m_variables[variable] = jit->computeValueRecoveryFor(variable, jit->m_variables[variable]);
}
#ifndef NDEBUG
@@ -386,6 +389,9 @@
GPRReg SpeculativeJIT::fillSpeculateBoolean(NodeIndex nodeIndex)
{
+ ASSERT_NOT_REACHED();
+ UNUSED_PARAM(nodeIndex);
+
#if ENABLE(DFG_DEBUG_VERBOSE)
fprintf(stderr, "SpecBool@%d ", nodeIndex);
#endif
@@ -2010,6 +2016,11 @@
break;
}
+ case ForceOSRExit: {
+ terminateSpeculativeExecution();
+ break;
+ }
+
case Phantom:
// This is a no-op.
noResult(m_compileIndex);
@@ -2132,23 +2143,9 @@
}
}
-// For any vars that we will be treating as numeric, write 0 to
-// the var on entry. Throughout the block we will only read/write
-// to the payload, by writing the tag now we prevent the GC from
-// misinterpreting values as pointers.
-void SpeculativeJIT::initializeVariableTypes()
-{
- ASSERT(!m_compileIndex);
- for (int var = 0; var < (int)m_jit.graph().predictions().numberOfVariables(); ++var) {
- if (isInt32Prediction(m_jit.graph().getPrediction(var)))
- m_jit.store32(TrustedImm32(JSValue::Int32Tag), JITCompiler::tagFor((VirtualRegister)var));
- }
-}
-
bool SpeculativeJIT::compile()
{
checkArgumentTypes();
- initializeVariableTypes();
ASSERT(!m_compileIndex);
for (m_block = 0; m_block < m_jit.graph().m_blocks.size(); ++m_block)
@@ -2157,10 +2154,13 @@
return true;
}
-ValueRecovery SpeculativeJIT::computeValueRecoveryFor(const ValueSource& valueSource)
+ValueRecovery SpeculativeJIT::computeValueRecoveryFor(int operand, const ValueSource& valueSource)
{
- if (!valueSource.isSet())
+ if (!valueSource.isSet()) {
+ if (m_bytecodeIndexForOSR && isInt32Prediction(m_jit.graph().getPrediction(operand)))
+ return ValueRecovery::alreadyInRegisterFileAsUnboxedInt32();
return ValueRecovery::alreadyInRegisterFile();
+ }
if (m_jit.isConstant(valueSource.nodeIndex()))
return ValueRecovery::constant(m_jit.valueOfJSConstant(valueSource.nodeIndex()));