Skip to content

Commit

Permalink
chore: fix some comments (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
tongjicoder authored Jul 23, 2024
1 parent 4ac5456 commit 13a2f14
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/assembler/assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func CasmToBytecode(code string) ([]*f.Element, error) {
return encodeInstructionListToBytecode(wordList)
}

// Given an a CASM ast it returns a list of instructions
// Given a CASM ast it returns a list of instructions
func astToInstruction(ast *CasmProgram) ([]Word, error) {
n := len(ast.InstructionList)
wordList := make([]Word, 0, n)
Expand Down
2 changes: 1 addition & 1 deletion pkg/hintrunner/zero/zerohint_math.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func createIsNNOutOfRangeHinter(resolver hintReferenceResolver) (hinter.Hinter,
//
// `newIsPositiveHint` takes 2 operanders as arguments
// - `value` is the value that will be evaluated
// - `dst` is the address where to write the result in memmory
// - `dst` is the address where to write the result in memory
//
// `newIsPositiveHint` writes 1 or 0 to `dest` address, depending on
// whether `value` is positive or negative in the context, respectively
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (memory *Memory) RelocationOffsets() ([]uint64, uint64) {

// segmentsOffsets[0] = 1
// segmentsOffsets[1] = 1 + len(segment[0])
// segmentsOffsets[N] = 1 + len(segment[n-1]) + sum of segements[n-1-i] for i in [1, n-1]
// segmentsOffsets[N] = 1 + len(segment[n-1]) + sum of segments[n-1-i] for i in [1, n-1]
segmentsOffsets := make([]uint64, uint64(len(memory.Segments))+1)
segmentsOffsets[0] = 1
for i, segment := range memory.Segments {
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/memory/memory_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (mv MemoryValue) String() string {
return mv.Felt.String()
}

// Retuns a MemoryValue holding a felt as uint if it fits
// Returns a MemoryValue holding a felt as uint if it fits
func (mv *MemoryValue) Uint64() (uint64, error) {
if mv.IsAddress() {
return 0, fmt.Errorf("cannot convert a memory address into uint64: %s", *mv)
Expand Down

0 comments on commit 13a2f14

Please sign in to comment.