Changeset 42976 in webkit for trunk/JavaScriptCore/jit/JITStubs.cpp
- Timestamp:
- Apr 28, 2009, 5:38:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITStubs.cpp
r42337 r42976 1127 1127 else 1128 1128 result = jsArray->JSArray::get(callFrame, i); 1129 } else if (isJSString(globalData, baseValue) && asString(baseValue)->canGetIndex(i)) 1129 } else if (isJSString(globalData, baseValue) && asString(baseValue)->canGetIndex(i)) { 1130 // All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks. 1131 ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_val_string)); 1130 1132 result = asString(baseValue)->getIndex(ARG_globalData, i); 1131 else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) {1133 } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) { 1132 1134 // All fast byte array accesses are safe from exceptions so return immediately to avoid exception checks. 1133 1135 ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_val_byte_array)); … … 1143 1145 return JSValuePtr::encode(result); 1144 1146 } 1147 1148 JSValueEncodedAsPointer* JITStubs::cti_op_get_by_val_string(STUB_ARGS) 1149 { 1150 BEGIN_STUB_FUNCTION(); 1151 1152 CallFrame* callFrame = ARG_callFrame; 1153 JSGlobalData* globalData = ARG_globalData; 1154 1155 JSValuePtr baseValue = ARG_src1; 1156 JSValuePtr subscript = ARG_src2; 1157 1158 JSValuePtr result; 1159 1160 if (LIKELY(subscript.isUInt32Fast())) { 1161 uint32_t i = subscript.getUInt32Fast(); 1162 if (isJSString(globalData, baseValue) && asString(baseValue)->canGetIndex(i)) 1163 result = asString(baseValue)->getIndex(ARG_globalData, i); 1164 else { 1165 result = baseValue.get(callFrame, i); 1166 if (!isJSString(globalData, baseValue)) 1167 ctiPatchCallByReturnAddress(STUB_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_val)); 1168 } 1169 } else { 1170 Identifier property(callFrame, subscript.toString(callFrame)); 1171 result = baseValue.get(callFrame, property); 1172 } 1173 1174 CHECK_FOR_EXCEPTION_AT_END(); 1175 return JSValuePtr::encode(result); 1176 } 1177 1145 1178 1146 1179 JSValueEncodedAsPointer* JITStubs::cti_op_get_by_val_byte_array(STUB_ARGS)
Note:
See TracChangeset
for help on using the changeset viewer.