Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed Dec 22, 2023
1 parent d9b1ba9 commit 48055c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/codegen/astbuilder/handle_field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { GenDeclaration, ObjectProperty, Statement, TypedIdentifier } from "../g
import { firstLower, getSubStructName, goodVariableName } from "../utils";
import { getType } from "./handle_type";

export function handleField(somefield: TLBField | undefined, field: FieldDefinition, slicePrefix: Array<number>, tlbCode: TLBCode, constructor: TLBConstructor, constructorLoadStatements: Statement[], subStructStoreStatements: Statement[], subStructProperties: TypedIdentifier[], subStructLoadProperties: ObjectProperty[], variableCombinatorName: string, variableSubStructName: string, jsCodeFunctionsDeclarations: GenDeclaration[], fieldIndex: number) {
export function handleField(field: FieldDefinition, slicePrefix: Array<number>, tlbCode: TLBCode, constructor: TLBConstructor, constructorLoadStatements: Statement[], subStructStoreStatements: Statement[], subStructProperties: TypedIdentifier[], subStructLoadProperties: ObjectProperty[], variableCombinatorName: string, variableSubStructName: string, jsCodeFunctionsDeclarations: GenDeclaration[], fieldIndex: number) {
// let currentSlice = getCurrentSlice(slicePrefix, 'slice');
// let currentCell = getCurrentSlice(slicePrefix, 'cell');

Expand Down Expand Up @@ -66,7 +66,7 @@ export function handleField(somefield: TLBField | undefined, field: FieldDefinit
// slicePrefix.push(0)
// constructorLoadStatements.push(sliceLoad(slicePrefix, currentSlice))
// subStructStoreStatements.push(tExpressionStatement(tDeclareVariable(tIdentifier(getCurrentSlice(slicePrefix, 'cell')), tFunctionCall(tIdentifier('beginCell'), []))))
handleField(somefield, new FieldNamedDef(fieldName, field.expr.expr), slicePrefix, tlbCode, constructor, constructorLoadStatements, subStructStoreStatements, subStructProperties, subStructLoadProperties, variableCombinatorName, variableSubStructName, jsCodeFunctionsDeclarations, fieldIndex)
handleField(new FieldNamedDef(fieldName, field.expr.expr), slicePrefix, tlbCode, constructor, constructorLoadStatements, subStructStoreStatements, subStructProperties, subStructLoadProperties, variableCombinatorName, variableSubStructName, jsCodeFunctionsDeclarations, fieldIndex)
// subStructStoreStatements.push(tExpressionStatement(tFunctionCall(tMemberExpression(tIdentifier(currentCell), tIdentifier('storeRef')), [tIdentifier(getCurrentSlice(slicePrefix, 'cell'))])))
// slicePrefix.pop();
}
Expand Down Expand Up @@ -112,7 +112,7 @@ export function fillFields(tlbCode: TLBCode) {

constructor.declaration.fields.forEach(field => {
fieldIndex++;
handleField(undefined, field, slicePrefix, tlbCode, constructor, [], [], [], [], variableCombinatorName, variableSubStructName, [], fieldIndex)
handleField(field, slicePrefix, tlbCode, constructor, [], [], [], [], variableCombinatorName, variableSubStructName, [], fieldIndex)
})
})
})
Expand Down

0 comments on commit 48055c2

Please sign in to comment.