private void Inline(InlineCodeProvider provider, IMethod method) { var jsMethod = method.Data as JsGeneratedMethod; if (jsMethod != null) { return; } var impl = CompileInlineFunction(method, provider); if (impl == null) { var info = method.GetInlineInfo(); if (info != null) { CompileInlineMethod(method, info); return; } throw new NotImplementedException(); } jsMethod = new JsGeneratedMethod(method.JsFullName(), impl); method.Data = jsMethod; var klass = CompileClass(method.DeclaringType); klass.Add(jsMethod); }
private void CompileInlineMethod(IMethod method, InlineMethodInfo info) { var jsMethod = method.Data as JsGeneratedMethod; if (jsMethod != null) { return; } var func = CompileInlineFunction(method, info); var klass = CompileClass(method.DeclaringType); jsMethod = new JsGeneratedMethod(method.JsFullName(), func); method.Data = jsMethod; klass.Add(jsMethod); }