@@ -2003,11 +2003,11 @@ func (c *codegen) convertBuiltin(expr *ast.CallExpr) {
20032003 emit .Opcodes (c .prog .BinWriter , opcode .DUP , opcode .SIZE ) // x y cnt x y len(y)
20042004 emit .Opcodes (c .prog .BinWriter , opcode .PUSH3 , opcode .PICK ) // x y cnt x y len(y) cnt
20052005 after := c .newLabel ()
2006- emit .Jmp (c .prog .BinWriter , opcode .JMPEQL , after ) // x y cnt x y
2006+ emit .Jmp (c .prog .BinWriter , opcode .JMPEQL , after ) // x y cnt x y
20072007 emit .Opcodes (c .prog .BinWriter , opcode .PUSH2 , opcode .PICK , // x y cnt x y cnt
20082008 opcode .PICKITEM , // x y cnt x y[cnt]
20092009 opcode .APPEND , // x=append(x, y[cnt]) y cnt
2010- opcode .INC ) // x y cnt+1
2010+ opcode .INC ) // x y cnt+1
20112011 emit .Jmp (c .prog .BinWriter , opcode .JMPL , start )
20122012 c .setLabel (after )
20132013 for range 4 { // leave x on stack
@@ -2508,6 +2508,9 @@ func codeGen(info *buildInfo) (*nef.File, *DebugInfo, error) {
25082508 if c .callTokens != nil {
25092509 f .Tokens = c .callTokens
25102510 }
2511+ if info .options != nil && len (info .options .SourceURL ) > 0 {
2512+ f .Source = info .options .SourceURL
2513+ }
25112514 f .Checksum = f .CalculateChecksum ()
25122515 return f , di , vm .IsScriptCorrect (buf , methods )
25132516}
0 commit comments