Changeset 216279 in webkit for trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
- Timestamp:
- May 5, 2017, 3:35:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
r215600 r216279 187 187 // to value profiling, but the array profile tells us something else, then we 188 188 // should just trust the array profile. 189 190 auto typedArrayResult = [&] (ArrayMode result) -> ArrayMode { 191 if (node->op() == PutByValDirect) { 192 // This is semantically identical to defineOwnProperty({configurable: true, writable:true, enumerable:true}), 193 // which we can't model as a simple store to the typed array since typed array indexed properties 194 // are non-configurable. 195 return ArrayMode(Array::Generic); 196 } 197 return result; 198 }; 189 199 190 200 switch (type()) { … … 236 246 case Array::Float32Array: 237 247 case Array::Float64Array: 238 switch (node->op()) { 239 case PutByVal: 248 if (node->op() == PutByVal) { 240 249 if (graph.hasExitSite(node->origin.semantic, OutOfBounds) || !isInBounds()) 241 return withSpeculation(Array::OutOfBounds); 242 return withSpeculation(Array::InBounds); 243 default: 244 return withSpeculation(Array::InBounds); 245 } 246 return *this; 250 return typedArrayResult(withSpeculation(Array::OutOfBounds)); 251 } 252 return typedArrayResult(withSpeculation(Array::InBounds)); 247 253 case Array::Unprofiled: 248 254 case Array::SelectUsingPredictions: { … … 275 281 break; 276 282 } 277 283 278 284 if (isInt8ArraySpeculation(base)) 279 return result.withType(Array::Int8Array);285 return typedArrayResult(result.withType(Array::Int8Array)); 280 286 281 287 if (isInt16ArraySpeculation(base)) 282 return result.withType(Array::Int16Array);288 return typedArrayResult(result.withType(Array::Int16Array)); 283 289 284 290 if (isInt32ArraySpeculation(base)) 285 return result.withType(Array::Int32Array);291 return typedArrayResult(result.withType(Array::Int32Array)); 286 292 287 293 if (isUint8ArraySpeculation(base)) 288 return result.withType(Array::Uint8Array);294 return typedArrayResult(result.withType(Array::Uint8Array)); 289 295 290 296 if (isUint8ClampedArraySpeculation(base)) 291 return result.withType(Array::Uint8ClampedArray);297 return typedArrayResult(result.withType(Array::Uint8ClampedArray)); 292 298 293 299 if (isUint16ArraySpeculation(base)) 294 return result.withType(Array::Uint16Array);300 return typedArrayResult(result.withType(Array::Uint16Array)); 295 301 296 302 if (isUint32ArraySpeculation(base)) 297 return result.withType(Array::Uint32Array);303 return typedArrayResult(result.withType(Array::Uint32Array)); 298 304 299 305 if (isFloat32ArraySpeculation(base)) 300 return result.withType(Array::Float32Array);306 return typedArrayResult(result.withType(Array::Float32Array)); 301 307 302 308 if (isFloat64ArraySpeculation(base)) 303 return result.withType(Array::Float64Array);309 return typedArrayResult(result.withType(Array::Float64Array)); 304 310 305 311 if (type() == Array::Unprofiled)
Note:
See TracChangeset
for help on using the changeset viewer.