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
5b5a069a
Commit
5b5a069a
authored
Dec 08, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use helper for decref. still kinda slow
parent
bf8a7e2d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
src/asm_writing/rewriter.cpp
src/asm_writing/rewriter.cpp
+22
-2
No files found.
src/asm_writing/rewriter.cpp
View file @
5b5a069a
...
@@ -534,8 +534,28 @@ void Rewriter::_incref(RewriterVar* var) {
...
@@ -534,8 +534,28 @@ void Rewriter::_incref(RewriterVar* var) {
void
Rewriter
::
_decref
(
RewriterVar
*
var
)
{
void
Rewriter
::
_decref
(
RewriterVar
*
var
)
{
//assembler->trap();
//assembler->trap();
this
->
_call
(
NULL
,
true
,
(
void
*
)
Helper
::
decref
,
llvm
::
ArrayRef
<
RewriterVar
*>
(
&
var
,
1
),
//this->_call(NULL, true, (void*)Helper::decref, llvm::ArrayRef<RewriterVar*>(&var, 1),
llvm
::
ArrayRef
<
RewriterVar
*>
(
NULL
,
(
int
)
0
));
//llvm::ArrayRef<RewriterVar*>(NULL, (int)0));
#ifdef Py_REF_DEBUG
//assembler->trap();
assembler
->
decl
(
assembler
::
Immediate
(
&
_Py_RefTotal
));
#endif
_setupCall
(
true
,
llvm
::
ArrayRef
<
RewriterVar
*>
(
&
var
,
1
),
llvm
::
ArrayRef
<
RewriterVar
*>
(
NULL
,
(
int
)
0
),
assembler
::
RAX
);
// _setupCall doesn't remember that it added the arg regs to the location set
auto
reg
=
assembler
::
RDI
;
//auto reg = var->getInReg();
assembler
->
decl
(
assembler
::
Indirect
(
reg
,
offsetof
(
Box
,
ob_refcnt
)));
{
assembler
::
ForwardJump
jnz
(
*
assembler
,
assembler
::
COND_NOT_ZERO
);
//assembler->trap();
assembler
->
mov
(
assembler
::
Indirect
(
reg
,
offsetof
(
Box
,
cls
)),
assembler
::
RAX
);
assembler
->
mov
(
assembler
::
Indirect
(
assembler
::
RAX
,
offsetof
(
BoxedClass
,
tp_dealloc
)),
assembler
::
R11
);
assembler
->
callq
(
assembler
::
R11
);
}
// Doesn't call bumpUse, since this function is designed to be callable from other emitting functions.
// Doesn't call bumpUse, since this function is designed to be callable from other emitting functions.
// (ie the caller should call bumpUse)
// (ie the caller should call bumpUse)
...
...
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