public void DereferenceToRegister( Register target, CodeGen codeGen, ILinkingInfo fixer, GenericBrotherAction brotherAction, GenericFromDrefAction drefAction, GenericFromDref2Action dref2Action, GenericFromDref3Action dref3Action, GenericFromDref4Action dref4Action ) { switch (Kind) { case ResultKind.Value: DereferenceToRegister(target, brotherAction); return; case ResultKind.Pointer: DereferenceToRegister(target, drefAction); return; case ResultKind.Pointer2: DereferenceToRegister(target, dref2Action); return; case ResultKind.Pointer3: DereferenceToRegister(target, dref3Action); return; case ResultKind.Offset: DereferenceToRegister(target, codeGen, dref4Action, fixer); return; default: throw new NotImplementedException($"{nameof(ExpressionResult)}: {nameof(GenerateMoveTo)} has not implemented kind: {Kind}"); } }
private void DereferenceToRegister(Register target, CodeGen codeGen, GenericFromDref4Action action, ILinkingInfo fixer) { action(target, Offset); OffsetFixup(fixer, codeGen); }