Skip to content

Commit b0b2902

Browse files
committed
fix layouted to laid out
1 parent 9fbd75d commit b0b2902

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

Diff for: substratevm/src/com.oracle.svm.core.graal.amd64/src/com/oracle/svm/core/graal/amd64/AMD64CalleeSavedRegisters.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ private Object displacementAnnotation(JavaConstant constant) {
490490
if (SubstrateUtil.HOSTED) {
491491
/*
492492
* AOT compilation during image generation happens before the image heap objects are
493-
* layouted. So the offset of the constant is not known yet during compilation time,
493+
* laid out. So the offset of the constant is not known yet during compilation time,
494494
* and instead needs to be patched in later. We annotate the machine code with the
495495
* constant that needs to be patched in.
496496
*/

Diff for: substratevm/src/com.oracle.svm.core.graal.amd64/src/com/oracle/svm/core/graal/amd64/SubstrateAMD64Backend.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ public static Object addressDisplacementAnnotation(JavaConstant constant) {
459459
if (SubstrateUtil.HOSTED) {
460460
/*
461461
* AOT compilation during image generation happens before the image heap objects are
462-
* layouted. So the offset of the constant is not known yet during compilation time, and
462+
* laid out. So the offset of the constant is not known yet during compilation time, and
463463
* instead needs to be patched in later. We annotate the machine code with the constant
464464
* that needs to be patched in.
465465
*/

Diff for: substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/CGlobalDataFeature.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static CGlobalDataFeature singleton() {
104104
return ImageSingletons.lookup(CGlobalDataFeature.class);
105105
}
106106

107-
private boolean isLayouted() {
107+
private boolean isLaidOut() {
108108
return totalSize != -1;
109109
}
110110

@@ -187,7 +187,7 @@ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Rec
187187

188188
public CGlobalDataInfo registerAsAccessedOrGet(CGlobalData<?> obj) {
189189
CGlobalDataImpl<?> data = (CGlobalDataImpl<?>) obj;
190-
VMError.guarantee(!isLayouted() || map.containsKey(data), "CGlobalData instance must have been discovered/registered before or during analysis");
190+
VMError.guarantee(!isLaidOut() || map.containsKey(data), "CGlobalData instance must have been discovered/registered before or during analysis");
191191
return map.computeIfAbsent((CGlobalDataImpl<?>) obj,
192192
o -> {
193193
CGlobalDataInfo cGlobalDataInfo = new CGlobalDataInfo(data);
@@ -260,7 +260,7 @@ private static CGlobalDataInfo assignCGlobalDataSize(Map.Entry<CGlobalDataImpl<?
260260
}
261261

262262
private void layout() {
263-
assert !isLayouted() : "Already layouted";
263+
assert !isLaidOut() : "Already laid out";
264264
final int wordSize = ConfigurationValues.getTarget().wordSize;
265265
/*
266266
* Put larger blobs at the end so that offsets are reasonable (<24bit imm) for smaller
@@ -275,11 +275,11 @@ private void layout() {
275275
int nextOffset = currentOffset + info.getSize();
276276
return (nextOffset + (wordSize - 1)) & ~(wordSize - 1); // align
277277
}, Integer::sum);
278-
assert isLayouted();
278+
assert isLaidOut();
279279
}
280280

281281
public int getSize() {
282-
assert isLayouted() : "Not layouted yet";
282+
assert isLaidOut() : "Not laid out yet";
283283
return totalSize;
284284
}
285285

@@ -288,7 +288,7 @@ public interface SymbolConsumer {
288288
}
289289

290290
public void writeData(RelocatableBuffer buffer, SymbolConsumer createSymbol, SymbolConsumer createSymbolReference) {
291-
assert isLayouted() : "Not layouted yet";
291+
assert isLaidOut() : "Not laid out yet";
292292
ByteBuffer bufferBytes = buffer.getByteBuffer();
293293
int start = bufferBytes.position();
294294
assert IntStream.range(start, start + totalSize).allMatch(i -> bufferBytes.get(i) == 0) : "Buffer must be zero-initialized";

Diff for: visualizer/IdealGraphVisualizer/View/src/main/java/org/graalvm/visualizer/view/impl/DiagramCache.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public Map getMap() {
215215
}
216216

217217
public final class FilterDiagramCache extends DiagramCacheValue<List<Filter>> {
218-
public final Map<LayoutSettingBean, LayoutDiagramCache> layoutedDiagramMap = new HashMap<>();
218+
public final Map<LayoutSettingBean, LayoutDiagramCache> laidOutDiagramMap = new HashMap<>();
219219

220220
protected FilterDiagramCache(Diagram referent, Reference<List<Filter>> key, DiagramCacheBase parent) {
221221
super(referent, key, parent);
@@ -224,7 +224,7 @@ protected FilterDiagramCache(Diagram referent, Reference<List<Filter>> key, Diag
224224
@Override
225225
public synchronized Diagram getDiagram(DiagramViewModel model, Consumer<Diagram> diagramReadyCallback) {
226226
LayoutSettingBean layoutSetting = model.getLayoutSetting();
227-
LayoutDiagramCache layoutDiagramCache = layoutedDiagramMap.get(layoutSetting);
227+
LayoutDiagramCache layoutDiagramCache = laidOutDiagramMap.get(layoutSetting);
228228
Diagram tmp = null;
229229
if (layoutDiagramCache != null) {
230230
tmp = layoutDiagramCache.get();
@@ -241,16 +241,16 @@ public synchronized Diagram getDiagram(DiagramViewModel model, Consumer<Diagram>
241241
@Override
242242
public synchronized DiagramCacheBase makeCache(DiagramViewModel model, Diagram baseDiagram) {
243243
LayoutSettingBean layoutSetting = model.getLayoutSetting();
244-
LayoutDiagramCache layoutDiagramCache = layoutedDiagramMap.get(layoutSetting);
244+
LayoutDiagramCache layoutDiagramCache = laidOutDiagramMap.get(layoutSetting);
245245
Diagram tmp = null;
246246
if (layoutDiagramCache != null) {
247247
tmp = layoutDiagramCache.get();
248248
}
249249
if (tmp != null && tmp.getSize() == null) {
250250
// size of Diagram is null, so we have cached only extracted Diagrams after this stub.
251-
LOG.log(Level.FINE, "Exchanging stub Diagram: {0} for its layouted counterpart: {1}", new Object[]{tmp, baseDiagram});
251+
LOG.log(Level.FINE, "Exchanging stub Diagram: {0} for its laid out counterpart: {1}", new Object[]{tmp, baseDiagram});
252252
LayoutDiagramCache layoutDiagramCacheNew = new LayoutDiagramCache(baseDiagram, new WeakReference<>(layoutSetting), this);
253-
layoutedDiagramMap.put(layoutSetting, layoutDiagramCacheNew);
253+
laidOutDiagramMap.put(layoutSetting, layoutDiagramCacheNew);
254254
for (ExtractedDiagramCache c : layoutDiagramCache.extractedDiagramMap.values()) {
255255
Set<Integer> key = c.key.get();
256256
Diagram d = c.get();
@@ -260,7 +260,7 @@ public synchronized DiagramCacheBase makeCache(DiagramViewModel model, Diagram b
260260
}
261261
layoutDiagramCache = layoutDiagramCacheNew;
262262
} else if (tmp == null) {
263-
layoutedDiagramMap.put(layoutSetting, layoutDiagramCache = new LayoutDiagramCache(baseDiagram, new WeakReference<>(layoutSetting), this));
263+
laidOutDiagramMap.put(layoutSetting, layoutDiagramCache = new LayoutDiagramCache(baseDiagram, new WeakReference<>(layoutSetting), this));
264264
}
265265
return layoutDiagramCache;
266266
}
@@ -272,7 +272,7 @@ public Phase nextPhase(DiagramViewModel model) {
272272

273273
@Override
274274
public Map getMap() {
275-
return layoutedDiagramMap;
275+
return laidOutDiagramMap;
276276
}
277277
}
278278

@@ -289,7 +289,7 @@ public synchronized Diagram getDiagram(DiagramViewModel model, Consumer<Diagram>
289289
if (hidNodes.isEmpty()) {
290290
Diagram fin = get();
291291
assert fin != null;
292-
assert fin.getSize() != null : "Diagram wasn't layouted, but would be returned as finished.";
292+
assert fin.getSize() != null : "Diagram wasn't laid out, but would be returned as finished.";
293293
LOG.log(Level.FINE, "Loaded cached unextracted Diagram: {0}.", fin);
294294
return fin;
295295
}

Diff for: visualizer/Modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ organized into stages:
181181

182182
- base diagram,
183183
- filtered diagram (including scripts),
184-
- layouted diagram,
184+
- laid out diagram,
185185
- extracted diagram
186186

187187
Output of each stage is weakly cached, with respect to the settings / applied function; this allows to e.g. quickly change extraction, since

0 commit comments

Comments
 (0)