Quellcode durchsuchen

Added all registered modules to the compile space

kindlich vor 5 Jahren
Ursprung
Commit
a3eea65869
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden

+ 2
- 0
JavaShared/src/main/java/org/openzen/zenscript/javashared/JavaCompileSpace.java Datei anzeigen

@@ -13,6 +13,8 @@ import org.openzen.zenscript.codemodel.type.GlobalTypeRegistry;
13 13
  * @author Hoofdgebruiker
14 14
  */
15 15
 public interface JavaCompileSpace {
16
+	void register(JavaCompiledModule module);
17
+
16 18
 	GlobalTypeRegistry getRegistry();
17 19
 	
18 20
 	JavaCompiledModule getCompiled(Module module);

+ 3
- 0
JavaShared/src/main/java/org/openzen/zenscript/javashared/JavaContext.java Datei anzeigen

@@ -128,6 +128,9 @@ public abstract class JavaContext {
128 128
 	
129 129
 	public void addModule(Module module, JavaCompiledModule target) {
130 130
 		modules.put(module, target);
131
+
132
+		//TODO: can we do this here?
133
+		space.register(target);
131 134
 	}
132 135
 	
133 136
 	public JavaCompiledModule getJavaModule(Module module) {

+ 2
- 1
JavaShared/src/main/java/org/openzen/zenscript/javashared/SimpleJavaCompileSpace.java Datei anzeigen

@@ -21,7 +21,8 @@ public class SimpleJavaCompileSpace implements JavaCompileSpace {
21 21
 	public SimpleJavaCompileSpace(GlobalTypeRegistry registry) {
22 22
 		this.registry = registry;
23 23
 	}
24
-	
24
+
25
+	@Override
25 26
 	public void register(JavaCompiledModule module) {
26 27
 		modules.put(module.module, module);
27 28
 	}

Laden…
Abbrechen
Speichern