• sgjesse@chromium.org's avatar
    Optimize instanceof further · 7311e10f
    sgjesse@chromium.org authored
    If the instance of is performed against what is beliwed to be a constant global function inline the instance of check and have the call to the instanceof stub in deferred code. The inlined check will be patched by the instanceof stub when called from deferred code. This is indicated by the lithium instruction LInstanceOfKnownGlobal.
    
    To help the patching the delta from the return address to the patch site is placed just below the return address in the edi slot of the pushad/popad ares. This is safe because the edi register (which is pushed last) is a temporary for the lithium instruction.
    
    As the instanceof stub can call other JavaScript an additional marking for saving all double registers have been added.
    
    Also tweaked the instanceof stub to produce true/false objects instead of 0/1 for the case with deferred code.
    Review URL: http://codereview.chromium.org/5990005
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    7311e10f
v8-counters.h 17.2 KB