Bug 108247 - Remove redundant AST dump method from cloop.rb, since they are already defined in ast.rb
Summary: Remove redundant AST dump method from cloop.rb, since they are already define...
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:
 
Reported: 2013-01-29 16:24 PST by Filip Pizlo
Modified: 2013-01-29 16:36 PST (History)
9 users (show)

See Also:


Attachments
the patch (3.13 KB, patch)
2013-01-29 16:26 PST, Filip Pizlo
oliver: 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-01-29 16:24:22 PST
The definitions in ast.rb are the correct ones since they pretty-print the code that you would have written.  The ones in cloop.rb appear to do something different entirely, and often lead to either ambiguities (AbsoluteAddress will print the same as Immediate), strange assertions (RegisterID will assert the name of the register, and it's not clear it supports the full list of registers), and general confusion (RegisterID and BaseIndex use register names that are not valid offlineasm syntax).
Comment 1 Filip Pizlo 2013-01-29 16:26:37 PST
Created attachment 185336 [details]
the patch
Comment 2 Filip Pizlo 2013-01-29 16:32:25 PST
Landed in http://trac.webkit.org/changeset/141178
Comment 3 Mark Lam 2013-01-29 16:32:46 PST
Comment on attachment 185336 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=185336&action=review

> Source/JavaScriptCore/offlineasm/cloop.rb:-96
> -    end

I think you will break the cloop code with this change.  See LowLevelInterpreter.cpp.  These register names are used there.  If you change these, I think you'll have to change it there as well to allow LLINT_C_LOOP to build.
Comment 4 Filip Pizlo 2013-01-29 16:36:15 PST
(In reply to comment #3)
> (From update of attachment 185336 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=185336&action=review
> 
> > Source/JavaScriptCore/offlineasm/cloop.rb:-96
> > -    end
> 
> I think you will break the cloop code with this change.  See LowLevelInterpreter.cpp.  These register names are used there.  If you change these, I think you'll have to change it there as well to allow LLINT_C_LOOP to build.

Ah.  In that case the correct thing to do is to not have cloop.rb use a method called 'dump'.  That's the bug: https://bugs.webkit.org/show_bug.cgi?id=108251