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
6b901967
Commit
6b901967
authored
9 years ago
by
Christian Humer
Browse files
Options
Downloads
Patches
Plain Diff
Fix but in RMissing filter of CachedVectorNodes. Improved comment about its rationale.
parent
2df624fc
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/src/com/oracle/truffle/r/nodes/access/vector/CachedVectorNode.java
+10
-3
10 additions, 3 deletions
...racle/truffle/r/nodes/access/vector/CachedVectorNode.java
with
10 additions
and
3 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedVectorNode.java
+
10
−
3
View file @
6b901967
...
...
@@ -77,10 +77,17 @@ abstract class CachedVectorNode extends RBaseNode {
}
}
@ExplodeLoop
protected
Object
[]
filterPositions
(
Object
[]
positions
)
{
// we assume that the positions count cannot change as the isRemovePosition check
// is just based on types and therefore does not change per position instance.
/*
* we assume that the positions count cannot change as the isRemovePosition check is just
* based on types and therefore does not change per position instance.
*
* normally empty positions are just empty but with S3 function dispatch it may happen that
* positions are also of type RMissing. These values should not contribute to the access
* dimensions.
*
* Example test case: dimensions.x<-data.frame(c(1,2), c(3,4)); x[1]
*/
assert
initializeFilteredPositionsCount
(
positions
)
==
filteredPositionsLength
;
if
(
filteredPositionsLength
!=
-
1
)
{
Object
[]
newPositions
=
new
Object
[
filteredPositionsLength
];
...
...
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