Skip to content

Commit

Permalink
parser: Remove unnecessary astCloneTree()s for ThreadCall arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
dkl committed May 7, 2014
1 parent 55db979 commit 7f5217b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/compiler/rtl-system-thread.bas
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,18 @@ function rtlThreadCall(byval callexpr as ASTNODE ptr) as ASTNODE ptr
if arg = 0 then
exit function
end if
argexpr( args-i+1 ) = astCloneTREE( arg->l )

'' Take the argument expression out of the ARG node
argexpr( args-i+1 ) = arg->l
arg->l = NULL

argmode( args-i+1 ) = arg->arg.mode

arg = arg->r
next i

'' delete call
astDelTREE( callexpr )
'' Delete the CALL and its now empty ARGs
astDelTREE( callexpr )

'' create new call
dim as ASTNODE ptr expr = astNewCall( PROCLOOKUP( THREADCALL ) )
Expand Down

0 comments on commit 7f5217b

Please sign in to comment.