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
34f922be
Commit
34f922be
authored
Nov 24, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bjit can now pass prime_summing
parent
da2a9964
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+3
-1
src/codegen/baseline_jit.cpp
src/codegen/baseline_jit.cpp
+4
-0
src/codegen/baseline_jit.h
src/codegen/baseline_jit.h
+1
-1
No files found.
src/codegen/ast_interpreter.cpp
View file @
34f922be
...
...
@@ -631,8 +631,10 @@ Value ASTInterpreter::visit_branch(AST_Branch* node) {
ASSERT
(
v
.
o
==
True
||
v
.
o
==
False
,
"Should have called NONZERO before this branch"
);
if
(
jit
)
{
// Special note: emitSideExit decrefs v for us.
// TODO: since the value is always True or False, maybe could optimize by putting the decref
// before the conditional instead of after.
jit
->
emitSideExit
(
v
,
v
.
o
,
v
.
o
==
True
?
node
->
iffalse
:
node
->
iftrue
);
v
.
var
->
decref
();
}
if
(
v
.
o
==
True
)
...
...
src/codegen/baseline_jit.cpp
View file @
34f922be
...
...
@@ -986,6 +986,8 @@ void JitFragmentWriter::_emitSideExit(RewriterVar* var, RewriterVar* val_constan
{
assembler
::
ForwardJump
jne
(
*
assembler
,
assembler
::
COND_EQUAL
);
_decref
(
var
);
for
(
auto
v
:
local_syms
)
{
if
(
v
.
second
)
_decref
(
v
.
second
);
...
...
@@ -1001,6 +1003,8 @@ void JitFragmentWriter::_emitSideExit(RewriterVar* var, RewriterVar* val_constan
}
}
_decref
(
var
);
var
->
bumpUse
();
val_constant
->
bumpUse
();
...
...
src/codegen/baseline_jit.h
View file @
34f922be
...
...
@@ -265,7 +265,7 @@ public:
void
emitSetItemName
(
BoxedString
*
s
,
RewriterVar
*
v
);
void
emitSetItem
(
RewriterVar
*
target
,
RewriterVar
*
slice
,
RewriterVar
*
value
);
void
emitSetLocal
(
InternedString
s
,
int
vreg
,
bool
set_closure
,
RewriterVar
*
v
);
void
emitSideExit
(
RewriterVar
*
v
,
Box
*
cmp_value
,
CFGBlock
*
next_block
);
void
emitSideExit
(
STOLEN
(
RewriterVar
*
)
v
,
Box
*
cmp_value
,
CFGBlock
*
next_block
);
void
emitUncacheExcInfo
();
void
abortCompilation
();
...
...
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