From 587021e15274293dde92cc18af20cb1cd06211e7 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Wed, 11 Mar 2015 16:50:14 -0700 Subject: [PATCH] Clean up and reorder some fields. --- vm/parser.ts | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/vm/parser.ts b/vm/parser.ts index c4f989b2..96d0a5e8 100644 --- a/vm/parser.ts +++ b/vm/parser.ts @@ -591,38 +591,29 @@ module J2ME { public classInfo: ClassInfo; public accessFlags: ACCESS_FLAGS; + public fn: any; public index: number; public state: MethodState; public stats: MethodInfoStats; - public codeAttribute: CodeAttribute; - public utf8Name: Uint8Array; public utf8Signature: Uint8Array; public returnKind: Kind; + public argumentSlots: number; + public consumeArgumentSlots: number; + public hasTwoSlotArguments: boolean; + vTableIndex: number; private _virtualName: string; private _mangledName: string; private _mangledClassAndMethodName: string; - private _signatureDescriptor: SignatureDescriptor; ///// FIX THESE LATER //// - fn: any; - onStackReplacementEntryPoints: number []; - argumentSlots: number; - - /** - * The number of arguments to pop of the stack when calling this function. - */ - consumeArgumentSlots: number; - - hasTwoSlotArguments: boolean; - exception_table_length: number; exception_table_offset: number; implKey: string; @@ -648,11 +639,12 @@ module J2ME { this.codeAttribute = null; this.scanMethodInfoAttributes(); + + // Parse signature and cache some useful information. var signatureKinds = parseMethodDescriptorKinds(this.utf8Signature, 0); this.returnKind = signatureKinds[0]; this.hasTwoSlotArguments = signatureHasTwoSlotArguments(signatureKinds); this.argumentSlots = signatureArgumentSlotCount(signatureKinds); - this.consumeArgumentSlots = this.argumentSlots; if (!this.isStatic) { this.consumeArgumentSlots ++;