-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
23 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
package rtda | ||
|
||
type Frame struct { | ||
lower *Frame | ||
localVars LocalVars | ||
lower *Frame | ||
localVars LocalVars | ||
operandStack *OperandStack | ||
} | ||
|
||
|
||
func NewFrame(maxLocals, maxStack uint) *Frame { | ||
return &Frame{ | ||
localVars: newLocalVars(maxLocals), | ||
operandStack:newOperandStack(maxStack), | ||
localVars: newLocalVars(maxLocals), | ||
operandStack: newOperandStack(maxStack), | ||
} | ||
} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ func newLocalVars(maxLocals uint) LocalVars { | |
|
||
return nil | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package rtda | ||
|
||
type OperandStack struct { | ||
size uint | ||
size uint | ||
slots []Slot | ||
} | ||
|
||
func newOperandStack(maxStack uint) *OperandStack { | ||
if maxStack > 0 { | ||
return &OperandStack{ | ||
slots:make([]Slot,maxStack), | ||
slots: make([]Slot, maxStack), | ||
} | ||
} | ||
return nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,3 @@ type Slot struct { | |
num int32 | ||
ref *Object | ||
} | ||
|
||
|