Bug 108247

Summary: Remove redundant AST dump method from cloop.rb, since they are already defined in ast.rb
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ddkilzer, ggaren, mark.lam, mhahnenberg, msaboff, oliver, psolanki, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch oliver: review+

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