Bug 122740 - FTL should have an inefficient but correct implementation of GetById
Summary: FTL should have an inefficient but correct implementation of GetById
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 122739
  Show dependency treegraph
 
Reported: 2013-10-13 21:57 PDT by Filip Pizlo
Modified: 2013-10-14 11:06 PDT (History)
9 users (show)

See Also:


Attachments
the patch (6.01 KB, patch)
2013-10-13 22:21 PDT, Filip Pizlo
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2013-10-13 21:57:22 PDT
Just to expand coverage and find bugs before I implement this for real.
Comment 1 Filip Pizlo 2013-10-13 22:21:38 PDT
Created attachment 214126 [details]
the patch
Comment 2 Nadav Rotem 2013-10-13 23:07:45 PDT
I see two changes: 1. remove prediction  2. implement getByID   Are these changes related ? 

What is J_JITOperation_EJI ?

The line below is really long. Can you extract the identifier number into a separate variable ?

 1231        setJSValue(vmCall(m_out.operation(operationGetById), m_callFrame, base, m_out.constIntPtr(m_graph.identifiers()[m_node->identifierNumber()])));
Comment 3 Mark Hahnenberg 2013-10-14 10:33:46 PDT
Comment on attachment 214126 [details]
the patch

r=me
Comment 4 Filip Pizlo 2013-10-14 10:41:24 PDT
(In reply to comment #2)
> I see two changes: 1. remove prediction  2. implement getByID   Are these changes related ? 

Loosely - I implemented the FTL version of GetById by looking at what the DFG version did, but of course removing all of the inline cache stuff.  Then I saw that the DFG had this assertion about predictions.  I had a choice of either adding such an assertion in the FTL, or removing it.  So I removed it.

> 
> What is J_JITOperation_EJI ?

It's a typedef:

typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJI)(ExecState*, EncodedJSValue, StringImpl*);

See JITOperations.h.

> 
> The line below is really long. Can you extract the identifier number into a separate variable ?
> 
>  1231        setJSValue(vmCall(m_out.operation(operationGetById), m_callFrame, base, m_out.constIntPtr(m_graph.identifiers()[m_node->identifierNumber()])));

Ok!
Comment 5 Filip Pizlo 2013-10-14 11:06:52 PDT
Landed in http://trac.webkit.org/changeset/157409