Skip to content

Commit

Permalink
chore: remove stubbed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jan 24, 2024
1 parent 2b38bdf commit d9fe24b
Show file tree
Hide file tree
Showing 43 changed files with 35 additions and 186 deletions.
25 changes: 12 additions & 13 deletions yarn-project/acir-simulator/src/avm/avm_execution_environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,30 @@ import { Fr } from '@aztec/foundation/fields';
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/3992): gas not implemented
export class AvmExecutionEnvironment {
constructor(
/** - */
public readonly address: AztecAddress,
/** - */

public readonly storageAddress: AztecAddress,
/** - */

public readonly origin: AztecAddress,
/** - */

public readonly sender: AztecAddress,
/** - */

public readonly portal: EthAddress,
/** - */

public readonly feePerL1Gas: Fr,
/** - */

public readonly feePerL2Gas: Fr,
/** - */

public readonly feePerDaGas: Fr,
/** - */

public readonly contractCallDepth: Fr,
/** - */

public readonly globals: GlobalVariables,
/** - */

public readonly isStaticCall: boolean,
/** - */

public readonly isDelegateCall: boolean,
/** - */

public readonly calldata: Fr[],
) {}

Expand Down
6 changes: 2 additions & 4 deletions yarn-project/acir-simulator/src/avm/avm_machine_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AvmMachineState {
private returnData: Fr[];

// TODO: implement tagged memory
/** - */

public memory: Fr[];

/**
Expand All @@ -24,9 +24,8 @@ export class AvmMachineState {
*/
public internalCallStack: number[];

/** - */
public pc: number;
/** - */

public callStack: number[];

/**
Expand Down Expand Up @@ -60,7 +59,6 @@ export class AvmMachineState {
Object.freeze(returnData);
}

/** - */
public getReturnData(): Fr[] {
return this.returnData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { Fr } from '@aztec/foundation/fields';
* AVM message call result.
*/
export class AvmMessageCallResult {
/** - */
public readonly reverted: boolean;
/** - */

public readonly revertReason: Error | undefined;
/** .- */
public readonly output: Fr[];
Expand Down
25 changes: 12 additions & 13 deletions yarn-project/acir-simulator/src/avm/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,30 @@ import { AvmExecutionEnvironment } from '../avm_execution_environment.js';
* An interface that allows to override the default values of the AvmExecutionEnvironment
*/
export interface AvmExecutionEnvironmentOverrides {
/** - */
address?: AztecAddress;
/** - */

storageAddress?: AztecAddress;
/** - */

origin?: AztecAddress;
/** - */

sender?: AztecAddress;
/** - */

portal?: EthAddress;
/** - */

feePerL1Gas?: Fr;
/** - */

feePerL2Gas?: Fr;
/** - */

feePerDaGas?: Fr;
/** - */

contractCallDepth?: Fr;
/** - */

globals?: GlobalVariables;
/** - */

isStaticCall?: boolean;
/** - */

isDelegateCall?: boolean;
/** - */

calldata?: Fr[];
}

Expand Down
5 changes: 2 additions & 3 deletions yarn-project/acir-simulator/src/avm/journal/host_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import { CommitmentsDB, PublicContractsDB, PublicStateDB } from '../../index.js'
* A wrapper around the node dbs
*/
export class HostStorage {
/** - */
public readonly publicStateDb: PublicStateDB;
/** - */

public readonly contractsDb: PublicContractsDB;
/** - */

public readonly commitmentsDb: CommitmentsDB;

constructor(publicStateDb: PublicStateDB, contractsDb: PublicContractsDB, commitmentsDb: CommitmentsDB) {
Expand Down
5 changes: 2 additions & 3 deletions yarn-project/acir-simulator/src/avm/journal/journal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { HostStorage } from './host_storage.js';
* Data held within the journal
*/
export type JournalData = {
/** - */
newCommitments: Fr[];
/** - */

newL1Messages: Fr[];
/** - */

newNullifiers: Fr[];
/** contract address -\> key -\> value */
storageWrites: Map<bigint, Map<bigint, Fr>>;
Expand Down
Empty file.
4 changes: 0 additions & 4 deletions yarn-project/acir-simulator/src/avm/opcodes/arithmetic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AvmMachineState } from '../avm_machine_state.js';
import { AvmJournal } from '../journal/index.js';
import { Instruction } from './instruction.js';

/** -*/
export class Add extends Instruction {
static type: string = 'ADD';
static numberOfOperands = 3;
Expand All @@ -24,7 +23,6 @@ export class Add extends Instruction {
}
}

/** -*/
export class Sub extends Instruction {
static type: string = 'SUB';
static numberOfOperands = 3;
Expand All @@ -44,7 +42,6 @@ export class Sub extends Instruction {
}
}

/** -*/
export class Mul extends Instruction {
static type: string = 'MUL';
static numberOfOperands = 3;
Expand All @@ -64,7 +61,6 @@ export class Mul extends Instruction {
}
}

/** -*/
export class Div extends Instruction {
static type: string = 'DIV';
static numberOfOperands = 3;
Expand Down
6 changes: 0 additions & 6 deletions yarn-project/acir-simulator/src/avm/opcodes/bitwise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AvmMachineState } from '../avm_machine_state.js';
import { AvmJournal } from '../journal/index.js';
import { Instruction } from './instruction.js';

/** - */
export class And extends Instruction {
static type: string = 'AND';
static numberOfOperands = 3;
Expand All @@ -24,7 +23,6 @@ export class And extends Instruction {
}
}

/** - */
export class Or extends Instruction {
static type: string = 'OR';
static numberOfOperands = 3;
Expand All @@ -44,7 +42,6 @@ export class Or extends Instruction {
}
}

/** - */
export class Xor extends Instruction {
static type: string = 'XOR';
static numberOfOperands = 3;
Expand All @@ -64,7 +61,6 @@ export class Xor extends Instruction {
}
}

/** - */
export class Not extends Instruction {
static type: string = 'NOT';
static numberOfOperands = 2;
Expand All @@ -87,7 +83,6 @@ export class Not extends Instruction {
}
}

/** -*/
export class Shl extends Instruction {
static type: string = 'SHL';
static numberOfOperands = 3;
Expand All @@ -107,7 +102,6 @@ export class Shl extends Instruction {
}
}

/** -*/
export class Shr extends Instruction {
static type: string = 'SHR';
static numberOfOperands = 3;
Expand Down
4 changes: 1 addition & 3 deletions yarn-project/acir-simulator/src/avm/opcodes/comparators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AvmMachineState } from '../avm_machine_state.js';
import { AvmJournal } from '../journal/index.js';
import { Instruction } from './instruction.js';

/** -*/
export class Eq extends Instruction {
static type: string = 'EQ';
static numberOfOperands = 3;
Expand All @@ -23,7 +22,7 @@ export class Eq extends Instruction {
this.incrementPc(machineState);
}
}
/** -*/

export class Lt extends Instruction {
static type: string = 'Lt';
static numberOfOperands = 3;
Expand All @@ -43,7 +42,6 @@ export class Lt extends Instruction {
}
}

/** -*/
export class Lte extends Instruction {
static type: string = 'LTE';
static numberOfOperands = 3;
Expand Down
5 changes: 0 additions & 5 deletions yarn-project/acir-simulator/src/avm/opcodes/control_flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { AvmMachineState } from '../avm_machine_state.js';
import { AvmJournal } from '../journal/index.js';
import { Instruction } from './instruction.js';

/** - */
export class Return extends Instruction {
static type: string = 'RETURN';
static numberOfOperands = 2;
Expand All @@ -19,7 +18,6 @@ export class Return extends Instruction {
}
}

/** -*/
export class Jump extends Instruction {
static type: string = 'JUMP';
static numberOfOperands = 1;
Expand All @@ -33,7 +31,6 @@ export class Jump extends Instruction {
}
}

/** -*/
export class JumpI extends Instruction {
static type: string = 'JUMPI';
static numberOfOperands = 1;
Expand All @@ -53,7 +50,6 @@ export class JumpI extends Instruction {
}
}

/** -*/
export class InternalCall extends Instruction {
static type: string = 'INTERNALCALL';
static numberOfOperands = 1;
Expand All @@ -68,7 +64,6 @@ export class InternalCall extends Instruction {
}
}

/** -*/
export class InternalReturn extends Instruction {
static type: string = 'INTERNALRETURN';
static numberOfOperands = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import { Opcode } from './opcodes.js';
//import { Eq, Lt, Lte } from './comparators.js';
import { SLoad, SStore } from './storage.js';

/** - */
type InstructionConstructor = new (...args: any[]) => Instruction;
/** - */

type InstructionConstructorAndMembers = InstructionConstructor & {
/** - */
numberOfOperands: number;
};

Expand Down
6 changes: 1 addition & 5 deletions yarn-project/acir-simulator/src/avm/opcodes/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AvmMachineState } from '../avm_machine_state.js';
import { AvmJournal } from '../journal/index.js';
import { Instruction } from './instruction.js';

/** - */
export class Set extends Instruction {
static type: string = 'SET';
static numberOfOperands = 2;
Expand All @@ -21,7 +20,7 @@ export class Set extends Instruction {
}

// TODO(https://github.com/AztecProtocol/aztec-packages/issues/3987): tags are not implemented yet - this will behave as a mov
/** - */

export class Cast extends Instruction {
static type: string = 'CAST';
static numberOfOperands = 2;
Expand All @@ -39,7 +38,6 @@ export class Cast extends Instruction {
}
}

/** - */
export class Mov extends Instruction {
static type: string = 'MOV';
static numberOfOperands = 2;
Expand All @@ -57,7 +55,6 @@ export class Mov extends Instruction {
}
}

/** - */
export class CMov extends Instruction {
static type: string = 'MOV';
static numberOfOperands = 4;
Expand All @@ -82,7 +79,6 @@ export class CMov extends Instruction {
}
}

/** - */
export class CalldataCopy extends Instruction {
static type: string = 'CALLDATACOPY';
static numberOfOperands = 3;
Expand Down
2 changes: 0 additions & 2 deletions yarn-project/acir-simulator/src/avm/opcodes/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { AvmInterpreterError } from '../interpreter/interpreter.js';
import { AvmJournal } from '../journal/journal.js';
import { Instruction } from './instruction.js';

/** - */
export class SStore extends Instruction {
static type: string = 'SSTORE';
static numberOfOperands = 2;
Expand All @@ -26,7 +25,6 @@ export class SStore extends Instruction {
}
}

/** - */
export class SLoad extends Instruction {
static type: string = 'SLOAD';
static numberOfOperands = 2;
Expand Down
Loading

0 comments on commit d9fe24b

Please sign in to comment.