Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
qir
Commits
b279b639
Commit
b279b639
authored
6 years ago
by
Julien Lopez
Browse files
Options
Downloads
Patches
Plain Diff
Fix deprecated Truffle stuff
parent
4d25cd13
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/qir/QIRLanguage.java
+0
-11
0 additions, 11 deletions
src/qir/QIRLanguage.java
src/qir/ast/QIRNode.java
+17
-3
17 additions, 3 deletions
src/qir/ast/QIRNode.java
with
17 additions
and
14 deletions
src/qir/QIRLanguage.java
+
0
−
11
View file @
b279b639
...
...
@@ -4,7 +4,6 @@ import com.oracle.truffle.api.TruffleLanguage;
import
qir.ast.QIRNode
;
import
qir.runtime.QIRContext
;
import
qir.util.QIRException
;
/**
* QIR (Query Intermediate Language) is a language that aims to be able to encode any query from any
...
...
@@ -19,16 +18,6 @@ public final class QIRLanguage extends TruffleLanguage<QIRContext> {
return
new
QIRContext
(
env
);
}
@Override
protected
Object
findExportedSymbol
(
final
QIRContext
context
,
final
String
globalName
,
final
boolean
onlyExplicit
)
{
throw
new
QIRException
(
"Unimplemented"
);
}
@Override
protected
Object
getLanguageGlobal
(
final
QIRContext
context
)
{
return
context
;
}
@Override
protected
boolean
isObjectOfLanguage
(
final
Object
object
)
{
return
object
instanceof
QIRNode
;
...
...
This diff is collapsed.
Click to expand it.
src/qir/ast/QIRNode.java
+
17
−
3
View file @
b279b639
package
qir.ast
;
import
com.oracle.truffle.api.dsl.ReportPolymorphism
;
import
com.oracle.truffle.api.dsl.TypeSystemReference
;
import
com.oracle.truffle.api.frame.VirtualFrame
;
import
com.oracle.truffle.api.instrumentation.Instrumentable
;
import
com.oracle.truffle.api.instrumentation.GenerateWrapper
;
import
com.oracle.truffle.api.instrumentation.InstrumentableNode
;
import
com.oracle.truffle.api.instrumentation.ProbeNode
;
import
com.oracle.truffle.api.nodes.Node
;
import
com.oracle.truffle.api.nodes.UnexpectedResultException
;
import
com.oracle.truffle.api.source.SourceSection
;
...
...
@@ -21,8 +24,9 @@ import qir.util.QIRException;
* A generic QIR node. Every QIR node must inherit from {@link QIRNode}.
*/
@TypeSystemReference
(
QIRTypes
.
class
)
@Instrumentable
(
factory
=
QIRNodeWrapper
.
class
)
public
abstract
class
QIRNode
extends
Node
{
@GenerateWrapper
@ReportPolymorphism
public
abstract
class
QIRNode
extends
Node
implements
InstrumentableNode
{
/**
* The location in the source code of the expression represented by this node.
*/
...
...
@@ -42,6 +46,16 @@ public abstract class QIRNode extends Node {
return
super
.
hashCode
();
}
@Override
public
WrapperNode
createWrapper
(
ProbeNode
probe
)
{
return
new
QIRNodeWrapper
(
sourceSection
,
this
,
probe
);
}
@Override
public
final
boolean
isInstrumentable
()
{
return
sourceSection
!=
null
;
}
public
abstract
QIRNode
executeGeneric
(
VirtualFrame
frame
);
public
final
QIRNumber
executeNumber
(
VirtualFrame
frame
)
throws
UnexpectedResultException
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment