Documentation
¶
Overview ¶
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Copyright Consensys Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-License-Identifier: Apache-2.0
Index ¶
- func String[S symbol.Symbol[S]](e Expr[S], mapping variable.Map[S]) string
- func Uses[S symbol.Symbol[S]](exprs ...Expr[S]) []variable.Id
- type Add
- type ArrayAccess
- type BitwiseAnd
- type BitwiseNot
- type BitwiseOr
- type Cast
- type Cmp
- type CmpOp
- type Concat
- type Condition
- type Const
- func (p *Const[S]) Base() uint
- func (p *Const[S]) Constant() *big.Int
- func (p *Const[S]) ExternUses() set.AnySortedSet[S]
- func (p *Const[S]) LocalUses() bit.Set
- func (p *Const[S]) SetType(t data.Type[S])
- func (p *Const[S]) String(mapping variable.Map[S]) string
- func (p *Const[S]) Type() data.Type[S]
- type Div
- type Expr
- func NewAdd[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewArrayAccess[S symbol.Symbol[S]](id variable.Id, arg Expr[S]) Expr[S]
- func NewBitwiseAnd[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewBitwiseNot[S symbol.Symbol[S]](e Expr[S]) Expr[S]
- func NewBitwiseOr[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewCast[S symbol.Symbol[S]](e Expr[S], castType data.Type[S]) Expr[S]
- func NewConcat[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewDiv[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewExternAccess[S symbol.Symbol[S]](name S, args ...Expr[S]) Expr[S]
- func NewLocalAccess[S symbol.Symbol[S]](variable variable.Id) Expr[S]
- func NewLogicalAnd[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewLogicalNot[S symbol.Symbol[S]](e Expr[S]) Expr[S]
- func NewLogicalOr[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewMul[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewRem[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewShl[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewShr[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewSub[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewTernary[S symbol.Symbol[S]](cond, ifTrue, ifFalse Expr[S]) Expr[S]
- func NewTupleInitialiser[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- func NewTypedConstant[S symbol.Symbol[S]](constant big.Int, base uint, bitwidth uint) Expr[S]
- func NewUntypedConstant[S symbol.Symbol[S]](constant big.Int, base uint) Expr[S]
- func NewXor[S symbol.Symbol[S]](exprs ...Expr[S]) Expr[S]
- type ExternAccess
- type LocalAccess
- type LogicalAnd
- type LogicalNot
- type LogicalOr
- type Mul
- type Rem
- type Resolved
- type ResolvedCondition
- type Shl
- type Shr
- type Sub
- type Ternary
- type TupleInitialiser
- type Unresolved
- type UnresolvedCondition
- type Xor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Add ¶
Add represents an expression which adds one or more terms together.
func (*Add[S]) ExternUses ¶
func (p *Add[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type ArrayAccess ¶
ArrayAccess represents an array access within an expression.
func (*ArrayAccess[S]) ExternUses ¶
func (p *ArrayAccess[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*ArrayAccess[S]) LocalUses ¶
func (p *ArrayAccess[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*ArrayAccess[S]) SetType ¶
func (p *ArrayAccess[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*ArrayAccess[S]) Type ¶
func (p *ArrayAccess[S]) Type() data.Type[S]
Type implementation for Expr interface
type BitwiseAnd ¶
type BitwiseAnd[S symbol.Symbol[S]] struct { Exprs []Expr[S] // contains filtered or unexported fields }
BitwiseAnd represents a bitwise-and of one or more terms.
func (*BitwiseAnd[S]) ExternUses ¶
func (p *BitwiseAnd[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*BitwiseAnd[S]) LocalUses ¶
func (p *BitwiseAnd[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*BitwiseAnd[S]) SetType ¶
func (p *BitwiseAnd[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*BitwiseAnd[S]) Type ¶
func (p *BitwiseAnd[S]) Type() data.Type[S]
Type implementation for Expr interface
type BitwiseNot ¶
type BitwiseNot[S symbol.Symbol[S]] struct { Expr Expr[S] // contains filtered or unexported fields }
BitwiseNot represents a bitwise-not (complement) of a single expression.
func (*BitwiseNot[S]) ExternUses ¶
func (p *BitwiseNot[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*BitwiseNot[S]) LocalUses ¶
func (p *BitwiseNot[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*BitwiseNot[S]) SetType ¶
func (p *BitwiseNot[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*BitwiseNot[S]) Type ¶
func (p *BitwiseNot[S]) Type() data.Type[S]
Type implementation for Expr interface
type BitwiseOr ¶
type BitwiseOr[S symbol.Symbol[S]] struct { Exprs []Expr[S] // contains filtered or unexported fields }
BitwiseOr represents a bitwise-or of one or more terms.
func (*BitwiseOr[S]) ExternUses ¶
func (p *BitwiseOr[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Cast ¶
type Cast[S symbol.Symbol[S]] struct { Expr Expr[S] CastType data.Type[S] // contains filtered or unexported fields }
Cast represents a type cast expression of the form "e as T", which truncates the value of e to fit within the target type T.
func (*Cast[S]) ExternUses ¶
func (p *Cast[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Cmp ¶
type Cmp[S symbol.Symbol[S]] struct { // Operator indicates the condition Operator CmpOp // Left-hand side Left Expr[S] // Right-hand side Right Expr[S] }
Cmp represents a comparison, such as "==", ">=", etc.
func (*Cmp[S]) ExternUses ¶
func (p *Cmp[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Condition interface.
type CmpOp ¶
type CmpOp uint8
CmpOp represents the set of possible operators for a comparison condition.
const ( // EQ indicates an equality condition EQ CmpOp = 0 // NEQ indicates a non-equality condition NEQ CmpOp = 1 // LT indicates a less-than condition LT CmpOp = 2 // GT indicates a greater-than condition GT CmpOp = 3 // LTEQ indicates a less-than-or-equals condition LTEQ CmpOp = 4 // GTEQ indicates a greater-than-or-equals condition GTEQ CmpOp = 5 )
type Concat ¶
type Concat[S symbol.Symbol[S]] struct { Exprs []Expr[S] // contains filtered or unexported fields }
Concat represents an expresion which performs a bitwise concatenation of one (or more) expressions.
func (*Concat[S]) ExternUses ¶
func (p *Concat[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Condition ¶
type Condition[S symbol.Symbol[S]] interface { // Negate a given condition to produce an equivalent (but negated) // condition. Negate() Condition[S] // ExternUses returns the set of non-local declarations accessed by this // condition. For example, external constants or memories used within. ExternUses() set.AnySortedSet[S] // RegistersRead returns the set of variables used (i.e. read) by this condition LocalUses() bit.Set // String returns a string representation of this condition. String(mapping variable.Map[S]) string }
Condition describes a logical condition which can be used as branch conditions (e.g. for if/while, etc).
type Const ¶
Const represents a constant value within an expresion.
func (*Const[S]) ExternUses ¶
func (p *Const[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Div ¶
Div represents an expression which computes the quotient of two terms.
func (*Div[S]) ExternUses ¶
func (p *Div[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Expr ¶
type Expr[S symbol.Symbol[S]] interface { // ExternUses returns the set of non-local declarations accessed by this // expression. For example, external constants or memories used within. ExternUses() set.AnySortedSet[S] // LocalUses returns the set of variables used (i.e. read) by this expression LocalUses() bit.Set // String returns a string representation of this expression. String(mapping variable.Map[S]) string // Type returns the type associated with this expression (or nil if that has // not yet been determined). Type() data.Type[S] // SetType sets the type associated with this expression. SetType(data.Type[S]) }
Expr represents an arbitrary expression used within an instruction.
func NewArrayAccess ¶
NewArrayAccess constructs an expression representing an array access.
func NewBitwiseAnd ¶
NewBitwiseAnd constructs an expression representing the bitwise-and of one or more values.
func NewBitwiseNot ¶
NewBitwiseNot constructs an expression representing the bitwise complement of a value.
func NewBitwiseOr ¶
NewBitwiseOr constructs an expression representing the bitwise-or of one or more values.
func NewConcat ¶
NewConcat constructs an expression representing the bitwise concatenation of one (or more) expressions.
func NewExternAccess ¶
NewExternAccess constructs an expression representing a non-local access, such as for a named constant or memory.
func NewLocalAccess ¶
NewLocalAccess constructs an expression representing a register access.
func NewLogicalAnd ¶
NewLogicalAnd constructs an expression representing the bitwise-or of one or more values.
func NewLogicalNot ¶
NewLogicalNot constructs an expression representing the bitwise complement of a value.
func NewLogicalOr ¶
NewLogicalOr constructs an expression representing the bitwise-or of one or more values.
func NewTernary ¶
NewTernary creates a new Ternary expression.
func NewTupleInitialiser ¶
NewTupleInitialiser constructs a tuple initialiser expression.
func NewTypedConstant ¶
NewTypedConstant constructs an expression representing a constant value with a given bitwidth, along with a base (which is used for pretty printing, etc). This can be used to construct a constant expression after typing has been performed (i.e. because it includes an appropriate type)
func NewUntypedConstant ¶
NewUntypedConstant constructs an expression representing a constant value, along with a base (which is used for pretty printing, etc). This can be used to construct a constant expression prior to typing, but should not be used to construct an expression after typing has been performed.
type ExternAccess ¶
type ExternAccess[S symbol.Symbol[S]] struct { Name S Args []Expr[S] // contains filtered or unexported fields }
ExternAccess represents a reference to an external declaration, such as a named constant or memory.
func (*ExternAccess[S]) ExternUses ¶
func (p *ExternAccess[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*ExternAccess[S]) LocalUses ¶
func (p *ExternAccess[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*ExternAccess[S]) SetType ¶
func (p *ExternAccess[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*ExternAccess[S]) Type ¶
func (p *ExternAccess[S]) Type() data.Type[S]
Type implementation for Expr interface
type LocalAccess ¶
type LocalAccess[S symbol.Symbol[S]] struct { Variable variable.Id // contains filtered or unexported fields }
LocalAccess represents a register access within an expression.
func (*LocalAccess[S]) ExternUses ¶
func (p *LocalAccess[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*LocalAccess[S]) LocalUses ¶
func (p *LocalAccess[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*LocalAccess[S]) SetType ¶
func (p *LocalAccess[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*LocalAccess[S]) Type ¶
func (p *LocalAccess[S]) Type() data.Type[S]
Type implementation for Expr interface
type LogicalAnd ¶
LogicalAnd represents a bitwise-or of one or more terms.
func (*LogicalAnd[S]) ExternUses ¶
func (p *LogicalAnd[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*LogicalAnd[S]) LocalUses ¶
func (p *LogicalAnd[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*LogicalAnd[S]) SetType ¶
func (p *LogicalAnd[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*LogicalAnd[S]) Type ¶
func (p *LogicalAnd[S]) Type() data.Type[S]
Type implementation for Expr interface
type LogicalNot ¶
LogicalNot represents a bitwise-not (complement) of a single expression.
func (*LogicalNot[S]) ExternUses ¶
func (p *LogicalNot[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*LogicalNot[S]) LocalUses ¶
func (p *LogicalNot[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*LogicalNot[S]) SetType ¶
func (p *LogicalNot[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*LogicalNot[S]) Type ¶
func (p *LogicalNot[S]) Type() data.Type[S]
Type implementation for Expr interface
type LogicalOr ¶
LogicalOr represents a bitwise-or of one or more terms.
func (*LogicalOr[S]) ExternUses ¶
func (p *LogicalOr[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Mul ¶
Mul represents an expression which computes the product of one or more terms.
func (*Mul[S]) ExternUses ¶
func (p *Mul[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Rem ¶
Rem represents an expression which computes the remainder of two terms.
func (*Rem[S]) ExternUses ¶
func (p *Rem[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Resolved ¶
Resolved represents an expression whose external identifiers are otherwise resolved. As such, it should not be possible that such a declaration refers to unknown (or otherwise incorrect) external components.
type ResolvedCondition ¶
ResolvedCondition represents a condition whose external identifiers are otherwise resolved. As such, it should not be possible that such a declaration refers to unknown (or otherwise incorrect) external components.
type Shl ¶
Shl represents a left-shift of one value by another.
func (*Shl[S]) ExternUses ¶
func (p *Shl[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Shr ¶
Shr represents a right-shift of one value by another.
func (*Shr[S]) ExternUses ¶
func (p *Shr[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Sub ¶
Sub represents an expression which subtracts zero or more terms from a given term.
func (*Sub[S]) ExternUses ¶
func (p *Sub[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
type Ternary ¶
type Ternary[S symbol.Symbol[S]] struct { Cond Expr[S] IfTrue Expr[S] IfFalse Expr[S] // contains filtered or unexported fields }
Ternary represents a conditional expression: condition ? ifTrue : ifFalse
func (*Ternary[S]) ExternUses ¶
func (p *Ternary[S]) ExternUses() set.AnySortedSet[S]
ExternUses returns the set of external variables used by the expression.
type TupleInitialiser ¶
type TupleInitialiser[S symbol.Symbol[S]] struct { Exprs []Expr[S] // contains filtered or unexported fields }
TupleInitialiser represents an intialiser from one or more expressions.
func (*TupleInitialiser[S]) ExternUses ¶
func (p *TupleInitialiser[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.
func (*TupleInitialiser[S]) LocalUses ¶
func (p *TupleInitialiser[S]) LocalUses() bit.Set
LocalUses implementation for the Expr interface.
func (*TupleInitialiser[S]) SetType ¶
func (p *TupleInitialiser[S]) SetType(t data.Type[S])
SetType implementation for Expr interface
func (*TupleInitialiser[S]) String ¶
func (p *TupleInitialiser[S]) String(mapping variable.Map[S]) string
func (*TupleInitialiser[S]) Type ¶
func (p *TupleInitialiser[S]) Type() data.Type[S]
Type implementation for Expr interface
type Unresolved ¶
type Unresolved = Expr[symbol.Unresolved]
Unresolved represents an expression whose identifiers for external components are unresolved linkage records. As such, its possible that such an expression instruction may fail with an error at link time due to an unresolvable reference to an external component (e.g. function, RAM, ROM, etc).
type UnresolvedCondition ¶
type UnresolvedCondition = Condition[symbol.Unresolved]
UnresolvedCondition represents a condition whose identifiers for external components are unresolved linkage records. As such, its possible that such an expression instruction may fail with an error at link time due to an unresolvable reference to an external component (e.g. function, RAM, ROM, etc).
type Xor ¶
Xor represents a bitwise-xor of one or more terms.
func (*Xor[S]) ExternUses ¶
func (p *Xor[S]) ExternUses() set.AnySortedSet[S]
ExternUses implementation for the Expr interface.