From 237232e0ac9a0b051d4b5c94f236890c5ae22e87 Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Fri, 2 Feb 2024 10:08:09 +0100 Subject: [PATCH] it is inlined --- gnovm/pkg/gnolang/nodes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnovm/pkg/gnolang/nodes.go b/gnovm/pkg/gnolang/nodes.go index 78f9fc83f53..deb475fd308 100644 --- a/gnovm/pkg/gnolang/nodes.go +++ b/gnovm/pkg/gnolang/nodes.go @@ -116,6 +116,8 @@ const ( maxAssignmentOperation = BAND_NOT_ASSIGN ) +// isAssignmentOperation determines if the Word is an assignment operation; +// ie, a combination of an assignment and a binary operator like ADD_ASSIGN. func (w Word) isAssignmentOperation() bool { return w >= minAssignmentOperation && w <= maxAssignmentOperation } @@ -126,7 +128,6 @@ func (w Word) isAssignmentOperation() bool { // // If w is not an assignment operation, ILLEGAL is returned. func (w Word) convertAssignmentOperation() Word { - // XXX: is this inlined? if not, would lookup table make it inlined / better? switch w { case ADD_ASSIGN: return ADD