Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
c9cd0170
Commit
c9cd0170
authored
Apr 05, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bjit: more refcounting fixes
parent
8d7d24ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
src/codegen/baseline_jit.cpp
src/codegen/baseline_jit.cpp
+20
-7
No files found.
src/codegen/baseline_jit.cpp
View file @
c9cd0170
...
...
@@ -246,25 +246,38 @@ RewriterVar* JitFragmentWriter::emitCreateDict(const llvm::ArrayRef<RewriterVar*
assert
(
keys
.
size
()
==
values
.
size
());
if
(
keys
.
empty
())
return
call
(
false
,
(
void
*
)
createDict
)
->
setType
(
RefType
::
OWNED
);
else
return
call
(
false
,
(
void
*
)
createDictHelper
,
imm
(
keys
.
size
()),
allocArgs
(
keys
),
allocArgs
(
values
))
->
setType
(
RefType
::
OWNED
);
auto
rtn
=
call
(
false
,
(
void
*
)
createDictHelper
,
imm
(
keys
.
size
()),
allocArgs
(
keys
),
allocArgs
(
values
))
->
setType
(
RefType
::
OWNED
);
for
(
RewriterVar
*
k
:
keys
)
{
k
->
refConsumed
();
}
for
(
RewriterVar
*
v
:
values
)
{
v
->
refConsumed
();
}
return
rtn
;
}
RewriterVar
*
JitFragmentWriter
::
emitCreateList
(
const
llvm
::
ArrayRef
<
RewriterVar
*>
values
)
{
auto
num
=
values
.
size
();
if
(
num
==
0
)
return
call
(
false
,
(
void
*
)
createList
)
->
setType
(
RefType
::
OWNED
);
else
return
call
(
false
,
(
void
*
)
createListHelper
,
imm
(
num
),
allocArgs
(
values
))
->
setType
(
RefType
::
OWNED
);
auto
rtn
=
call
(
false
,
(
void
*
)
createListHelper
,
imm
(
num
),
allocArgs
(
values
))
->
setType
(
RefType
::
OWNED
);
for
(
RewriterVar
*
v
:
values
)
{
v
->
refConsumed
();
}
return
rtn
;
}
RewriterVar
*
JitFragmentWriter
::
emitCreateSet
(
const
llvm
::
ArrayRef
<
RewriterVar
*>
values
)
{
auto
num
=
values
.
size
();
if
(
num
==
0
)
return
call
(
false
,
(
void
*
)
createSet
)
->
setType
(
RefType
::
OWNED
);
else
return
call
(
false
,
(
void
*
)
createSetHelper
,
imm
(
num
),
allocArgs
(
values
))
->
setType
(
RefType
::
OWNED
);
auto
rtn
=
call
(
false
,
(
void
*
)
createSetHelper
,
imm
(
num
),
allocArgs
(
values
))
->
setType
(
RefType
::
OWNED
);
for
(
RewriterVar
*
v
:
values
)
{
v
->
refConsumed
();
}
return
rtn
;
}
RewriterVar
*
JitFragmentWriter
::
emitCreateSlice
(
RewriterVar
*
start
,
RewriterVar
*
stop
,
RewriterVar
*
step
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment