Hello,

My name is Sharad and I'm a student at RIT studying the v8 engine in my 
free time along with some friends. Me and my peers have a few questions on 
some weird side effects and implementation details. 

We have a few questions regarding the following code:

foo = () => {
for (let i = 0; i < 0x10000; i++) {
}

var doubleArr = [1.1, 2.2, 3.3, 4.4];
}

The key issue we're facing is that when we remove the loop, the elements 
lie address-wise before the object itself. On the other hand, if we include 
the loop, the array lies address-wise after the object. We believe this is 
because of the fact that the for loop optimizes a portion of foo which 
introduces some changes. 

However based on our observations of the maglev graph, we understand the 
doubleArr portion of the code to be a deopt point and accordingly be 
handled in ignition. This behavior indicates that both loop and non-loop 
cases are being handled in ignition. It is unclear to us why the 
introduction of a loop results in these changes. What could be causing this 
discrepancy and where can we find it? Could it be due to the existence of a 
feedback vector?

Thanks,
Sharad

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/9e77bb1f-1662-45e7-beb1-302547cd4b57n%40googlegroups.com.

Reply via email to