summaryrefslogtreecommitdiff
path: root/source/slang/modifier-defs.h
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-09-07 10:31:37 -0700
committerGitHub <noreply@github.com>2017-09-07 10:31:37 -0700
commit0e566a63f0bafb7def65521315e9f19a2bc79e34 (patch)
tree470c20f7948693f39b7603645ad9d09fb693c459 /source/slang/modifier-defs.h
parentca16ede67d3fc34ec1cc81b8f835199c5ef1ab9a (diff)
parentced92a047e510480cff15be1a1cd102abffa3f82 (diff)
Merge pull request #177 from tfoleyNV/ir-work
Replace old notion of "intrinsic" operations
Diffstat (limited to 'source/slang/modifier-defs.h')
-rw-r--r--source/slang/modifier-defs.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/source/slang/modifier-defs.h b/source/slang/modifier-defs.h
index d7d0391e4..9a16a0bdd 100644
--- a/source/slang/modifier-defs.h
+++ b/source/slang/modifier-defs.h
@@ -25,32 +25,28 @@ SIMPLE_MODIFIER(Exported);
#undef SIMPLE_MODIFIER
-// Base class for modifiers that mark something as "intrinsic"
-// and thus lacking a direct implementation in the language.
-ABSTRACT_SYNTAX_CLASS(IntrinsicModifierBase, Modifier)
-END_SYNTAX_CLASS()
-
-// A modifier that marks something as one of a small set of
-// truly intrinsic operations that the compiler knows about
-// directly.
-SYNTAX_CLASS(IntrinsicOpModifier, IntrinsicModifierBase)
+// A modifier that marks something as an operation that
+// has a one-to-one translation to the IR, and thus
+// has no direct definition in the high-level language.
+//
+SYNTAX_CLASS(IntrinsicOpModifier, Modifier)
-// token that names the intrinsic op
-FIELD(Token, opToken)
+ // token that names the intrinsic op
+ FIELD(Token, opToken)
-// The opcode for the intrinsic operation
-FIELD_INIT(IntrinsicOp, op, IntrinsicOp::Unknown)
+ // The opcode for the intrinsic operation
+ FIELD_INIT(IROp, op, kIROp_Nop)
END_SYNTAX_CLASS()
// A modifier that marks something as an intrinsic function,
// for some subset of targets.
-SYNTAX_CLASS(TargetIntrinsicModifier, IntrinsicModifierBase)
-// Token that names the target that the operation
-// is an intrisic for.
-FIELD(Token, targetToken)
+SYNTAX_CLASS(TargetIntrinsicModifier, Modifier)
+ // Token that names the target that the operation
+ // is an intrisic for.
+ FIELD(Token, targetToken)
-// A custom definition for the operation
-FIELD(Token, definitionToken)
+ // A custom definition for the operation
+ FIELD(Token, definitionToken)
END_SYNTAX_CLASS()
// A modifier to tag something as an intrinsic that requires