import imp
import os
import re
+import six
import sys
import zlib
super(SourceMeta, cls).__init__(name, bases, dict)
cls.all = SourceList()
+@six.add_metaclass(SourceMeta)
class SourceFile(object):
'''Base object that encapsulates the notion of a source file.
This includes, the source node, target node, various manipulations
of those. A source file also specifies a set of tags which
describing arbitrary properties of the source file.'''
- __metaclass__ = SourceMeta
static_objs = {}
shared_objs = {}
cls.all = []
+@six.add_metaclass(ExecutableMeta)
class Executable(object):
'''Base class for creating an executable from sources.'''
- __metaclass__ = ExecutableMeta
abstract = True
}};
let {{
+
+ import six
+
# Make these empty strings so that concatenating onto
# them will always work.
header_output = ""
return cls
+ @six.add_metaclass(FpOpMeta)
class FpUnaryOp(X86Microop):
- __metaclass__ = FpOpMeta
# This class itself doesn't act as a microop
abstract = True
"dataSize" : self.dataSize,
"spm" : self.spm}
+ @six.add_metaclass(FpOpMeta)
class FpBinaryOp(X86Microop):
- __metaclass__ = FpOpMeta
# This class itself doesn't act as a microop
abstract = True
return cls
+ @six.add_metaclass(MediaOpMeta)
class MediaOp(X86Microop):
- __metaclass__ = MediaOpMeta
# This class itself doesn't act as a microop
abstract = True
return cls
+ @six.add_metaclass(RegOpMeta)
class RegOp(X86Microop):
- __metaclass__ = RegOpMeta
# This class itself doesn't act as a microop
abstract = True
import os
import re
import subprocess
+import six
import sys
script_path = os.path.abspath(inspect.getfile(inspect.currentframe()))
super(TestPhaseMeta, cls).__init__(name, bases, d)
+@six.add_metaclass(TestPhaseMeta)
class TestPhaseBase(object):
- __metaclass__ = TestPhaseMeta
abstract = True
def __init__(self, main_args, *args):