internal AbcMethod DefineMethod(Sig sig, AbcCoder coder) { var method = new AbcMethod { ReturnType = sig.ReturnType != null ? DefineTypeNameSafe(sig.ReturnType) : null }; if (sig.Args != null) { AddParameters(method.Parameters, sig.Args); } var body = new AbcMethodBody(method); AddMethod(method); if (coder != null) { var code = new AbcCode(this); coder(code); body.Finish(code); } return(method); }
internal void Finish(AbcCode code) { if (_body == null) { throw new InvalidOperationException("Method has no body"); } _body.Finish(code); }