Hi Kyle, Optimizing compiler inserts stack checks (HStackCheck instruction) explicitly at loop body's entry[1].
It also does an optimization pass[2] to remove redundant stack checks that are dominated by function calls (as functions always does stack check in the prologue). Stack checks are important part of V8's interruption mechanism so both compilers emit them to make all loops interruptable. [1] http://code.google.com/p/v8/source/browse/trunk/src/hydrogen.cc#2823 [2] http://code.google.com/p/v8/source/browse/trunk/src/hydrogen.cc#1247 -- Vyacheslav Egorov On Wed, Aug 31, 2011 at 9:27 PM, Kyle <kyle.n.mor...@gmail.com> wrote: > Hello, > > Some time ago I noticed that the v8 compile was inserting stack limit > checks at the back edges of loops. I later found out that this check > was doubling as a preemption mechanism to interrupt potentially long- > running code. However, I've noticed that the hydrogen/lithium > compiler included with crankshaft does not seem to include these > checks. Is there a particular reason for this? Is the previous > design for JavaScript preemption no longer being pursued? > > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users