-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to use const expressions inside array initializers (#693)
* Add ability to use const expressions inside array initializers
- Loading branch information
Showing
4 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializerConstExpression.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
System.Int32 <Module>::main() | ||
Locals: | ||
System.Int32* V_0 | ||
IL_0000: ldc.i4.s 28 | ||
IL_0002: conv.u | ||
IL_0003: localloc | ||
IL_0005: stloc.0 | ||
IL_0006: ldsflda <ConstantPool>/<ConstantPoolItemType28> <ConstantPool>::ConstDataBuffer0 | ||
IL_000b: ldloc V_0 | ||
IL_000f: ldc.i4.s 28 | ||
IL_0011: conv.u | ||
IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) | ||
IL_0017: ldloc.0 | ||
IL_0018: ldc.i4.1 | ||
IL_0019: conv.i | ||
IL_001a: ldc.i4 4 | ||
IL_001f: mul | ||
IL_0020: add | ||
IL_0021: ldind.i4 | ||
IL_0022: ldc.i4.s 99 | ||
IL_0024: ceq | ||
IL_0026: ldc.i4.0 | ||
IL_0027: ceq | ||
IL_0029: brfalse IL_0030 | ||
IL_002e: ldc.i4.0 | ||
IL_002f: ret | ||
IL_0030: nop | ||
IL_0031: ldc.i4.1 | ||
IL_0032: ret | ||
|
||
System.Int32 <Module>::<SyntheticEntrypoint>() | ||
Locals: | ||
System.Int32 V_0 | ||
IL_0000: call System.Int32 <Module>::main() | ||
IL_0005: stloc.s V_0 | ||
IL_0007: ldloc.s V_0 | ||
IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) | ||
IL_000e: ldloc.s V_0 | ||
IL_0010: ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters