Title: [154521] trunk/Source/_javascript_Core
Revision
154521
Author
[email protected]
Date
2013-08-23 13:50:01 -0700 (Fri, 23 Aug 2013)

Log Message

Failure building with python3
https://bugs.webkit.org/show_bug.cgi?id=106645

Patch by Laszlo Papp <[email protected]> on 2013-08-23
Reviewed by Benjamin Poulain.

Use print functions instead of python statements to be compatible with python 3.X and 2.7 as well.
Archlinux has been using python3 and that is what causes issues while packaging QtWebKit along with Qt5.

* disassembler/udis86/itab.py:
(UdItabGenerator.genInsnTable):
* disassembler/udis86/ud_opcode.py:
(UdOpcodeTables.print_table):
* disassembler/udis86/ud_optable.py:
(UdOptableXmlParser.parseDef):
(UdOptableXmlParser.parse):
(printFn):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (154520 => 154521)


--- trunk/Source/_javascript_Core/ChangeLog	2013-08-23 20:46:04 UTC (rev 154520)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-08-23 20:50:01 UTC (rev 154521)
@@ -1,3 +1,22 @@
+2013-08-23  Laszlo Papp  <[email protected]>
+
+        Failure building with python3
+        https://bugs.webkit.org/show_bug.cgi?id=106645
+
+        Reviewed by Benjamin Poulain.
+
+        Use print functions instead of python statements to be compatible with python 3.X and 2.7 as well.
+        Archlinux has been using python3 and that is what causes issues while packaging QtWebKit along with Qt5.
+
+        * disassembler/udis86/itab.py:
+        (UdItabGenerator.genInsnTable):
+        * disassembler/udis86/ud_opcode.py:
+        (UdOpcodeTables.print_table):
+        * disassembler/udis86/ud_optable.py:
+        (UdOptableXmlParser.parseDef):
+        (UdOptableXmlParser.parse):
+        (printFn):
+
 2013-08-23  Filip Pizlo  <[email protected]>
 
         Incorrect TypedArray#set behavior

Modified: trunk/Source/_javascript_Core/disassembler/udis86/itab.py (154520 => 154521)


--- trunk/Source/_javascript_Core/disassembler/udis86/itab.py	2013-08-23 20:46:04 UTC (rev 154520)
+++ trunk/Source/_javascript_Core/disassembler/udis86/itab.py	2013-08-23 20:50:01 UTC (rev 154521)
@@ -268,13 +268,13 @@
             opr   = e[ 'operands' ]
             for i in range(len(opr)): 
                 if not (opr[i] in self.OperandDict.keys()):
-                    print "error: invalid operand declaration: %s\n" % opr[i]
+                    print("error: invalid operand declaration: %s\n" % opr[i])
                 opr_c[i] = "O_" + opr[i]
             opr = "%s %s %s" % (opr_c[0] + ",", opr_c[1] + ",", opr_c[2])
 
             for p in e['prefixes']:
                 if not ( p in self.PrefixDict.keys() ):
-                    print "error: invalid prefix specification: %s \n" % pfx
+                    print("error: invalid prefix specification: %s \n" % pfx)
                 pfx_c.append( self.PrefixDict[p] )
             if len(e['prefixes']) == 0:
                 pfx_c.append( "P_none" )

Modified: trunk/Source/_javascript_Core/disassembler/udis86/ud_opcode.py (154520 => 154521)


--- trunk/Source/_javascript_Core/disassembler/udis86/ud_opcode.py	2013-08-23 20:46:04 UTC (rev 154520)
+++ trunk/Source/_javascript_Core/disassembler/udis86/ud_opcode.py	2013-08-23 20:50:01 UTC (rev 154521)
@@ -218,17 +218,17 @@
         self.parse(self.OpcodeTable0, insn)
 
     def print_table( self, table, pfxs ):
-        print "%s   |" % pfxs
+        print("%s   |" % pfxs)
         keys = table[ 'entries' ].keys()
         if ( len( keys ) ):
             keys.sort()
         for idx in keys:
             e = table[ 'entries' ][ idx ]
             if e[ 'type' ] == 'insn':
-                print "%s   |-<%s>" % ( pfxs, idx ),
-                print  "%s %s" % ( e[ 'mnemonic' ], ' '.join( e[ 'operands'] ) )
+                print("%s   |-<%s>" % ( pfxs, idx )),
+                print("%s %s" % ( e[ 'mnemonic' ], ' '.join( e[ 'operands'] )))
             else:
-                print "%s   |-<%s> %s" % ( pfxs, idx, e['type'] )
+                print("%s   |-<%s> %s" % ( pfxs, idx, e['type'] ))
                 self.print_table( e, pfxs + '   |' )
 
     def print_tree( self ): 

Modified: trunk/Source/_javascript_Core/disassembler/udis86/ud_optable.py (154520 => 154521)


--- trunk/Source/_javascript_Core/disassembler/udis86/ud_optable.py	2013-08-23 20:46:04 UTC (rev 154520)
+++ trunk/Source/_javascript_Core/disassembler/udis86/ud_optable.py	2013-08-23 20:50:01 UTC (rev 154521)
@@ -50,7 +50,7 @@
             elif def_node.localName == 'vendor':
                 ven = ( def_node.firstChild.data );
             else:
-                print "warning: invalid node - %s" % def_node.localName
+                print("warning: invalid node - %s" % def_node.localName)
                 continue
         return ( pfx, opc, opr, ven )
 
@@ -65,7 +65,7 @@
             if not insnNode.localName:
                 continue
             if insnNode.localName != "instruction":
-                print "warning: invalid insn node - %s" % insnNode.localName
+                print("warning: invalid insn node - %s" % insnNode.localName)
                 continue
 
             mnemonic = insnNode.getElementsByTagName( 'mnemonic' )[ 0 ].firstChild.data
@@ -84,11 +84,11 @@
 
 
 def printFn( pfx, mnm, opc, opr, ven ):
-    print 'def: ',
+    print('def: '),
     if len( pfx ):
-        print ' '.join( pfx ),
-    print "%s %s %s %s" % \
-            ( mnm, ' '.join( opc ), ' '.join( opr ), ven )
+        print(' '.join( pfx )),
+    print("%s %s %s %s" % \
+            ( mnm, ' '.join( opc ), ' '.join( opr ), ven ))
 
 
 def parse( xml, callback ):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to