From d080cb7f1924bb564ed336802a94848aaaecadba Mon Sep 17 00:00:00 2001 From: Chris Feger Date: Wed, 9 Nov 2022 11:50:59 -0700 Subject: [PATCH] Add helper functions for building newly usable instructions --- AS3/src/com/cff/anebe/ir/ASInstruction.as | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/AS3/src/com/cff/anebe/ir/ASInstruction.as b/AS3/src/com/cff/anebe/ir/ASInstruction.as index 2fe5146..288d822 100644 --- a/AS3/src/com/cff/anebe/ir/ASInstruction.as +++ b/AS3/src/com/cff/anebe/ir/ASInstruction.as @@ -299,6 +299,10 @@ package com.cff.anebe.ir { return new ASInstruction(OP_raw, [v]); } + public static function Bkpt():ASInstruction + { + return new ASInstruction(OP_bkpt); + } public static function Nop():ASInstruction { return new ASInstruction(OP_nop); @@ -763,6 +767,14 @@ package com.cff.anebe.ir { return new ASInstruction(OP_astypelate); } + public static function Coerce_u():ASInstruction + { + return new ASInstruction(OP_coerce_u); + } + public static function Coerce_o():ASInstruction + { + return new ASInstruction(OP_coerce_o); + } public static function Negate():ASInstruction { return new ASInstruction(OP_negate); @@ -955,5 +967,13 @@ package com.cff.anebe.ir { return new ASInstruction(OP_debugfile, [filename]); } + public static function BkptLine(lineNum:uint):ASInstruction + { + return new ASInstruction(OP_bkptline, [lineNum]); + } + public static function Timestamp():ASInstruction + { + return new ASInstruction(OP_timestamp); + } } }