Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium
New issue 1313 by [email protected]: Rounding values stored into
external integer arrays causes deoptimizations
http://code.google.com/p/v8/issues/detail?id=1313
It seems the the optimized code for storing into external array types can
not yet handle rounding (truncation). In the following program I get
deoptimizations. The result is correct, but Crankshaft won't be able to
optimize this case.
var a = new Uint8Array(1);
function f(r, v) {
r[0] = v;
}
for (var i=0; i<10000000; i++) f(a, i+0.5);
print(a[0]);
Here is the output of --trace-deopt: The deopt happens at the conversion of
value v from heap number to integer.
**** DEOPT: f at bailout #4, address 0x0, frame size 0
[deoptimizing: begin 0xf4c0b441 f @4]
translating f => node=9, height=0
0xffcdd8e8: [top + 24] <- 0xf4c0a699 ; [esp + 24]
0xffcdd8e4: [top + 20] <- 0xf4c0b731 ; eax
0xffcdd8e0: [top + 16] <- 0xf6048861 ; [esp + 16]
0xffcdd8dc: [top + 12] <- 0xf54a05cb ; caller's pc
0xffcdd8d8: [top + 8] <- 0xffcdd8f8 ; caller's fp
0xffcdd8d4: [top + 4] <- 0xf77b8021 ; context
0xffcdd8d0: [top + 0] <- 0xf4c0b441 ; function
[deoptimizing: end 0xf4c0b441 f => node=9, pc=0xf54a07a5,
state=NO_REGISTERS, took 0.064 ms]
[removing optimized code for: f]
[marking (lazily) f for recompilation]
[disabled optimization for: f / f4c0b441]
127
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev