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
43c7f658
Commit
43c7f658
authored
8 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Plain Diff
[GR-2694] Check for null parameters in PrepareArguments to fix test failure.
parents
9fe2ff68
27d818bb
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/function/call/PrepareArguments.java
+9
-2
9 additions, 2 deletions
...racle/truffle/r/nodes/function/call/PrepareArguments.java
with
9 additions
and
2 deletions
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/call/PrepareArguments.java
+
9
−
2
View file @
43c7f658
/*
* Copyright (c) 2016, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -44,6 +44,7 @@ import com.oracle.truffle.r.runtime.Arguments;
import
com.oracle.truffle.r.runtime.ArgumentsSignature
;
import
com.oracle.truffle.r.runtime.RArguments.S3DefaultArguments
;
import
com.oracle.truffle.r.runtime.RError
;
import
com.oracle.truffle.r.runtime.RInternalError
;
import
com.oracle.truffle.r.runtime.data.RArgsValuesAndNames
;
import
com.oracle.truffle.r.runtime.nodes.RNode
;
...
...
@@ -92,7 +93,13 @@ public abstract class PrepareArguments extends Node {
private
static
RArgsValuesAndNames
executeArgs
(
RNode
[]
arguments
,
ArgumentsSignature
suppliedSignature
,
VirtualFrame
frame
)
{
Object
[]
result
=
new
Object
[
arguments
.
length
];
for
(
int
i
=
0
;
i
<
arguments
.
length
;
i
++)
{
result
[
i
]
=
arguments
[
i
].
execute
(
frame
);
Object
value
=
arguments
[
i
].
execute
(
frame
);
if
(
CompilerDirectives
.
inInterpreter
())
{
if
(
value
==
null
)
{
throw
RInternalError
.
shouldNotReachHere
(
"Java 'null' not allowed in arguments"
);
}
}
result
[
i
]
=
value
;
}
return
new
RArgsValuesAndNames
(
result
,
suppliedSignature
);
}
...
...
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