Skip to content

Commit

Permalink
Merge pull request #2202 from michaellilltokiwa/OnDemandClazz-remove-…
Browse files Browse the repository at this point in the history
…special-handling-for-universe

OnDemandClazz remove special handling for universe
  • Loading branch information
fridis committed Nov 3, 2023
2 parents 26164dd + 9ea69ee commit 17e2028
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/dev/flang/air/Clazzes.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ public static class OnDemandClazz
*/
public Clazz getIfCreated()
{
if (_t == null)
{
get();
}
else if (_clazz == null && _clazzesForTypes_.containsKey(_t.get()))
if (_clazz == null && _clazzesForTypes_.containsKey(_t.get()))
{
_clazz = clazz(_t.get());
}
Expand All @@ -118,14 +114,7 @@ public Clazz get()
{
if (_clazz == null)
{
if (_t == null)
{
_clazz = clazz(Types.resolved.universe.selfType());
}
else
{
_clazz = clazz(_t.get());
}
_clazz = clazz(_t.get());
}
return _clazz;
}
Expand All @@ -138,7 +127,7 @@ public void clear()
/**
* Handy preallocated classes to be used during execution:
*/
public static final OnDemandClazz universe = new OnDemandClazz(null);
public static final OnDemandClazz universe = new OnDemandClazz(() -> Types.resolved.universe.selfType());
public static final OnDemandClazz c_void = new OnDemandClazz(() -> Types.resolved.t_void );
public static final OnDemandClazz bool = new OnDemandClazz(() -> Types.resolved.t_bool );
public static final OnDemandClazz c_TRUE = new OnDemandClazz(() -> Types.resolved.f_TRUE .selfType() );
Expand Down

0 comments on commit 17e2028

Please sign in to comment.