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
f3bcf0db
Commit
f3bcf0db
authored
9 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
fix bad merge
parent
746cb631
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.builtin/src/com/oracle/truffle/r/nodes/builtin/base/HiddenInternalFunctions.java
+10
-10
10 additions, 10 deletions
...truffle/r/nodes/builtin/base/HiddenInternalFunctions.java
with
10 additions
and
10 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/HiddenInternalFunctions.java
+
10
−
10
View file @
f3bcf0db
...
...
@@ -344,16 +344,16 @@ public class HiddenInternalFunctions {
@Override
protected
void
createCasts
(
CastBuilder
casts
)
{
casts
.
toInteger
(
3
);
casts
.
toInteger
(
2
).
toInteger
(
3
);
}
@Specialization
protected
RIntVector
lazyLoadDBinsertValue
(
VirtualFrame
frame
,
Object
value
,
RAbstractStringVector
file
,
byte
asciiL
,
int
compression
,
RFunction
hook
)
{
protected
RIntVector
lazyLoadDBinsertValue
(
VirtualFrame
frame
,
Object
value
,
RAbstractStringVector
file
,
int
asciiL
,
int
compression
,
RFunction
hook
)
{
return
lazyLoadDBinsertValueInternal
(
frame
.
materialize
(),
value
,
file
,
asciiL
,
compression
,
hook
);
}
@TruffleBoundary
private
RIntVector
lazyLoadDBinsertValueInternal
(
MaterializedFrame
frame
,
Object
value
,
RAbstractStringVector
file
,
byte
asciiL
,
int
compression
,
RFunction
hook
)
{
private
RIntVector
lazyLoadDBinsertValueInternal
(
MaterializedFrame
frame
,
Object
value
,
RAbstractStringVector
file
,
int
type
,
int
compression
,
RFunction
hook
)
{
if
(!(
compression
==
1
||
compression
==
3
))
{
throw
RError
.
error
(
this
,
Message
.
GENERIC
,
"unsupported compression"
);
}
...
...
@@ -366,27 +366,27 @@ public class HiddenInternalFunctions {
};
try
{
byte
[]
data
=
RSerialize
.
serialize
(
value
,
RRuntime
.
fromLogical
(
asciiL
),
fals
e
,
RSerialize
.
DEFAULT_VERSION
,
callHook
);
byte
[]
data
=
RSerialize
.
serialize
(
value
,
typ
e
,
RSerialize
.
DEFAULT_VERSION
,
callHook
);
// See comment in LazyLoadDBFetch for format
int
outLen
;
int
offset
;
RCompression
.
Type
type
;
RCompression
.
Type
c
type
;
byte
[]
cdata
;
if
(
compression
==
1
)
{
type
=
RCompression
.
Type
.
GZIP
;
c
type
=
RCompression
.
Type
.
GZIP
;
offset
=
4
;
outLen
=
(
int
)
(
1.001
*
data
.
length
)
+
20
;
cdata
=
new
byte
[
outLen
];
boolean
rc
=
RCompression
.
compress
(
type
,
data
,
cdata
);
boolean
rc
=
RCompression
.
compress
(
c
type
,
data
,
cdata
);
if
(!
rc
)
{
throw
RError
.
error
(
this
,
Message
.
GENERIC
,
"zlib compress error"
);
}
}
else
if
(
compression
==
3
)
{
type
=
RCompression
.
Type
.
LZMA
;
c
type
=
RCompression
.
Type
.
LZMA
;
offset
=
5
;
outLen
=
data
.
length
;
cdata
=
new
byte
[
outLen
];
boolean
rc
=
RCompression
.
compress
(
type
,
data
,
cdata
);
boolean
rc
=
RCompression
.
compress
(
c
type
,
data
,
cdata
);
if
(!
rc
)
{
throw
RError
.
error
(
this
,
Message
.
GENERIC
,
"lzma compress error"
);
}
...
...
@@ -395,7 +395,7 @@ public class HiddenInternalFunctions {
}
int
[]
intData
=
new
int
[
2
];
intData
[
1
]
=
outLen
+
offset
;
// include length + type (compression == 3)
intData
[
0
]
=
appendFile
(
file
.
getDataAt
(
0
),
cdata
,
data
.
length
,
type
);
intData
[
0
]
=
appendFile
(
file
.
getDataAt
(
0
),
cdata
,
data
.
length
,
c
type
);
return
RDataFactory
.
createIntVector
(
intData
,
RDataFactory
.
COMPLETE_VECTOR
);
}
catch
(
Throwable
ex
)
{
// Exceptions have been observed that were masked and very hard to find
...
...
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