+# This file is part of libFirm.
+# Copyright (C) 2012 Karlsruhe Institute of Technology.
+#
# Firm node specifications
# The comments are in (standard python) restructured text format and are used
# to generate documentation.
}
'''
-@op
-class Bound:
- """Performs a bounds-check: if lower <= index < upper then return index,
- otherwise throw an exception."""
- ins = [
- ("mem", "memory dependency"),
- ("index", "value to test"),
- ("lower", "lower bound (inclusive)"),
- ("upper", "upper bound (exclusive)"),
- ]
- outs = [
- ("M", "memory result"),
- ("res", "the checked index"),
- ("X_regular", "control flow when no exception occurs"),
- ("X_except", "control flow when exception occured"),
- ]
- flags = [ "fragile", "highlevel" ]
- pinned = "exception"
- pinned_init = "op_pin_state_pinned"
- throws_init = "false"
- attr_struct = "bound_attr"
-
@op
class Builtin:
"""performs a backend-specific builtin."""
assert((get_unknown_type() == type) || is_Method_type(type));
'''
-@op
-class Cast(Unop):
- """perform a high-level type cast"""
- mode = "get_irn_mode(irn_op)"
- flags = [ "highlevel" ]
- attrs = [
- dict(
- type = "ir_type*",
- name = "type",
- comment = "target type of the case",
- )
- ]
- attr_struct = "cast_attr"
- init = "assert(is_atomic_type(type));"
-
@op
class Cmp(Binop):
"""Compares its two operands and checks whether a specified