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
b2a6ddc2
Commit
b2a6ddc2
authored
6 years ago
by
Tomáš Zezula
Browse files
Options
Downloads
Plain Diff
[GR-9410] TCK tests failing due to attempt to unbox RComplexVector.
PullRequest: fastr/1482
parents
798c13d2
874986d1
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.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java
+15
-1
15 additions, 1 deletion
...ruffle/r/engine/interop/RAbstractVectorAccessFactory.java
with
15 additions
and
1 deletion
com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java
+
15
−
1
View file @
b2a6ddc2
...
...
@@ -325,11 +325,25 @@ public final class RAbstractVectorAccessFactory implements StandardFactory {
@Override
public
Object
execute
(
VirtualFrame
frame
)
{
RAbstractVector
arg
=
(
RAbstractVector
)
ForeignAccess
.
getReceiver
(
frame
);
return
arg
.
getLength
()
==
1
;
return
arg
.
getLength
()
==
1
&&
isUnBoxable
(
arg
)
;
}
});
}
private
static
boolean
isUnBoxable
(
RAbstractVector
vector
)
{
Object
o
=
vector
.
getDataAtAsObject
(
0
);
return
isPrimitive
(
o
);
}
private
static
boolean
isPrimitive
(
Object
element
)
{
if
(
element
==
null
)
{
return
false
;
}
final
Class
<?>
elementType
=
element
.
getClass
();
return
elementType
==
String
.
class
||
elementType
==
Character
.
class
||
elementType
==
Boolean
.
class
||
elementType
==
Byte
.
class
||
elementType
==
Short
.
class
||
elementType
==
Integer
.
class
||
elementType
==
Long
.
class
||
elementType
==
Float
.
class
||
elementType
==
Double
.
class
;
}
@Override
public
CallTarget
accessHasSize
()
{
return
Truffle
.
getRuntime
().
createCallTarget
(
new
InteropRootNode
()
{
...
...
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