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
1089579e
Commit
1089579e
authored
10 years ago
by
Michael Haupt
Browse files
Options
Downloads
Patches
Plain Diff
add commentary on RArguments
parent
4362581a
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.runtime/src/com/oracle/truffle/r/runtime/RArguments.java
+23
-4
23 additions, 4 deletions
....runtime/src/com/oracle/truffle/r/runtime/RArguments.java
with
23 additions
and
4 deletions
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RArguments.java
+
23
−
4
View file @
1089579e
...
...
@@ -25,11 +25,30 @@ package com.oracle.truffle.r.runtime;
import
com.oracle.truffle.api.frame.*
;
import
com.oracle.truffle.r.runtime.data.*
;
// @formatter:off
/**
* Provide access to arguments contained in frames. This is a purely static class. It defines, by
* means of slot offsets, where in a frame certain information is stored, such as the function
* executed in the frame.
*
* The frame layout, depicted, is as follows:
* <pre>
* +-------------------+
* INDEX_FUNCTION -> | RFunction |
* +-------------------+
* INDEX_ENCLOSING_FRAME -> | MaterializedFrame |
* +-------------------+
* INDEX_ARGUMENTS -> | Object[] |
* +-------------------+
* INDEX_NAMES -> | Object[] |
* +-------------------+
* </pre>
*
* All frame elements should <b>always</b> be accessed through the getter and setter functions
* defined in this class, as they provide a means of accessing the frame contents that is
* transparent to layout changes.
*/
// @formatter:on
public
final
class
RArguments
{
public
static
final
Object
[]
EMPTY_OBJECT_ARRAY
=
new
Object
[
0
];
...
...
@@ -42,10 +61,6 @@ public final class RArguments {
private
RArguments
()
{
}
public
static
RFunction
getFunction
(
Frame
frame
)
{
return
(
RFunction
)
frame
.
getArguments
()[
INDEX_FUNCTION
];
}
public
static
Object
[]
create
()
{
return
create
(
null
,
null
,
EMPTY_OBJECT_ARRAY
);
}
...
...
@@ -66,6 +81,10 @@ public final class RArguments {
return
new
Object
[]{
functionObj
,
enclosingFrame
,
evaluatedArgs
,
names
};
}
public
static
RFunction
getFunction
(
Frame
frame
)
{
return
(
RFunction
)
frame
.
getArguments
()[
INDEX_FUNCTION
];
}
public
static
Object
[]
getArgumentsArray
(
Frame
frame
)
{
return
(
Object
[])
frame
.
getArguments
()[
INDEX_ARGUMENTS
];
}
...
...
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