Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TypeManger {
- static HashMap<String, ClassInfo> classes;
- static ClassInfo get(String name) {
- if the class has been loaded, return the reference,
- else load it, store it, and return the reference
- }
- }
- class ClassInfo {
- String name;
- String module;
- ClassInfo superclass;
- ClassInfo[] interfaces;
- MethodInfo[] ctors;
- MethodInfo[] dtors;
- HashMap<String, ClassInfo> object_variables;
- HashMap<String, ClassInfo> class_variables;
- HashMap<String, MethodInfo> object_functions;
- HashMap<String, MethodInfo> class_functions;
- ArrayList<String> overloaded_variables;
- ArrayList<String> overloaded_functions;
- ArrayList<String>[] interface_method_implementations;
- }
- class MethodInfo {
- String name;
- ClassInfo returnType;
- ClassInfo[] paramTypes;
- String[] paramNames;
- byte[] actual_code;
- }
- class Program {
- HashMap<String, ClassInfo> imported_classes;
- ClassInfo getImport(String name) {
- if the class has been loaded, return the reference,
- else load it, store it, and return the reference
- }
- HashMap<String, ClassInfo> exported_classes;//the stuff defined in the file to be compiled
- ClassInfo getExport(String name) {
- ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement