Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
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
QueryR
Commits
55d3898e
Commit
55d3898e
authored
8 years ago
by
stepan
Browse files
Options
Downloads
Patches
Plain Diff
Call: converted to cast pipelines
parent
f0aca5a5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java
+8
-9
8 additions, 9 deletions
...tin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java
with
8 additions
and
9 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java
+
8
−
9
View file @
55d3898e
...
...
@@ -22,14 +22,15 @@
*/
package
com.oracle.truffle.r.nodes.builtin.base
;
import
static
com
.
oracle
.
truffle
.
r
.
nodes
.
builtin
.
CastBuilder
.
Predef
.
stringValue
;
import
static
com
.
oracle
.
truffle
.
r
.
runtime
.
builtins
.
RBehavior
.
PURE
;
import
static
com
.
oracle
.
truffle
.
r
.
runtime
.
builtins
.
RBuiltinKind
.
PRIMITIVE
;
import
com.oracle.truffle.api.CompilerDirectives.TruffleBoundary
;
import
com.oracle.truffle.api.dsl.Fallback
;
import
com.oracle.truffle.api.dsl.Specialization
;
import
com.oracle.truffle.r.nodes.RASTUtils
;
import
com.oracle.truffle.r.nodes.access.variables.ReadVariableNode
;
import
com.oracle.truffle.r.nodes.builtin.CastBuilder
;
import
com.oracle.truffle.r.nodes.builtin.RBuiltinNode
;
import
com.oracle.truffle.r.runtime.ArgumentsSignature
;
import
com.oracle.truffle.r.runtime.RError
;
...
...
@@ -39,7 +40,6 @@ import com.oracle.truffle.r.runtime.data.RDataFactory;
import
com.oracle.truffle.r.runtime.data.RFunction
;
import
com.oracle.truffle.r.runtime.data.RLanguage
;
import
com.oracle.truffle.r.runtime.data.RMissing
;
import
com.oracle.truffle.r.runtime.data.model.RAbstractStringVector
;
import
com.oracle.truffle.r.runtime.nodes.RSyntaxNode
;
/**
...
...
@@ -55,15 +55,14 @@ public abstract class Call extends RBuiltinNode {
return
new
Object
[]{
RMissing
.
instance
,
RArgsValuesAndNames
.
EMPTY
};
}
@
Specialization
(
guards
=
"name.getLength() != 0"
)
protected
RLanguage
call
(
RAbstractStringVector
name
,
RArgsValuesAndNames
arg
s
)
{
return
makeCall
(
name
.
getDataAt
(
0
),
args
);
@
Override
protected
void
createCasts
(
CastBuilder
cast
s
)
{
casts
.
arg
(
""
).
mustBe
(
stringValue
(),
RError
.
Message
.
FIRST_ARG_MUST_BE_STRING
).
asStringVector
().
findFirst
(
);
}
@Fallback
@SuppressWarnings
(
"unused"
)
protected
RLanguage
call
(
Object
name
,
Object
args
)
{
throw
RError
.
error
(
this
,
RError
.
Message
.
FIRST_ARG_MUST_BE_STRING
);
@Specialization
protected
RLanguage
call
(
String
name
,
RArgsValuesAndNames
args
)
{
return
makeCall
(
name
,
args
);
}
@TruffleBoundary
...
...
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