Title: [111906] trunk/Source/_javascript_Core
Revision
111906
Author
msab...@apple.com
Date
2012-03-23 14:27:20 -0700 (Fri, 23 Mar 2012)

Log Message

DFG::compileValueToInt32 Sometime Generates GPR to FPR reg back to GPR
https://bugs.webkit.org/show_bug.cgi?id=81805

Reviewed by Filip Pizlo.

Added SpeculativeJIT::checkGeneratedType() to determine the current format
of an operand.  Used that information in SpeculativeJIT::compileValueToInt32
to generate code that will use integer and JSValue types in integer
format directly without a conversion to double.

* _javascript_Core.xcodeproj/project.pbxproj:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkGeneratedType):
(DFG):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
* dfg/DFGSpeculativeJIT.h:
(DFG):
(SpeculativeJIT):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (111905 => 111906)


--- trunk/Source/_javascript_Core/ChangeLog	2012-03-23 21:19:27 UTC (rev 111905)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-03-23 21:27:20 UTC (rev 111906)
@@ -1,3 +1,24 @@
+2012-03-23  Michael Saboff  <msab...@apple.com>
+
+        DFG::compileValueToInt32 Sometime Generates GPR to FPR reg back to GPR
+        https://bugs.webkit.org/show_bug.cgi?id=81805
+
+        Reviewed by Filip Pizlo.
+
+        Added SpeculativeJIT::checkGeneratedType() to determine the current format
+        of an operand.  Used that information in SpeculativeJIT::compileValueToInt32
+        to generate code that will use integer and JSValue types in integer
+        format directly without a conversion to double.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::checkGeneratedType):
+        (DFG):
+        (JSC::DFG::SpeculativeJIT::compileValueToInt32):
+        * dfg/DFGSpeculativeJIT.h:
+        (DFG):
+        (SpeculativeJIT):
+
 2012-03-23  Steve Falkenburg  <sfal...@apple.com>
 
         Update Apple Windows build files for WTF move

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (111905 => 111906)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2012-03-23 21:19:27 UTC (rev 111905)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2012-03-23 21:27:20 UTC (rev 111906)
@@ -322,6 +322,10 @@
 		651122FD14046A4C002B101D /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* _javascript_Core.framework */; };
 		651122FE14046A4C002B101D /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; };
 		6511230714046B0A002B101D /* testRegExp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 651122E5140469BA002B101D /* testRegExp.cpp */; };
+		651E7B14151D0F640014C5C2 /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 651E7B13151D0F640014C5C2 /* libWTF.a */; };
+		651E7B15151D0FD60014C5C2 /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 651E7B13151D0F640014C5C2 /* libWTF.a */; };
+		651E7B16151D0FD70014C5C2 /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 651E7B13151D0F640014C5C2 /* libWTF.a */; };
+		651E7B17151D0FD80014C5C2 /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 651E7B13151D0F640014C5C2 /* libWTF.a */; };
 		65303D641447B9E100D3F904 /* ParserTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 65303D631447B9E100D3F904 /* ParserTokens.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		655EB29B10CE2581001A990E /* NodesCodegen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 655EB29A10CE2581001A990E /* NodesCodegen.cpp */; };
 		7E4EE7090EBB7963005934AA /* StructureChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4EE7080EBB7963005934AA /* StructureChain.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -476,7 +480,6 @@
 		A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7F9935E0FD7325100A0B2D0 /* JSONObject.cpp */; };
 		A7FB60A4103F7DC20017A286 /* PropertyDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7FB60A3103F7DC20017A286 /* PropertyDescriptor.cpp */; };
 		A7FB61001040C38B0017A286 /* PropertyDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7FB604B103F5EAB0017A286 /* PropertyDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		A8A4748E151A8306004123FF /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A8A4748D151A8306004123FF /* libWTF.a */; };
 		BC02E90D0E1839DB000F9297 /* ErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9050E1839DB000F9297 /* ErrorConstructor.h */; };
 		BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9070E1839DB000F9297 /* ErrorPrototype.h */; };
 		BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC02E9090E1839DB000F9297 /* NativeErrorConstructor.h */; };
@@ -940,6 +943,7 @@
 		6507D2970E871E4A00D7D896 /* JSTypeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypeInfo.h; sourceTree = "<group>"; };
 		651122E5140469BA002B101D /* testRegExp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testRegExp.cpp; sourceTree = "<group>"; };
 		6511230514046A4C002B101D /* testRegExp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testRegExp; sourceTree = BUILT_PRODUCTS_DIR; };
+		651E7B13151D0F640014C5C2 /* libWTF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libWTF.a; path = ../../WebKitBuild/Debug/libWTF.a; sourceTree = "<group>"; };
 		65303D631447B9E100D3F904 /* ParserTokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserTokens.h; sourceTree = "<group>"; };
 		65400C0F0A69BAF200509887 /* PropertyNameArray.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PropertyNameArray.cpp; sourceTree = "<group>"; };
 		65400C100A69BAF200509887 /* PropertyNameArray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PropertyNameArray.h; sourceTree = "<group>"; };
@@ -1315,6 +1319,7 @@
 			files = (
 				143A97E60A4A06E200456B66 /* CoreFoundation.framework in Frameworks */,
 				14BD59C50A3E8F9F00BAF59C /* _javascript_Core.framework in Frameworks */,
+				651E7B15151D0FD60014C5C2 /* libWTF.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1324,6 +1329,7 @@
 			files = (
 				651122FD14046A4C002B101D /* _javascript_Core.framework in Frameworks */,
 				651122FE14046A4C002B101D /* libedit.dylib in Frameworks */,
+				651E7B16151D0FD70014C5C2 /* libWTF.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1335,7 +1341,7 @@
 				A731B25A130093880040A7FA /* Foundation.framework in Frameworks */,
 				932F5BD70822A1C700736975 /* libicucore.dylib in Frameworks */,
 				932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */,
-				A8A4748E151A8306004123FF /* libWTF.a in Frameworks */,
+				651E7B17151D0FD80014C5C2 /* libWTF.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1345,6 +1351,7 @@
 			files = (
 				932F5BEA0822A1C700736975 /* _javascript_Core.framework in Frameworks */,
 				5D5D8AD10E0D0EBE00F9C692 /* libedit.dylib in Frameworks */,
+				651E7B14151D0F640014C5C2 /* libWTF.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1369,6 +1376,7 @@
 		0867D691FE84028FC02AAC07 /* _javascript_Core */ = {
 			isa = PBXGroup;
 			children = (
+				651E7B13151D0F640014C5C2 /* libWTF.a */,
 				8604F4F2143A6C4400B295F5 /* ChangeLog */,
 				A718F8211178EB4B002465A7 /* create_regex_tables */,
 				937B63CC09E766D200A671DD /* DerivedSources.make */,
@@ -3192,6 +3200,10 @@
 			baseConfigurationReference = 1C9051430BA9E8A70081E9D0 /* _javascript_Core.xcconfig */;
 			buildSettings = {
 				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Debug;
 		};
@@ -3200,6 +3212,10 @@
 			baseConfigurationReference = 1C9051430BA9E8A70081E9D0 /* _javascript_Core.xcconfig */;
 			buildSettings = {
 				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Release;
 		};
@@ -3208,6 +3224,10 @@
 			baseConfigurationReference = 1C9051430BA9E8A70081E9D0 /* _javascript_Core.xcconfig */;
 			buildSettings = {
 				BUILD_VARIANTS = normal;
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Production;
 		};
@@ -3215,6 +3235,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Debug;
 		};
@@ -3222,6 +3246,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Release;
 		};
@@ -3229,6 +3257,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Production;
 		};
@@ -3283,6 +3315,11 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Release\"",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Debug;
 		};
@@ -3290,6 +3327,11 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Release\"",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Release;
 		};
@@ -3297,6 +3339,11 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Release\"",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Production;
 		};
@@ -3304,6 +3351,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Debug;
 		};
@@ -3311,6 +3362,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Release;
 		};
@@ -3318,6 +3373,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Profiling;
 		};
@@ -3325,6 +3384,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Production;
 		};
@@ -3369,6 +3432,10 @@
 			baseConfigurationReference = 1C9051430BA9E8A70081E9D0 /* _javascript_Core.xcconfig */;
 			buildSettings = {
 				INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Profiling;
 		};
@@ -3391,6 +3458,11 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Release\"",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Profiling;
 		};
@@ -3398,6 +3470,10 @@
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */;
 			buildSettings = {
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../WebKitBuild/Debug\"",
+				);
 			};
 			name = Profiling;
 		};

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (111905 => 111906)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2012-03-23 21:19:27 UTC (rev 111905)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2012-03-23 21:27:20 UTC (rev 111906)
@@ -1463,6 +1463,59 @@
     cellResult(scratchReg, m_compileIndex);
 }
 
+GeneratedOperandType SpeculativeJIT::checkGeneratedTypeForToInt32(NodeIndex nodeIndex)
+{
+#if DFG_ENABLE(DEBUG_VERBOSE)
+    dataLog("checkGeneratedTypeForToInt32@%d   ", nodeIndex);
+#endif
+    Node& node = at(nodeIndex);
+    VirtualRegister virtualRegister = node.virtualRegister();
+    GenerationInfo& info = m_generationInfo[virtualRegister];
+
+    if (info.registerFormat() == DataFormatNone) {
+        if (node.hasConstant()) {
+            if (isInt32Constant(nodeIndex))
+                return GeneratedOperandInteger;
+
+            if (isNumberConstant(nodeIndex))
+                return GeneratedOperandDouble;
+
+            terminateSpeculativeExecution(Uncountable, JSValueRegs(), NoNode);
+            return GeneratedOperandTypeUnknown;
+        }
+
+        if (info.spillFormat() == DataFormatDouble)
+            return GeneratedOperandDouble;
+    }
+
+    switch (info.registerFormat()) {
+    case DataFormatBoolean: // This type never occurs.
+    case DataFormatStorage:
+        ASSERT_NOT_REACHED();
+
+    case DataFormatCell:
+        terminateSpeculativeExecution(Uncountable, JSValueRegs(), NoNode);
+        return GeneratedOperandTypeUnknown;
+
+    case DataFormatNone:
+    case DataFormatJSCell:
+    case DataFormatJS:
+    case DataFormatJSBoolean:
+        return GeneratedOperandJSValue;
+
+    case DataFormatJSInteger:
+    case DataFormatInteger:
+        return GeneratedOperandInteger;
+
+    case DataFormatJSDouble:
+    case DataFormatDouble:
+        return GeneratedOperandDouble;
+    }
+
+    ASSERT_NOT_REACHED();
+    return GeneratedOperandTypeUnknown;
+}
+
 void SpeculativeJIT::compileValueToInt32(Node& node)
 {
     if (at(node.child1()).shouldSpeculateInteger()) {
@@ -1474,19 +1527,100 @@
     }
     
     if (at(node.child1()).shouldSpeculateNumber()) {
-        SpeculateDoubleOperand op1(this, node.child1());
-        GPRTemporary result(this);
-        FPRReg fpr = op1.fpr();
-        GPRReg gpr = result.gpr();
-        JITCompiler::Jump truncatedToInteger = m_jit.branchTruncateDoubleToInt32(fpr, gpr, JITCompiler::BranchIfTruncateSuccessful);
-        
-        silentSpillAllRegisters(gpr);
-        callOperation(toInt32, gpr, fpr);
-        silentFillAllRegisters(gpr);
-        
-        truncatedToInteger.link(&m_jit);
-        integerResult(gpr, m_compileIndex);
-        return;
+        switch (checkGeneratedTypeForToInt32(node.child1().index())) {
+        case GeneratedOperandInteger: {
+            SpeculateIntegerOperand op1(this, node.child1());
+            GPRTemporary result(this, op1);
+            m_jit.move(op1.gpr(), result.gpr());
+            integerResult(result.gpr(), m_compileIndex, op1.format());
+            return;
+        }
+        case GeneratedOperandDouble: {
+            GPRTemporary result(this);
+            SpeculateDoubleOperand op1(this, node.child1());
+            FPRReg fpr = op1.fpr();
+            GPRReg gpr = result.gpr();
+            JITCompiler::Jump truncatedToInteger = m_jit.branchTruncateDoubleToInt32(fpr, gpr, JITCompiler::BranchIfTruncateSuccessful);
+
+            silentSpillAllRegisters(gpr);
+            callOperation(toInt32, gpr, fpr);
+            silentFillAllRegisters(gpr);
+
+            truncatedToInteger.link(&m_jit);
+            integerResult(gpr, m_compileIndex);
+            return;
+        }
+        case GeneratedOperandJSValue: {
+            GPRTemporary result(this);
+#if USE(JSVALUE64)
+            JSValueOperand op1(this, node.child1());
+
+            GPRReg gpr = op1.gpr();
+            GPRReg resultGpr = result.gpr();
+            FPRTemporary tempFpr(this);
+            FPRReg fpr = tempFpr.fpr();
+
+            JITCompiler::Jump isInteger = m_jit.branchPtr(MacroAssembler::AboveOrEqual, gpr, GPRInfo::tagTypeNumberRegister);
+
+            speculationCheck(BadType, JSValueRegs(gpr), node.child1().index(), m_jit.branchTestPtr(MacroAssembler::Zero, gpr, GPRInfo::tagTypeNumberRegister));
+
+            // First, if we get here we have a double encoded as a JSValue
+            m_jit.move(gpr, resultGpr);
+            unboxDouble(resultGpr, fpr);
+
+            silentSpillAllRegisters(resultGpr);
+            callOperation(toInt32, resultGpr, fpr);
+            silentFillAllRegisters(resultGpr);
+
+            JITCompiler::Jump converted = m_jit.jump();
+
+            isInteger.link(&m_jit);
+            m_jit.zeroExtend32ToPtr(gpr, resultGpr);
+
+            converted.link(&m_jit);
+#else
+            Node& childNode = at(node.child1().index());
+            VirtualRegister virtualRegister = childNode.virtualRegister();
+            GenerationInfo& info = m_generationInfo[virtualRegister];
+
+            JSValueOperand op1(this, node.child1());
+
+            GPRReg payloadGPR = op1.payloadGPR();
+            GPRReg resultGpr = result.gpr();
+
+            if (info.registerFormat() == DataFormatJSInteger)
+                m_jit.move(payloadGPR, resultGpr);
+            else {
+                GPRReg tagGPR = op1.tagGPR();
+                FPRTemporary tempFpr(this);
+                FPRReg fpr = tempFpr.fpr();
+                FPRTemporary scratch(this);
+
+                JITCompiler::Jump isInteger = m_jit.branch32(MacroAssembler::Equal, tagGPR, TrustedImm32(JSValue::Int32Tag));
+
+                speculationCheck(BadType, JSValueRegs(tagGPR, payloadGPR), node.child1().index(), m_jit.branch32(MacroAssembler::AboveOrEqual, tagGPR, TrustedImm32(JSValue::LowestTag)));
+
+                unboxDouble(tagGPR, payloadGPR, fpr, scratch.fpr());
+
+                silentSpillAllRegisters(resultGpr);
+                callOperation(toInt32, resultGpr, fpr);
+                silentFillAllRegisters(resultGpr);
+
+                JITCompiler::Jump converted = m_jit.jump();
+
+                isInteger.link(&m_jit);
+                m_jit.move(payloadGPR, resultGpr);
+
+                converted.link(&m_jit);
+            }
+#endif
+            integerResult(resultGpr, m_compileIndex);
+            return;
+        }
+        case GeneratedOperandTypeUnknown:
+            ASSERT_NOT_REACHED();
+            break;
+        }
     }
     
     if (at(node.child1()).shouldSpeculateBoolean()) {

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (111905 => 111906)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2012-03-23 21:19:27 UTC (rev 111905)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2012-03-23 21:27:20 UTC (rev 111906)
@@ -123,7 +123,10 @@
     
     NodeIndex m_nodeIndex;
 };
-    
+
+
+enum GeneratedOperandType { GeneratedOperandTypeUnknown, GeneratedOperandInteger, GeneratedOperandDouble, GeneratedOperandJSValue};
+
 // === SpeculativeJIT ===
 //
 // The SpeculativeJIT is used to generate a fast, but potentially
@@ -361,6 +364,7 @@
     FPRReg fillSpeculateDouble(NodeIndex);
     GPRReg fillSpeculateCell(NodeIndex);
     GPRReg fillSpeculateBoolean(NodeIndex);
+    GeneratedOperandType checkGeneratedTypeForToInt32(NodeIndex);
 
 private:
     void compile(Node&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to