MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / perform

Method perform

src/main/java/fieldbox/boxes/Boxes.java:73–113  ·  view source on GitHub ↗
(int pass)

Source from the content-addressed store, hash-verified

71
72 protected Scene.Perform updater = new Scene.Perform() {
73 @Override
74 public boolean perform(int pass) {
75
76 origin.forEach(
77 // turns out, this is something on the order of 20mb a second of garbage at full framerate.
78// origin.find(insideRunLoop, origin.both())
79// .forEach(
80 y -> {
81
82 Map<String, Supplier<Boolean>> x = y.properties.get(insideRunLoop);
83 if (x == null || x.size() == 0) return;
84
85 Iterator<Map.Entry<String, Supplier<Boolean>>> r = x.entrySet()
86 .iterator();
87 while (r.hasNext()) {
88 Map.Entry<String, Supplier<Boolean>> n = r.next();
89 try {
90 if (n.getKey().startsWith("main.") || n.getKey().startsWith("main_"))
91 try {
92 Execution.context.get().push(y);
93 if (!n.getValue()
94 .get()) r.remove();
95 } catch (Throwable t) {
96 t.printStackTrace();
97 } finally {
98 Execution.context.get().pop();
99 }
100 } catch (Throwable t) {
101 t.printStackTrace();
102 try {
103 r.remove();
104 } catch (Throwable tt) {
105 }
106 }
107 }
108 });
109 return true;
110 }
111
112 @Override
113 public int[] getPasses() {
114 return new int[]{10};
115 }
116 };

Callers

nothing calls this directly

Calls 11

getMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65
forEachMethod · 0.45
sizeMethod · 0.45
iteratorMethod · 0.45
pushMethod · 0.45
getValueMethod · 0.45
printlnMethod · 0.45
removeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected