Bug 60283

Summary: Fix MIPS build due to AssemblerLabel
Product: WebKit Reporter: Chao-ying Fu <fu>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Swap two header files eric: review-

Description Chao-ying Fu 2011-05-05 11:40:11 PDT
Need to swap the header file to make MIPS build.  Will submit a patch soon.  Thanks!

Index: assembler/MacroAssemblerMIPS.h
===================================================================
--- assembler/MacroAssemblerMIPS.h      (revision 85839)
+++ assembler/MacroAssemblerMIPS.h      (working copy)
@@ -29,8 +29,8 @@

 #if ENABLE(ASSEMBLER) && CPU(MIPS)

+#include "MIPSAssembler.h"
 #include "AbstractMacroAssembler.h"
-#include "MIPSAssembler.h"

 namespace JSC {
Comment 1 Chao-ying Fu 2011-05-05 11:45:45 PDT
Created attachment 92438 [details]
Swap two header files

Here is the patch.  Thanks!
Comment 2 WebKit Review Bot 2011-05-05 11:47:32 PDT
Attachment 92438 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h:33:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Eric Seidel (no email) 2011-05-11 20:07:49 PDT
Comment on attachment 92438 [details]
Swap two header files

Huh?  Header order should never matter in WebKit.  Should one of these be importing the other?
Comment 4 Chao-ying Fu 2011-05-12 10:48:21 PDT
1. "MIPSAssembler.h" includes "AssemblerBuffer.h" that defines "struct AssemblerLabel".

2. "AbstractMacroAssembler.h" needs to have the definition of "struct AssemblerLabel".  So, I need to include "MIPSAssembler.h" before including "AbstractMacroAssembler.h".

Or, can we modify "AbstractMacroAssembler.h" to include "AssemblerBuffer.h directly"?

Thanks!

Regards,
Chao-ying
Comment 5 Chao-ying Fu 2011-05-12 15:31:57 PDT
r86239 fixed this bug.  So, just close this.  Thanks!

r86239 | zecke@webkit.org | 2011-05-11 09:42:43 -0700 (Wed, 11 May 2011) | 7 lines

[MIPS] Fix compilation of the MIPS JIT

Include the MIPSAssembler.h first to indirectly include
AssemblerBuffer.h before the AbstractMacroAssembler.h. This
order is used for the ARM and X86 MacroAssembler*.h.

* assembler/MacroAssemblerMIPS.h: