https://bugs.webkit.org/show_bug.cgi?id=106645
Patch by Laszlo Papp <lpapp@kde.org> 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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-08-23 Laszlo Papp <lpapp@kde.org>
+
+ 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 <fpizlo@apple.com>
Incorrect TypedArray#set behavior
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" )
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 ):
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 )
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
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 ):