There is at least one other use of the same pattern that I can think of: the way that we compile the comma operator. We may discover more as we redo stuff (possibly the way that we compile calls). I'm not thinking primarily about optimization here, just having the right API.
On Mon, Dec 29, 2008 at 2:15 PM, William Hesse <[email protected]> wrote: > Is there really any use of nip anywhere but here, though? And is the only > optimizationat run-time going to be the fact that we may (only in some > cases) avoid an unnecessary > change to the stack pointer ( mov rather than sub 4, push)? I'm not sure > that we need a general > nip if this is the only use. Replace, or ReplaceTOS with a result, seems > more important, and > gives us the same optimization. > > > On Mon, Dec 29, 2008 at 12:00 PM, <[email protected]> wrote: > >> I would go with even less external manipulation. What's happening >> (dropping some elements immediately below the frame top while preserving >> the top) seems like a purely frame-internal operation. >> >> Forth programmers would call it "nip". We could use that name and we >> could allow it to take a non-negative integer argument that was the >> number of elements to nip. >> >> >> http://codereview.chromium.org/17003 >> > > > > -- > We can IMAGINE what is not > --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
