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
ab815e9e
Commit
ab815e9e
authored
10 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
add character specializations to xxBinding functions
parent
19ad9f32
Branches
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/EnvFunctions.java
+22
-2
22 additions, 2 deletions
...com/oracle/truffle/r/nodes/builtin/base/EnvFunctions.java
with
22 additions
and
2 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/EnvFunctions.java
+
22
−
2
View file @
ab815e9e
...
...
@@ -302,6 +302,13 @@ public class EnvFunctions {
return
RNull
.
instance
;
}
@Specialization
protected
Object
lockBinding
(
RAbstractStringVector
name
,
REnvironment
env
)
{
controlVisibility
();
env
.
lockBinding
(
name
.
getDataAt
(
0
));
return
RNull
.
instance
;
}
@Fallback
protected
Object
lockBinding
(
Object
sym
,
Object
env
)
{
check
(
getEncapsulatingSourceSection
(),
sym
,
env
);
...
...
@@ -318,6 +325,13 @@ public class EnvFunctions {
return
RNull
.
instance
;
}
@Specialization
protected
Object
unlockBinding
(
RAbstractStringVector
name
,
REnvironment
env
)
{
controlVisibility
();
env
.
unlockBinding
(
name
.
getDataAt
(
0
));
return
RNull
.
instance
;
}
@Fallback
protected
Object
unlockBinding
(
Object
sym
,
Object
env
)
{
check
(
getEncapsulatingSourceSection
(),
sym
,
env
);
...
...
@@ -333,6 +347,12 @@ public class EnvFunctions {
return
RDataFactory
.
createLogicalVectorFromScalar
(
env
.
bindingIsLocked
(
sym
.
getName
()));
}
@Specialization
protected
Object
bindingIsLocked
(
RAbstractStringVector
name
,
REnvironment
env
)
{
controlVisibility
();
return
RDataFactory
.
createLogicalVectorFromScalar
(
env
.
bindingIsLocked
(
name
.
getDataAt
(
0
)));
}
@Fallback
protected
Object
bindingIsLocked
(
Object
sym
,
Object
env
)
{
check
(
getEncapsulatingSourceSection
(),
sym
,
env
);
...
...
@@ -347,7 +367,7 @@ public class EnvFunctions {
protected
Object
makeActiveBinding
(
Object
sym
,
Object
fun
,
Object
env
)
{
// TODO implement
controlVisibility
();
throw
RError
.
nyi
(
getEncapsulatingSourceSection
(),
"makeActiveBinding
not implemented
"
);
throw
RError
.
nyi
(
getEncapsulatingSourceSection
(),
"makeActiveBinding"
);
}
}
...
...
@@ -358,7 +378,7 @@ public class EnvFunctions {
protected
Object
bindingIsActive
(
Object
sym
,
Object
fun
,
Object
env
)
{
// TODO implement
controlVisibility
();
return
RDataFactory
.
createLogicalVectorFromScalar
(
false
);
throw
RError
.
nyi
(
getEncapsulatingSourceSection
(),
"bindingIsActive"
);
}
}
...
...
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