Bug 15973 - Use templates to clean up comparison node code
Summary: Use templates to clean up comparison node code
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 15972
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-13 16:36 PST by Eric Seidel (no email)
Modified: 2008-09-02 19:51 PDT (History)
5 users (show)

See Also:


Attachments
a first-pass fix (depends on bug 15972) (21.38 KB, patch)
2007-11-13 16:37 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-13 16:36:24 PST
Use templates to clean up comparison node code

The end goal is to move to op-code generation for a byte-code interpreter.  In many existing Node evaluate* calls we do the same set of operations:
1. convert the inputs to a base type we know how to handle
2. do whatever is specific to that node
3. convert the output to whatever type was requested by the caller.

I'm trying to get ride of steps 1. and 2. and leave us only with step 3.  Steps 1. and 2. are basically copy/paste code and will end up as standard op-code groups which are re-used by lots of Nodes in the bytecode interpreter.

I've attached a patch for comment.  It's not a perfect solution, but I think it's a good start.  I'm not sure the template usage is exactly as I want it to be in the end.
Comment 1 Eric Seidel (no email) 2007-11-13 16:37:20 PST
Created attachment 17246 [details]
a first-pass fix (depends on bug 15972)
Comment 2 Eric Seidel (no email) 2007-11-13 16:40:23 PST
I'd be interested in any comments you all have to offer.  I don't yet have a SunSpider number.  I think I made a typo in one of the operation implementations, because SunSpider falls to its knees under this patch.  I'm investigating that fix now, but that doesn't hold up the process of getting comments on the general design.
Comment 3 Cameron Zwarich (cpst) 2008-09-02 19:51:44 PDT
This is no longer an issue after SquirrelFish.