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
8ec7e5a0
Commit
8ec7e5a0
authored
8 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
remove TruffleBoundary in FastROptions
parent
83d79370
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.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java
+8
-4
8 additions, 4 deletions
...untime/src/com/oracle/truffle/r/runtime/FastROptions.java
with
8 additions
and
4 deletions
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FastROptions.java
+
8
−
4
View file @
8ec7e5a0
...
...
@@ -25,8 +25,8 @@ package com.oracle.truffle.r.runtime;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
com.oracle.truffle.api.CompilerDirectives
;
import
com.oracle.truffle.api.CompilerDirectives.CompilationFinal
;
import
com.oracle.truffle.api.CompilerDirectives.TruffleBoundary
;
/**
* Options to control the behavior of the FastR system, that relate to the implementation, i.e., are
...
...
@@ -78,12 +78,12 @@ public enum FastROptions {
this
.
value
=
defaultValue
;
}
@TruffleBoundary
public
boolean
getBooleanValue
()
{
assert
isBoolean
;
if
(
value
instanceof
Boolean
)
{
return
(
Boolean
)
value
;
}
else
{
CompilerDirectives
.
transferToInterpreter
();
System
.
out
.
println
(
"boolean option value expected with "
+
name
()
+
" - forgot +/- ?"
);
System
.
exit
(
2
);
return
false
;
...
...
@@ -91,25 +91,29 @@ public enum FastROptions {
}
@TruffleBoundary
public
String
getStringValue
()
{
assert
!
isBoolean
;
if
(
value
==
null
||
value
instanceof
String
)
{
return
(
String
)
value
;
}
else
{
CompilerDirectives
.
transferToInterpreter
();
System
.
out
.
println
(
"string option value expected with "
+
name
());
System
.
exit
(
2
);
return
""
;
}
}
@TruffleBoundary
public
int
getNonNegativeIntValue
()
{
assert
!
isBoolean
;
if
(
value
instanceof
Integer
)
{
return
(
Integer
)
value
;
}
CompilerDirectives
.
transferToInterpreterAndInvalidate
();
if
(
value
instanceof
String
)
{
try
{
int
res
=
Integer
.
decode
((
String
)
value
);
if
(
res
>=
0
)
{
value
=
res
;
return
res
;
}
// else fall through to error message
}
catch
(
NumberFormatException
x
)
{
...
...
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