{"action":"opened","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5280","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5280/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5280/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5280/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/5280","id":156921110,"number":5280,"title":"[C#] Is it possible to remove double parameters from Closure?","user":{"login":"vroad","id":396351,"avatar_url":"https://avatars.githubusercontent.com/u/396351?v=3","gravatar_id":"","url":"https://api.github.com/users/vroad","html_url":"https://github.com/vroad","followers_url":"https://api.github.com/users/vroad/followers","following_url":"https://api.github.com/users/vroad/following{/other_user}","gists_url":"https://api.github.com/users/vroad/gists{/gist_id}","starred_url":"https://api.github.com/users/vroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vroad/subscriptions","organizations_url":"https://api.github.com/users/vroad/orgs","repos_url":"https://api.github.com/users/vroad/repos","events_url":"https://api.github.com/users/vroad/events{/privacy}","received_events_url":"https://api.github.com/users/vroad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-26T07:26:18Z","updated_at":"2016-05-26T07:26:18Z","closed_at":null,"body":"C# target often generates code like this for closure. To avoid boxing when passing numeric arguments, perhaps? But is that really faster?\r\n\r\nIn here, NDLLFunction.Call1 actually takes arg1 as object to accept any type of argument.\r\n\r\nhttps://github.com/vroad/lime/blob/fb2a93165a43f7b8f8b07a14d79c98a65a6cfa69/templates/cs/src/cs/ndll/NDLLFunction.cs#L181\r\n\r\nConverting argument to double is redundant in this case, so I want to turn it off if it's possible. This will also disallow you to pass integer argument as it is. You don't lose any information when converting from Int32, though.\r\n\r\n```cs\r\n#pragma warning disable 109, 114, 219, 429, 168, 162\r\nnamespace lime.system {\r\n\tpublic class CSFunctionLoader_load_37__Fun : global::haxe.lang.Function {\r\n\t\t\r\n\t\tpublic CSFunctionLoader_load_37__Fun(global::cs.ndll.NDLLFunction func1) : base(1, 0) {\r\n\t\t\tthis.func1 = func1;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tpublic override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1) {\r\n\t\t\tobject arg1 = ( (( __fn_dyn1 == global::haxe.lang.Runtime.undefined )) ? (((object) (__fn_float1) )) : (((object) (__fn_dyn1) )) );\r\n\t\t\treturn this.func1.Call1(arg1);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tpublic global::cs.ndll.NDLLFunction func1;\r\n\t\t\r\n\t}\r\n}\r\n```"}}
{"actor":{"display_login":"vroad"}}