-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for vectors and pointer coercions
- Loading branch information
1 parent
74da820
commit 5a4563a
Showing
30 changed files
with
330 additions
and
64 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
8 changes: 8 additions & 0 deletions
8
src/col/vct/col/ast/family/coercion/CoerceLLVMIntIntImpl.scala
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package vct.col.ast.family.coercion | ||
|
||
import vct.col.ast.{CoerceLLVMIntInt, TInt} | ||
import vct.col.ast.ops.CoerceLLVMIntIntOps | ||
|
||
trait CoerceLLVMIntIntImpl[G] extends CoerceLLVMIntIntOps[G] { this: CoerceLLVMIntInt[G] => | ||
override def target: TInt[G] = TInt() | ||
} |
8 changes: 8 additions & 0 deletions
8
src/col/vct/col/ast/family/coercion/CoerceLLVMPointerImpl.scala
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package vct.col.ast.family.coercion | ||
|
||
import vct.col.ast.{CoerceLLVMPointer, LLVMTPointer} | ||
import vct.col.ast.ops.CoerceLLVMPointerOps | ||
|
||
trait CoerceLLVMPointerImpl[G] extends CoerceLLVMPointerOps[G] { this: CoerceLLVMPointer[G] => | ||
override def target: LLVMTPointer[G] = LLVMTPointer(to) | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/col/vct/col/ast/lang/llvm/LLVMFunctionPointerValueImpl.scala
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
4 changes: 2 additions & 2 deletions
4
src/col/vct/col/ast/lang/llvm/LLVMGetElementPointerImpl.scala
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,10 +1,10 @@ | ||
package vct.col.ast.unsorted | ||
|
||
import vct.col.ast.{LLVMGetElementPointer, Type} | ||
import vct.col.ast.{LLVMGetElementPointer, LLVMTPointer, Type} | ||
import vct.col.ast.ops.LLVMGetElementPointerOps | ||
import vct.col.print._ | ||
|
||
trait LLVMGetElementPointerImpl[G] extends LLVMGetElementPointerOps[G] { this: LLVMGetElementPointer[G] => | ||
override def t: Type[G] = resultType | ||
override def t: Type[G] = LLVMTPointer(Some(resultType)) | ||
// override def layout(implicit ctx: Ctx): Doc = ??? | ||
} |
10 changes: 10 additions & 0 deletions
10
src/col/vct/col/ast/lang/llvm/LLVMRawVectorValueImpl.scala
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package vct.col.ast.unsorted | ||
|
||
import vct.col.ast.{Type, LLVMRawVectorValue} | ||
import vct.col.ast.ops.LLVMRawVectorValueOps | ||
import vct.col.print._ | ||
|
||
trait LLVMRawVectorValueImpl[G] extends LLVMRawVectorValueOps[G] { this: LLVMRawVectorValue[G] => | ||
override def t: Type[G] = vectorType | ||
// override def layout(implicit ctx: Ctx): Doc = ??? | ||
} |
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,8 +1,7 @@ | ||
package vct.col.ast.unsorted | ||
|
||
import vct.col.ast.{LLVMStore, Type} | ||
import vct.col.ast.LLVMStore | ||
import vct.col.ast.ops.LLVMStoreOps | ||
|
||
trait LLVMStoreImpl[G] extends LLVMStoreOps[G] { this: LLVMStore[G] => | ||
override val t: Type[G] = this.storeType | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package vct.col.ast.unsorted | ||
|
||
import vct.col.ast.LLVMTVector | ||
import vct.col.ast.ops.LLVMTVectorOps | ||
import vct.col.print._ | ||
|
||
trait LLVMTVectorImpl[G] extends LLVMTVectorOps[G] { this: LLVMTVector[G] => | ||
// override def layout(implicit ctx: Ctx): Doc = ??? | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package vct.col.ast.unsorted | ||
|
||
import vct.col.ast.{Type, LLVMVectorValue} | ||
import vct.col.print._ | ||
import vct.col.ast.ops.LLVMVectorValueOps | ||
|
||
trait LLVMVectorValueImpl[G] extends LLVMVectorValueOps[G] { this: LLVMVectorValue[G] => | ||
override def t: Type[G] = vectorType | ||
// override def layout(implicit ctx: Ctx): Doc = ??? | ||
} |
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
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
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
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
Oops, something went wrong.