Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitwise 'Name' method in docs returns correct name #319

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,7 @@ func (b *BitwiseBuiltinRunner) Base() memory.Relocatable {
}

func (b *BitwiseBuiltinRunner) Name() string {
return "range_check"
return "bitwise"
}
```

Expand Down Expand Up @@ -2913,7 +2913,7 @@ const BIWISE_INPUT_CELLS_PER_INSTANCE = 2

func (b *BitwiseBuiltinRunner) DeduceMemoryCell(address memory.Relocatable, mem *memory.Memory) (*memory.MaybeRelocatable, error) {
index := address.Offset % BITWISE_CELLS_PER_INSTANCE
if index < BIWISE_INPUT_CELLS_PER_INSTANCE {
if index < BITWISE_INPUT_CELLS_PER_INSTANCE {
return nil, nil
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/builtins/bitwise.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
const BITWISE_BUILTIN_NAME = "bitwise"
const BITWISE_CELLS_PER_INSTANCE = 5
const BITWISE_TOTAL_N_BITS = 251
const BIWISE_INPUT_CELLS_PER_INSTANCE = 2
const BITWISE_INPUT_CELLS_PER_INSTANCE = 2

type BitwiseBuiltinRunner struct {
base memory.Relocatable
Expand Down Expand Up @@ -60,7 +60,7 @@ func (b *BitwiseBuiltinRunner) InitialStack() []memory.MaybeRelocatable {

func (b *BitwiseBuiltinRunner) DeduceMemoryCell(address memory.Relocatable, mem *memory.Memory) (*memory.MaybeRelocatable, error) {
index := address.Offset % BITWISE_CELLS_PER_INSTANCE
if index < BIWISE_INPUT_CELLS_PER_INSTANCE {
if index < BITWISE_INPUT_CELLS_PER_INSTANCE {
entropidelic marked this conversation as resolved.
Show resolved Hide resolved
return nil, nil
}

Expand Down Expand Up @@ -112,7 +112,7 @@ func (b *BitwiseBuiltinRunner) CellsPerInstance() uint {
}

func (b *BitwiseBuiltinRunner) InputCellsPerInstance() uint {
return BIWISE_INPUT_CELLS_PER_INSTANCE
return BITWISE_INPUT_CELLS_PER_INSTANCE
}

func (b *BitwiseBuiltinRunner) GetAllocatedMemoryUnits(segments *memory.MemorySegmentManager, currentStep uint) (uint, error) {
Expand Down
Loading