mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-28 16:31:36 +00:00
Aligned struct variable creation with normal variables.
This commit is contained in:
parent
5ab9b4353c
commit
363a6c4424
@ -396,7 +396,7 @@ public abstract class Scope implements Symbol, Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(symVar.isConstant()) {
|
if(symVar.isConstant() && symVar.getConstantValue()!=null) {
|
||||||
res.append(" = " + symVar.getConstantValue().toString(program));
|
res.append(" = " + symVar.getConstantValue().toString(program));
|
||||||
}
|
}
|
||||||
res.append("\n");
|
res.append("\n");
|
||||||
|
@ -24,7 +24,7 @@ public class StructDefinition extends Scope {
|
|||||||
* @return The member variable
|
* @return The member variable
|
||||||
*/
|
*/
|
||||||
public Variable getMember(String name) {
|
public Variable getMember(String name) {
|
||||||
for(Variable member : getAllVariables(false)) {
|
for(Variable member : getAllVars(false)) {
|
||||||
if(member.getLocalName().equals(name)) {
|
if(member.getLocalName().equals(name)) {
|
||||||
return member;
|
return member;
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ public class StructDefinition extends Scope {
|
|||||||
*/
|
*/
|
||||||
public long getMemberByteOffset(Variable member, ProgramScope programScope) {
|
public long getMemberByteOffset(Variable member, ProgramScope programScope) {
|
||||||
long byteOffset=0;
|
long byteOffset=0;
|
||||||
for(Variable structMember : getAllVariables(false)) {
|
for(Variable structMember : getAllVars(false)) {
|
||||||
if(structMember.equals(member)) {
|
if(structMember.equals(member)) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -102,7 +102,7 @@ public class SymbolTypeInference {
|
|||||||
if(structType instanceof SymbolTypeStruct) {
|
if(structType instanceof SymbolTypeStruct) {
|
||||||
String typeName = ((SymbolTypeStruct) structType).getStructTypeName();
|
String typeName = ((SymbolTypeStruct) structType).getStructTypeName();
|
||||||
StructDefinition structDefinition = symbols.getStructDefinition(typeName);
|
StructDefinition structDefinition = symbols.getStructDefinition(typeName);
|
||||||
Variable structMember = structDefinition.getVariable(structMemberRef.getMemberName());
|
Variable structMember = structDefinition.getVar(structMemberRef.getMemberName());
|
||||||
return structMember.getType();
|
return structMember.getType();
|
||||||
} else {
|
} else {
|
||||||
throw new CompileError("Dot applied to non-struct "+ structMemberRef.getStruct().toString());
|
throw new CompileError("Dot applied to non-struct "+ structMemberRef.getStruct().toString());
|
||||||
|
@ -53,7 +53,7 @@ public class SymbolTypeStruct implements SymbolType {
|
|||||||
*/
|
*/
|
||||||
public int calculateSizeBytes(StructDefinition structDefinition, ProgramScope programScope) {
|
public int calculateSizeBytes(StructDefinition structDefinition, ProgramScope programScope) {
|
||||||
int sizeBytes = 0;
|
int sizeBytes = 0;
|
||||||
for(Variable member : structDefinition.getAllVariables(false)) {
|
for(Variable member : structDefinition.getAllVars(false)) {
|
||||||
SymbolType memberType = member.getType();
|
SymbolType memberType = member.getType();
|
||||||
int memberSize = getMemberSizeBytes(memberType, member.getArraySpec(), programScope);
|
int memberSize = getMemberSizeBytes(memberType, member.getArraySpec(), programScope);
|
||||||
sizeBytes += memberSize;
|
sizeBytes += memberSize;
|
||||||
|
@ -569,28 +569,9 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
|||||||
try {
|
try {
|
||||||
// Find kind
|
// Find kind
|
||||||
Variable.Kind kind = directiveContext.getKind(declVarType, getCurrentScope(), false, declIsArray, declVarDirectives, statementSource);
|
Variable.Kind kind = directiveContext.getKind(declVarType, getCurrentScope(), false, declIsArray, declVarDirectives, statementSource);
|
||||||
|
|
||||||
// Handle struct member vars
|
|
||||||
if(declVarStructMember) {
|
|
||||||
if(initializer != null)
|
|
||||||
throw new CompileError("Initializers not supported inside structs.", statementSource);
|
|
||||||
else {
|
|
||||||
// Create struct member variable
|
|
||||||
Variable memberVar = getCurrentScope().addVariable(kind, varName, declVarType, defaultMemoryArea, currentDataSegment);
|
|
||||||
if(declIsArray) {
|
|
||||||
memberVar.setArraySpec(new ArraySpec(declArraySize));
|
|
||||||
}
|
|
||||||
// Add directives
|
|
||||||
directiveContext.applyDirectives(memberVar, false, declIsArray, declVarDirectives, statementSource);
|
|
||||||
// Add comments to constant
|
|
||||||
memberVar.setComments(ensureUnusedComments(declVarComments));
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(kind.equals(Variable.Kind.CONSTANT)) {
|
if(kind.equals(Variable.Kind.CONSTANT)) {
|
||||||
// Create a Constant
|
// Create a Constant
|
||||||
ConstantValue initConstantValue = getConstantValue(initializer, declVarType, statementSource);
|
ConstantValue initConstantValue = getConstantValue(initializer, declVarType, declVarStructMember, statementSource);
|
||||||
ArraySpec arraySpec = null;
|
ArraySpec arraySpec = null;
|
||||||
if(declIsArray) {
|
if(declIsArray) {
|
||||||
arraySpec = new ArraySpec(declArraySize);
|
arraySpec = new ArraySpec(declArraySize);
|
||||||
@ -606,19 +587,26 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
|||||||
Variable lValue = getCurrentScope().addVariable(kind, varName, declVarType, defaultMemoryArea, currentDataSegment);
|
Variable lValue = getCurrentScope().addVariable(kind, varName, declVarType, defaultMemoryArea, currentDataSegment);
|
||||||
// Add directives
|
// Add directives
|
||||||
directiveContext.applyDirectives(lValue, false, declIsArray, declVarDirectives, statementSource);
|
directiveContext.applyDirectives(lValue, false, declIsArray, declVarDirectives, statementSource);
|
||||||
if(declVarStructMember && initializer != null)
|
if(declVarStructMember) {
|
||||||
throw new CompileError("Initializer not supported inside structs " + declVarType.getTypeName(), statementSource);
|
if(initializer != null) {
|
||||||
RValue initValue;
|
throw new CompileError("Initializer not supported inside structs " + declVarType.getTypeName(), statementSource);
|
||||||
if(initializer != null) {
|
} else {
|
||||||
PrePostModifierHandler.addPreModifiers(this, initializer, statementSource);
|
// Struct members have no initializers
|
||||||
initValue = (RValue) visit(initializer);
|
return null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
initValue = createZeroValue(declVarType, statementSource);
|
RValue initValue;
|
||||||
}
|
if(initializer != null) {
|
||||||
Statement initStmt = new StatementAssignment(lValue.getVariableRef(), initValue, statementSource, ensureUnusedComments(declVarComments));
|
PrePostModifierHandler.addPreModifiers(this, initializer, statementSource);
|
||||||
sequence.addStatement(initStmt);
|
initValue = (RValue) visit(initializer);
|
||||||
if(initializer != null) {
|
} else {
|
||||||
PrePostModifierHandler.addPostModifiers(this, initializer, statementSource);
|
initValue = createZeroValue(declVarType, statementSource);
|
||||||
|
}
|
||||||
|
Statement initStmt = new StatementAssignment(lValue.getVariableRef(), initValue, statementSource, ensureUnusedComments(declVarComments));
|
||||||
|
sequence.addStatement(initStmt);
|
||||||
|
if(initializer != null) {
|
||||||
|
PrePostModifierHandler.addPostModifiers(this, initializer, statementSource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -636,10 +624,22 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
|||||||
* @return The constant value.
|
* @return The constant value.
|
||||||
* @throws CompileError if the initializer does not resolve to a constant value
|
* @throws CompileError if the initializer does not resolve to a constant value
|
||||||
*/
|
*/
|
||||||
private ConstantValue getConstantValue(KickCParser.ExprContext initializer, SymbolType type, StatementSource statementSource) {
|
private ConstantValue getConstantValue(KickCParser.ExprContext initializer, SymbolType type, boolean isStructMember, StatementSource statementSource) {
|
||||||
if(initializer != null && PrePostModifierHandler.hasPrePostModifiers(this, initializer, statementSource)) {
|
if(initializer != null && PrePostModifierHandler.hasPrePostModifiers(this, initializer, statementSource)) {
|
||||||
throw new CompileError("Constant value contains a pre/post-modifier.", statementSource);
|
throw new CompileError("Constant value contains a pre/post-modifier.", statementSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if(isStructMember) {
|
||||||
|
if(initializer != null) {
|
||||||
|
throw new CompileError("Initializer not supported inside structs " + declVarType.getTypeName(), statementSource);
|
||||||
|
} else {
|
||||||
|
// Struct members have no initializers
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
RValue initValue;
|
RValue initValue;
|
||||||
if(initializer == null) {
|
if(initializer == null) {
|
||||||
if(declIsArray) {
|
if(declIsArray) {
|
||||||
|
@ -206,7 +206,7 @@ public class Pass1UnwindStructValues extends Pass1Base {
|
|||||||
// Not inside another struct
|
// Not inside another struct
|
||||||
StructDefinition structDefinition = ((SymbolTypeStruct) variable.getType()).getStructDefinition(getProgram().getScope());
|
StructDefinition structDefinition = ((SymbolTypeStruct) variable.getType()).getStructDefinition(getProgram().getScope());
|
||||||
StructUnwinding.VariableUnwinding variableUnwinding = structUnwinding.createVariableUnwinding(variable.getRef());
|
StructUnwinding.VariableUnwinding variableUnwinding = structUnwinding.createVariableUnwinding(variable.getRef());
|
||||||
for(Variable member : structDefinition.getAllVariables(false)) {
|
for(Variable member : structDefinition.getAllVars(false)) {
|
||||||
String name = variable.getLocalName() + "_" + member.getLocalName();
|
String name = variable.getLocalName() + "_" + member.getLocalName();
|
||||||
Variable.MemoryArea memoryArea = (member.getType() instanceof SymbolTypePointer)?Variable.MemoryArea.ZEROPAGE_MEMORY:variable.getMemoryArea();
|
Variable.MemoryArea memoryArea = (member.getType() instanceof SymbolTypePointer)?Variable.MemoryArea.ZEROPAGE_MEMORY:variable.getMemoryArea();
|
||||||
Variable memberVariable = scope.add(new Variable( false, name, scope, member.getType(), variable.getKind(), memoryArea, variable.getDataSegment()));
|
Variable memberVariable = scope.add(new Variable( false, name, scope, member.getType(), variable.getKind(), memoryArea, variable.getDataSegment()));
|
||||||
|
@ -56,7 +56,7 @@ public class Pass2ArrayInStructInlining extends Pass2SsaOptimization {
|
|||||||
Value value = programValue.get();
|
Value value = programValue.get();
|
||||||
if(programValue instanceof ProgramValue.ProgramValueConstantStructMember) {
|
if(programValue instanceof ProgramValue.ProgramValueConstantStructMember) {
|
||||||
SymbolVariableRef memberRef = ((ProgramValue.ProgramValueConstantStructMember) programValue).getMemberRef();
|
SymbolVariableRef memberRef = ((ProgramValue.ProgramValueConstantStructMember) programValue).getMemberRef();
|
||||||
Variable structMemberVar = getScope().getVariable(memberRef);
|
Variable structMemberVar = getScope().getVar(memberRef);
|
||||||
if(structMemberVar.isArray() && structMemberVar.getArraySpec().getArraySize() != null) {
|
if(structMemberVar.isArray() && structMemberVar.getArraySpec().getArraySize() != null) {
|
||||||
if(value instanceof ConstantValue) {
|
if(value instanceof ConstantValue) {
|
||||||
ConstantValue constantValue = (ConstantValue) value;
|
ConstantValue constantValue = (ConstantValue) value;
|
||||||
|
@ -98,7 +98,7 @@ public class Pass2ConstantInitializerValueLists extends Pass2SsaOptimization {
|
|||||||
// Check that type of constant values match the struct member types
|
// Check that type of constant values match the struct member types
|
||||||
SymbolTypeStruct declaredStructType = (SymbolTypeStruct) declaredType;
|
SymbolTypeStruct declaredStructType = (SymbolTypeStruct) declaredType;
|
||||||
StructDefinition structDefinition = declaredStructType.getStructDefinition(program.getScope());
|
StructDefinition structDefinition = declaredStructType.getStructDefinition(program.getScope());
|
||||||
Collection<Variable> memberDefs = structDefinition.getAllVariables(false);
|
Collection<Variable> memberDefs = structDefinition.getAllVars(false);
|
||||||
if(memberDefs.size()!=constantValues.size()) {
|
if(memberDefs.size()!=constantValues.size()) {
|
||||||
throw new CompileError(
|
throw new CompileError(
|
||||||
"Struct initializer has wrong size ("+valueList.getList().size()+"), " +
|
"Struct initializer has wrong size ("+valueList.getList().size()+"), " +
|
||||||
|
@ -572,7 +572,7 @@ public class Pass4CodeGeneration {
|
|||||||
ConstantStructValue structValue = (ConstantStructValue) value;
|
ConstantStructValue structValue = (ConstantStructValue) value;
|
||||||
for(SymbolVariableRef memberRef : structValue.getMembers()) {
|
for(SymbolVariableRef memberRef : structValue.getMembers()) {
|
||||||
ConstantValue memberValue = structValue.getValue(memberRef);
|
ConstantValue memberValue = structValue.getValue(memberRef);
|
||||||
Variable memberVariable = getScope().getVariable(memberRef);
|
Variable memberVariable = getScope().getVar(memberRef);
|
||||||
addChunkData(dataChunk, memberValue, memberVariable.getType(), memberVariable.getArraySpec(), scopeRef);
|
addChunkData(dataChunk, memberValue, memberVariable.getType(), memberVariable.getArraySpec(), scopeRef);
|
||||||
}
|
}
|
||||||
} else if(valueType instanceof SymbolTypePointer && valueArraySpec!=null) {
|
} else if(valueType instanceof SymbolTypePointer && valueArraySpec!=null) {
|
||||||
|
@ -80,7 +80,7 @@ public class PassNAddInitializerValueListTypeCasts extends Pass2SsaOptimization
|
|||||||
SymbolTypeStruct declaredStructType = (SymbolTypeStruct) declaredType;
|
SymbolTypeStruct declaredStructType = (SymbolTypeStruct) declaredType;
|
||||||
// Recursively cast all sub-elements
|
// Recursively cast all sub-elements
|
||||||
StructDefinition structDefinition = declaredStructType.getStructDefinition(program.getScope());
|
StructDefinition structDefinition = declaredStructType.getStructDefinition(program.getScope());
|
||||||
Collection<Variable> memberDefinitions = structDefinition.getAllVariables(false);
|
Collection<Variable> memberDefinitions = structDefinition.getAllVars(false);
|
||||||
int size = memberDefinitions.size();
|
int size = memberDefinitions.size();
|
||||||
if(size!=valueList.getList().size()) {
|
if(size!=valueList.getList().size()) {
|
||||||
throw new CompileError(
|
throw new CompileError(
|
||||||
|
@ -141,7 +141,7 @@ public class PassNEliminateUnusedVars extends Pass2SsaOptimization {
|
|||||||
|
|
||||||
Collection<Variable> allConstants = getScope().getAllConstants(true);
|
Collection<Variable> allConstants = getScope().getAllConstants(true);
|
||||||
for(Variable constant : allConstants) {
|
for(Variable constant : allConstants) {
|
||||||
if(!(constant.getScope() instanceof EnumDefinition)) {
|
if(!(constant.getScope() instanceof EnumDefinition) && !(constant.getScope() instanceof StructDefinition)) {
|
||||||
if(referenceInfos.isUnused(constant.getRef())) {
|
if(referenceInfos.isUnused(constant.getRef())) {
|
||||||
if(constant.isDeclaredExport()) {
|
if(constant.isDeclaredExport()) {
|
||||||
// Do not eliminate constants declared as export
|
// Do not eliminate constants declared as export
|
||||||
|
@ -68,7 +68,7 @@ SYMBOL TABLE SSA
|
|||||||
(byte*) bar_thing3 loadstore
|
(byte*) bar_thing3 loadstore
|
||||||
(byte) foo::thing1
|
(byte) foo::thing1
|
||||||
(byte) foo::thing2
|
(byte) foo::thing2
|
||||||
(byte*) foo::thing3
|
(const byte*) foo::thing3 = { fill( $c, 0) }
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(bool~) main::$0
|
(bool~) main::$0
|
||||||
(byte*~) main::$1
|
(byte*~) main::$1
|
||||||
@ -206,7 +206,6 @@ VARIABLE REGISTER WEIGHTS
|
|||||||
(byte*) bar_thing3 loadstore 20.0
|
(byte*) bar_thing3 loadstore 20.0
|
||||||
(byte) foo::thing1
|
(byte) foo::thing1
|
||||||
(byte) foo::thing2
|
(byte) foo::thing2
|
||||||
(byte*) foo::thing3
|
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(byte) main::i
|
(byte) main::i
|
||||||
(byte) main::i#3 7.333333333333333
|
(byte) main::i#3 7.333333333333333
|
||||||
@ -475,7 +474,7 @@ FINAL SYMBOL TABLE
|
|||||||
(byte*) bar_thing3 loadstore zp[2]:2 20.0
|
(byte*) bar_thing3 loadstore zp[2]:2 20.0
|
||||||
(byte) foo::thing1
|
(byte) foo::thing1
|
||||||
(byte) foo::thing2
|
(byte) foo::thing2
|
||||||
(byte*) foo::thing3
|
(const byte*) foo::thing3 = { fill( $c, 0) }
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@1
|
(label) main::@1
|
||||||
(label) main::@return
|
(label) main::@return
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
(byte*) bar_thing3 loadstore zp[2]:2 20.0
|
(byte*) bar_thing3 loadstore zp[2]:2 20.0
|
||||||
(byte) foo::thing1
|
(byte) foo::thing1
|
||||||
(byte) foo::thing2
|
(byte) foo::thing2
|
||||||
(byte*) foo::thing3
|
(const byte*) foo::thing3 = { fill( $c, 0) }
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@1
|
(label) main::@1
|
||||||
(label) main::@return
|
(label) main::@return
|
||||||
|
@ -465,7 +465,7 @@ SYMBOL TABLE SSA
|
|||||||
(const byte) HEXADECIMAL = (number) $10
|
(const byte) HEXADECIMAL = (number) $10
|
||||||
(const byte) OCTAL = (number) 8
|
(const byte) OCTAL = (number) 8
|
||||||
(dword) Person::id
|
(dword) Person::id
|
||||||
(byte*) Person::initials
|
(const byte*) Person::initials = { fill( 3, 0) }
|
||||||
(const byte) RADIX::BINARY = (number) 2
|
(const byte) RADIX::BINARY = (number) 2
|
||||||
(const byte) RADIX::DECIMAL = (number) $a
|
(const byte) RADIX::DECIMAL = (number) $a
|
||||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||||
@ -1320,7 +1320,6 @@ ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1
|
|||||||
|
|
||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(dword) Person::id
|
(dword) Person::id
|
||||||
(byte*) Person::initials
|
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(void()) print_char((byte) print_char::ch)
|
(void()) print_char((byte) print_char::ch)
|
||||||
(byte) print_char::ch
|
(byte) print_char::ch
|
||||||
@ -2699,7 +2698,7 @@ FINAL SYMBOL TABLE
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
||||||
(dword) Person::id
|
(dword) Person::id
|
||||||
(byte*) Person::initials
|
(const byte*) Person::initials = { fill( 3, 0) }
|
||||||
(const byte) RADIX::BINARY = (number) 2
|
(const byte) RADIX::BINARY = (number) 2
|
||||||
(const byte) RADIX::DECIMAL = (number) $a
|
(const byte) RADIX::DECIMAL = (number) $a
|
||||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
||||||
(dword) Person::id
|
(dword) Person::id
|
||||||
(byte*) Person::initials
|
(const byte*) Person::initials = { fill( 3, 0) }
|
||||||
(const byte) RADIX::BINARY = (number) 2
|
(const byte) RADIX::BINARY = (number) 2
|
||||||
(const byte) RADIX::DECIMAL = (number) $a
|
(const byte) RADIX::DECIMAL = (number) $a
|
||||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||||
|
@ -122,7 +122,7 @@ SYMBOL TABLE SSA
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $40, 0) }
|
||||||
(const byte*) SCREEN = (byte*)(number) $400
|
(const byte*) SCREEN = (byte*)(number) $400
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#0
|
(byte) idx#0
|
||||||
@ -346,7 +346,6 @@ print_person::@2: scope:[print_person] from print_person::@1
|
|||||||
|
|
||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 3.0
|
(byte) idx#13 3.0
|
||||||
(byte) idx#14 9.75
|
(byte) idx#14 9.75
|
||||||
@ -749,7 +748,7 @@ FINAL SYMBOL TABLE
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $40, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 reg byte y 3.0
|
(byte) idx#13 reg byte y 3.0
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $40, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 reg byte y 3.0
|
(byte) idx#13 reg byte y 3.0
|
||||||
|
@ -85,7 +85,7 @@ SYMBOL TABLE SSA
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_ID = (byte) 0
|
(const byte) OFFSET_STRUCT_PERSON_ID = (byte) 0
|
||||||
(const byte) OFFSET_STRUCT_PERSON_INITIALS = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_INITIALS = (byte) 1
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::initials
|
(const byte*) Person::initials = { fill( 4, 0) }
|
||||||
(const byte*) SCREEN = (byte*)(number) $400
|
(const byte*) SCREEN = (byte*)(number) $400
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) 5
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) 5
|
||||||
(byte) idx
|
(byte) idx
|
||||||
@ -270,7 +270,6 @@ print_person::@return: scope:[print_person] from print_person
|
|||||||
|
|
||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::initials
|
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#10 1.0
|
(byte) idx#10 1.0
|
||||||
(byte) idx#15 2.0
|
(byte) idx#15 2.0
|
||||||
@ -706,7 +705,7 @@ FINAL SYMBOL TABLE
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte) OFFSET_STRUCT_PERSON_INITIALS = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_INITIALS = (byte) 1
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::initials
|
(const byte*) Person::initials = { fill( 4, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) 5
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) 5
|
||||||
(byte) idx
|
(byte) idx
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte) OFFSET_STRUCT_PERSON_INITIALS = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_INITIALS = (byte) 1
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::initials
|
(const byte*) Person::initials = { fill( 4, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) 5
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) 5
|
||||||
(byte) idx
|
(byte) idx
|
||||||
|
@ -96,7 +96,7 @@ SYMBOL TABLE SSA
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_ID = (byte) 0
|
(const byte) OFFSET_STRUCT_PERSON_ID = (byte) 0
|
||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $10, 0) }
|
||||||
(const byte*) SCREEN = (byte*)(number) $400
|
(const byte*) SCREEN = (byte*)(number) $400
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $11
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $11
|
||||||
(byte) idx
|
(byte) idx
|
||||||
@ -292,7 +292,6 @@ print_person::@2: scope:[print_person] from print_person::@1
|
|||||||
|
|
||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 3.0
|
(byte) idx#13 3.0
|
||||||
(byte) idx#14 6.5
|
(byte) idx#14 6.5
|
||||||
@ -729,7 +728,7 @@ FINAL SYMBOL TABLE
|
|||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $10, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $11
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $11
|
||||||
(byte) idx
|
(byte) idx
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $10, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $11
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $11
|
||||||
(byte) idx
|
(byte) idx
|
||||||
|
@ -69,7 +69,7 @@ SYMBOL TABLE SSA
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $d, 0) }
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(number~) main::$0
|
(number~) main::$0
|
||||||
@ -294,7 +294,6 @@ main::@return: scope:[main] from main
|
|||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(struct Person*) main::person
|
(struct Person*) main::person
|
||||||
|
|
||||||
@ -480,7 +479,7 @@ FINAL SYMBOL TABLE
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $d, 0) }
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@return
|
(label) main::@return
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $d, 0) }
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@return
|
(label) main::@return
|
||||||
|
@ -35,7 +35,7 @@ SYMBOL TABLE SSA
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $d, 0) }
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(byte*~) main::$0
|
(byte*~) main::$0
|
||||||
@ -132,7 +132,6 @@ main::@return: scope:[main] from main
|
|||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(struct Person*) main::person
|
(struct Person*) main::person
|
||||||
|
|
||||||
@ -283,7 +282,7 @@ FINAL SYMBOL TABLE
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $d, 0) }
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@return
|
(label) main::@return
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
(const byte) OFFSET_STRUCT_PERSON_NAME = (byte) 1
|
||||||
(word) Person::age
|
(word) Person::age
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $d, 0) }
|
||||||
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
(const byte) SIZEOF_STRUCT_PERSON = (byte) $10
|
||||||
(void()) main()
|
(void()) main()
|
||||||
(label) main::@return
|
(label) main::@return
|
||||||
|
@ -114,7 +114,7 @@ SYMBOL TABLE SSA
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $10, 0) }
|
||||||
(const byte*) SCREEN = (byte*)(number) $400
|
(const byte*) SCREEN = (byte*)(number) $400
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#0
|
(byte) idx#0
|
||||||
@ -304,7 +304,6 @@ print_person::@2: scope:[print_person] from print_person::@1
|
|||||||
|
|
||||||
VARIABLE REGISTER WEIGHTS
|
VARIABLE REGISTER WEIGHTS
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 3.0
|
(byte) idx#13 3.0
|
||||||
(byte) idx#14 9.75
|
(byte) idx#14 9.75
|
||||||
@ -701,7 +700,7 @@ FINAL SYMBOL TABLE
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $10, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 reg byte y 3.0
|
(byte) idx#13 reg byte y 3.0
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
(label) @end
|
(label) @end
|
||||||
(const byte*) DIGIT = (string) "0123456789"
|
(const byte*) DIGIT = (string) "0123456789"
|
||||||
(byte) Person::id
|
(byte) Person::id
|
||||||
(byte*) Person::name
|
(const byte*) Person::name = { fill( $10, 0) }
|
||||||
(const byte*) SCREEN = (byte*) 1024
|
(const byte*) SCREEN = (byte*) 1024
|
||||||
(byte) idx
|
(byte) idx
|
||||||
(byte) idx#13 reg byte y 3.0
|
(byte) idx#13 reg byte y 3.0
|
||||||
|
Loading…
Reference in New Issue
Block a user