Skip to content

Commit

Permalink
Rename ArchInfo to Architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
RealA10N committed Dec 2, 2024
1 parent 8a20bb0 commit 66d3dff
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gen/argument_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestUndefinedRegisterArgument(t *testing.T) {
node := parse.RegisterNode{UnmanagedSourceView: src.Unmanaged()}

ctx := gen.GenerationContext[Instruction]{
ArchInfo: gen.ArchInfo{PointerSize: 8},
Architecture: gen.ArchitectureInfo{PointerSize: 8},
SourceContext: src.Ctx(),
Types: &TypeMap{},
Registers: &RegisterMap{},
Expand Down
5 changes: 2 additions & 3 deletions gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"alon.kr/x/usm/core"
)

type ArchInfo struct {
type ArchitectureInfo struct {
PointerSize core.UsmUint // The size of a pointer in bytes.
}

Expand All @@ -16,9 +16,8 @@ type ArchInfo struct {
// with information as the code generation process continues, while iterating
// over the AST nodes.
type GenerationContext[InstT BaseInstruction] struct {
ArchInfo
core.SourceContext

Architecture ArchitectureInfo
Instructions InstructionManager[InstT]
Types TypeManager
Registers RegisterManager
Expand Down
2 changes: 1 addition & 1 deletion gen/instruction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestInstructionCreateTarget(t *testing.T) {
}

ctx := &gen.GenerationContext[Instruction]{
ArchInfo: gen.ArchInfo{PointerSize: 8},
Architecture: gen.ArchitectureInfo{PointerSize: 8},
SourceContext: src.Ctx(),
Types: &types,
Registers: &registers,
Expand Down
2 changes: 1 addition & 1 deletion gen/target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestTargetRegisterAlreadyDefined(t *testing.T) {
}

ctx := gen.GenerationContext[Instruction]{
ArchInfo: gen.ArchInfo{PointerSize: 8},
Architecture: gen.ArchitectureInfo{PointerSize: 8},
SourceContext: src.Ctx(),
Types: &types,
Registers: &registers,
Expand Down
2 changes: 1 addition & 1 deletion gen/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestPointerTypeDeclaration(t *testing.T) {

genCtx := gen.GenerationContext[gen.BaseInstruction]{
SourceContext: view.Ctx(),
ArchInfo: gen.ArchInfo{PointerSize: 1337},
Architecture: gen.ArchitectureInfo{PointerSize: 1337},
Types: &typeManager,
}

Expand Down

0 comments on commit 66d3dff

Please sign in to comment.