/*
Kopp VM
Node.js powered Java virtual machine (JVM)

Copyright 2014 Sam Saint-Pettersen.

Released under the MIT/X11 License.
Please see LICENSE file.
*/

var magic = parseInt('CAFEBABE', 16); // Magic value: 0xCAFEBABE.

// A `class` file consists of a single `ClassFile` structure.
var ClassFile = {
    u4a: magic,
    u2b: minor_version,
    u2c: major_version,
    u2d: constant_pool_count,
    cp_info: constant_pool[constant_pool_count-1],
    u2e: access_flags,
    u2f: this_class,
    u2g: super_class,
    u2h: interfaces_count,
    u2i: interfaces[interfaces_count],
    u2j: fields_count,
    field_info: fields[fields_count],
    u2k: methods_count,
    method_info: methods[methods_count],
    u2l: attributes_count,
    attribute_info: attributes[attributes_count]
};

@@ -215,16 +215,309 @@
 AFEBABE.
+%0Avar minor_version = 0;%0Avar major_version = 0;%0Avar constant_pool_count = 0;%0Avar access_flags = parseInt('0001', 16); // 0x0001: Public.%0Avar this_class = 0;%0Avar super_class = 0;%0Avar interfaces_count = 0;%0Avar fields_count = 0;%0Avar methods_count = 0;%0Avar attributes_count = 0;%0Avar attributes = 0;
 %0A%0A// A %60

define defaults.