Changeset 155793 in webkit for trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
- Timestamp:
- Sep 14, 2013, 5:57:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r155735 r155793 3088 3088 bool found = false; 3089 3089 3090 if ( needsOSRBackwardRewiring(node->op())) {3090 if (permitsOSRBackwardRewiring(node->op())) { 3091 3091 node = node->child1().node(); 3092 3092 if (tryToSetConstantExitArgument(exit, index, node)) … … 3097 3097 3098 3098 if (!found) { 3099 Node* int32ToDouble = 0; 3100 Node* valueToInt32 = 0; 3101 Node* uint32ToNumber = 0; 3102 Node* doubleAsInt32 = 0; 3099 Node* bestNode = 0; 3100 unsigned bestScore = 0; 3103 3101 3104 3102 HashSet<Node*>::iterator iter = m_live.begin(); … … 3112 3110 if (candidate->child1() != node) 3113 3111 continue; 3114 switch (candidate->op()) { 3115 case Int32ToDouble: 3116 int32ToDouble = candidate; 3117 break; 3118 case ValueToInt32: 3119 valueToInt32 = candidate; 3120 break; 3121 case UInt32ToNumber: 3122 uint32ToNumber = candidate; 3123 break; 3124 case DoubleAsInt32: 3125 uint32ToNumber = candidate; 3126 break; 3127 default: 3128 ASSERT(!needsOSRForwardRewiring(candidate->op())); 3129 break; 3130 } 3112 unsigned myScore = forwardRewiringSelectionScore(candidate->op()); 3113 if (myScore <= bestScore) 3114 continue; 3115 bestNode = candidate; 3116 bestScore = myScore; 3131 3117 } 3132 3118 3133 if (doubleAsInt32) 3134 node = doubleAsInt32; 3135 else if (int32ToDouble) 3136 node = int32ToDouble; 3137 else if (valueToInt32) 3138 node = valueToInt32; 3139 else if (uint32ToNumber) 3140 node = uint32ToNumber; 3141 3142 if (isLive(node)) 3119 if (bestNode) { 3120 ASSERT(isLive(bestNode)); 3121 node = bestNode; 3143 3122 found = true; 3123 } 3144 3124 } 3145 3125
Note:
See TracChangeset
for help on using the changeset viewer.