Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ArhanChaudhary/NAND
/ functions
Functions
253 in github.com/ArhanChaudhary/NAND
⨍
Functions
253
◇
Types & classes
66
↓ 151 callers
Function
nbit16
(n: u16, i: u8)
src/core/builtins/utils/bit_manipulation.rs:1
↓ 71 callers
Function
not
(a: bool)
src/core/gates.rs:4
↓ 57 callers
Method
token
()
src/compiler/tokenizer.ts:269
↓ 51 callers
Method
assertToken
( expectedToken: string | TokenType | (string | TokenType)[] )
src/compiler/engine.ts:179
↓ 29 callers
Method
syntaxError
( expectedToken: null | string | TokenType | (string | TokenType)[], info?: string, lineIndex?: nu
src/compiler/tokenizer.ts:71
↓ 27 callers
Function
NAND
(a: bool, b: bool)
src/core/builtins/hardware.rs:14
↓ 27 callers
Method
advance
()
src/compiler/tokenizer.ts:160
↓ 27 callers
Function
and
(a: bool, b: bool)
src/core/gates.rs:8
↓ 27 callers
Method
writePush
(segment: string, index: number | string)
src/compiler/vmwriter.ts:15
↓ 19 callers
Function
or
(a: bool, b: bool)
src/core/gates.rs:12
↓ 18 callers
Method
drawRectangle
(x1, y1, x2, y2)
src/example-programs/GeneticAlgorithm/util.js:134
↓ 17 callers
Method
setColor
(b)
src/example-programs/GeneticAlgorithm/util.js:140
↓ 17 callers
Method
write
(out: string)
src/compiler/vmwriter.ts:7
↓ 16 callers
Function
mux
(a: bool, b: bool, sel: bool)
src/core/gates.rs:16
↓ 16 callers
Function
placebit16
(b: bool, i: u8)
src/core/builtins/utils/bit_manipulation.rs:5
↓ 14 callers
Function
full_adder
(a: bool, b: bool, c: bool)
src/core/arithmetic.rs:19
↓ 14 callers
Method
indexOf
(name: string)
src/compiler/symboltable.ts:75
↓ 13 callers
Method
write
(out: string[])
src/vm/codewriter.ts:14
↓ 12 callers
Function
mux16
(a: u16, b: u16, sel: bool)
src/core/gates.rs:62
↓ 11 callers
Method
writeArithmetic
(command: SymbolToken, sub = true)
src/compiler/vmwriter.ts:49
↓ 10 callers
Method
addEntry
(symbol: string, address: number)
src/assembler/symboltable.ts:4
↓ 10 callers
Method
compileExpression
()
src/compiler/engine.ts:733
↓ 10 callers
Method
keyPressed
()
src/example-programs/GeneticAlgorithm/util.js:166
↓ 10 callers
Method
writePop
(segment: string, index: number)
src/compiler/vmwriter.ts:19
↓ 9 callers
Method
add
(a, b)
src/example-programs/GeneticAlgorithm/util.js:81
↓ 9 callers
Method
lineIndex
()
src/compiler/tokenizer.ts:283
↓ 9 callers
Method
tryWritePrecomputedConstant
( operation: (a: number, b: number) => number )
src/compiler/vmwriter.ts:23
↓ 9 callers
Method
validate
(callee, argumentsKwd)
src/example-programs/GeneticAlgorithm/util.js:58
↓ 8 callers
Method
arg1
()
src/vm/parser.ts:50
↓ 8 callers
Method
floodIndex
(i, leftIndex, rightIndex)
src/example-programs/GeneticAlgorithm/main.js:564
↓ 8 callers
Method
getGridIndex
(posX, posY)
src/example-programs/GeneticAlgorithm/main.js:710
↓ 8 callers
Method
referenceError
( message: string, line?: string, lineNumber?: number, lineIndex?: number )
src/compiler/tokenizer.ts:101
↓ 8 callers
Method
writeLabel
(label: string)
src/compiler/vmwriter.ts:158
↓ 7 callers
Method
getBrain
()
src/example-programs/GeneticAlgorithm/dot.js:89
↓ 7 callers
Method
getStep
()
src/example-programs/GeneticAlgorithm/brain.js:57
↓ 6 callers
Method
define
(type: string, kind: string)
src/compiler/engine.ts:149
↓ 6 callers
Method
floodIndexOutOfBounds
(originIndex, newIndex)
src/example-programs/GeneticAlgorithm/main.js:633
↓ 5 callers
Method
drawObstacle
(i)
src/example-programs/GeneticAlgorithm/main.js:659
↓ 5 callers
Method
line
()
src/compiler/tokenizer.ts:275
↓ 5 callers
Method
lineNumber
()
src/compiler/tokenizer.ts:279
↓ 5 callers
Method
toString
()
src/compiler/exceptions.ts:171
↓ 5 callers
Method
tokenType
()
src/compiler/tokenizer.ts:263
↓ 5 callers
Method
writeCall
(name: string, nArgs: number)
src/compiler/vmwriter.ts:170
↓ 4 callers
Method
arg2
()
src/vm/parser.ts:54
↓ 4 callers
Method
compileStatement
()
src/compiler/engine.ts:437
↓ 4 callers
Method
compileStatements
()
src/compiler/engine.ts:433
↓ 4 callers
Function
computer
(reset: bool)
src/core/architecture.rs:87
↓ 4 callers
Function
expectedTokenToString
(tokenTypeOrString: string | TokenType)
src/compiler/exceptions.ts:30
↓ 4 callers
Method
getDirections
()
src/example-programs/GeneticAlgorithm/brain.js:49
↓ 4 callers
Method
init
()
src/example-programs/GeneticAlgorithm/main.js:53
↓ 4 callers
Method
instantiate
()
src/example-programs/GeneticAlgorithm/dot.js:64
↓ 4 callers
Function
keyboard
(in_: u16, load: bool)
src/core/builtins/hardware.rs:63
↓ 4 callers
Method
kindOf
(name: string)
src/compiler/symboltable.ts:63
↓ 4 callers
Method
nameError
( expectedToken: string, message: string, lineIndex?: number )
src/compiler/tokenizer.ts:86
↓ 4 callers
Function
reset
()
src/core/architecture.rs:103
↓ 4 callers
Function
sbin16
(x)
src/os/helpers/pack_output_raster.py:5
↓ 4 callers
Method
setInitialDotOrGoalPosition
(setInitialDot)
src/example-programs/GeneticAlgorithm/main.js:169
↓ 4 callers
Function
tokenTypeToString
(tokenType: TokenType)
src/compiler/exceptions.ts:13
↓ 4 callers
Method
useInternalSubroutineCall
( subroutineClass: string, subroutineName: string )
src/compiler/engine.ts:118
↓ 4 callers
Method
validateVar
( token: string, line?: string, lineNumber?: number, lineIndex?: number )
src/compiler/engine.ts:156
↓ 4 callers
Function
word16_16
( a: bool, b: bool, c: bool, d: bool, e: bool, f: bool, g: bool, h: bool,
src/core/builtins/utils/bit_manipulation.rs:10
↓ 4 callers
Method
writeGoto
(label: string)
src/compiler/vmwriter.ts:162
↓ 3 callers
Function
a_register
(in_: u16, load: bool)
src/core/builtins/memory.rs:30
↓ 3 callers
Method
cleanup
()
src/compiler/engine.ts:945
↓ 3 callers
Method
clearScreen
()
src/example-programs/GeneticAlgorithm/util.js:162
↓ 3 callers
Method
compileArrayAccess
()
src/compiler/engine.ts:929
↓ 3 callers
Method
config
(brainSize, obstacles)
src/example-programs/GeneticAlgorithm/dot.js:38
↓ 3 callers
Method
count
(kind: string)
src/compiler/symboltable.ts:49
↓ 3 callers
Function
d_register
(in_: u16, load: bool)
src/core/builtins/memory.rs:18
↓ 3 callers
Method
drawGoal
()
src/example-programs/GeneticAlgorithm/main.js:642
↓ 3 callers
Method
drawObstacles
()
src/example-programs/GeneticAlgorithm/main.js:651
↓ 3 callers
Function
emit
()
src/core/builtins/kernel_worker/hardware_info.rs:109
↓ 3 callers
Method
getSymbol
(name: string)
src/compiler/symboltable.ts:53
↓ 3 callers
Method
isNumber
(char: string)
src/compiler/tokenizer.ts:120
↓ 3 callers
Function
memory
address[14] == 0 means select RAM address[13] == 0 means select Screen address[13] == 1 and address[14] == 1 means select Keyboard
src/core/architecture.rs:64
↓ 3 callers
Method
neg
(n)
src/example-programs/GeneticAlgorithm/util.js:71
↓ 3 callers
Function
not16
(a: u16)
src/core/gates.rs:20
↓ 3 callers
Function
post_worker_message
(rust: impl Serialize)
src/core/builtins/utils/js_api.rs:7
↓ 3 callers
Method
random
()
src/example-programs/GeneticAlgorithm/util.js:152
↓ 3 callers
Function
render
I've tried out two separate algorithms to render the screen; here's a benchmark between the two algorithms for my future reference. The current algor
src/core/builtins/hardware.rs:123
↓ 3 callers
Function
ticktock
()
src/core/architecture.rs:96
↓ 3 callers
Function
try_stop_emitting
()
src/core/builtins/kernel_worker/hardware_info.rs:95
↓ 3 callers
Function
try_stop_rendering
()
src/core/builtins/kernel_worker/screen.rs:45
↓ 2 callers
Function
add16
(a: u16, b: u16)
src/core/arithmetic.rs:29
↓ 2 callers
Method
advance
()
src/assembler/parser.ts:12
↓ 2 callers
Method
commandType
()
src/assembler/parser.ts:24
↓ 2 callers
Method
compileExpressionList
()
src/compiler/engine.ts:558
↓ 2 callers
Method
compileSubroutineCall
( prevToken: string, line: string, lineNumber: number, lineIndex: number )
src/compiler/engine.ts:490
↓ 2 callers
Method
compileTerm
()
src/compiler/engine.ts:787
↓ 2 callers
Function
emit_default
()
src/core/builtins/kernel_worker/hardware_info.rs:102
↓ 2 callers
Method
isLetter
(char: string)
src/compiler/tokenizer.ts:116
↓ 2 callers
Function
load_rom
(machine_code: Vec<u16>)
src/core/builtins/hardware.rs:51
↓ 2 callers
Method
parsed_machine_code
(&self)
src/core/builtins/kernel_worker.rs:204
↓ 2 callers
Method
precomputeFitnesses
()
src/example-programs/GeneticAlgorithm/main.js:472
↓ 2 callers
Method
refreshDisplay
()
src/example-programs/GeneticAlgorithm/main.js:690
↓ 2 callers
Function
request_animation_frame
(callback: &Function)
src/core/builtins/utils/js_api.rs:33
↓ 2 callers
Method
resetMinStep
()
src/example-programs/GeneticAlgorithm/dot.js:54
↓ 2 callers
Function
reset_clock_speed
()
src/core/builtins/kernel_worker/hardware_info.rs:88
↓ 2 callers
Method
setGoalPosition
(goalX, goalY)
src/example-programs/GeneticAlgorithm/dot.js:49
↓ 2 callers
Method
setInitialPosition
(initialX, initialY)
src/example-programs/GeneticAlgorithm/dot.js:44
next →
1–100 of 253, ranked by callers