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
c21f741e
Commit
c21f741e
authored
Nov 24, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some simple changes to get the bjit to run without crashing
parent
dab628d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+15
-3
No files found.
src/codegen/ast_interpreter.cpp
View file @
c21f741e
...
...
@@ -306,7 +306,7 @@ void ASTInterpreter::startJITing(CFGBlock* block, int exit_offset) {
code_block
=
code_blocks
[
code_blocks
.
size
()
-
1
].
get
();
if
(
!
code_block
||
code_block
->
shouldCreateNewBlock
())
{
code_blocks
.
push_back
(
std
::
unique_ptr
<
JitCodeBlock
>
(
new
JitCodeBlock
(
source_info
->
getName
(
)
->
s
())));
code_blocks
.
push_back
(
std
::
unique_ptr
<
JitCodeBlock
>
(
new
JitCodeBlock
(
autoDecref
(
source_info
->
getName
()
)
->
s
())));
code_block
=
code_blocks
[
code_blocks
.
size
()
-
1
].
get
();
exit_offset
=
0
;
}
...
...
@@ -415,6 +415,8 @@ Box* ASTInterpreter::executeInner(ASTInterpreter& interpreter, CFGBlock* start_b
if
(
interpreter
.
jit
)
interpreter
.
jit
->
emitSetCurrentInst
(
s
);
Py_XDECREF
(
v
.
o
);
if
(
v
.
var
)
v
.
var
->
xdecref
();
v
=
interpreter
.
visit_stmt
(
s
);
}
}
...
...
@@ -546,7 +548,12 @@ void ASTInterpreter::doStore(AST_expr* node, Value value) {
}
Value
ASTInterpreter
::
getNone
()
{
return
Value
(
incref
(
None
),
jit
?
jit
->
imm
(
None
)
:
NULL
);
RewriterVar
*
v
=
NULL
;
if
(
jit
)
{
v
=
jit
->
imm
(
None
);
v
->
incref
();
}
return
Value
(
incref
(
None
),
v
);
}
Value
ASTInterpreter
::
visit_unaryop
(
AST_UnaryOp
*
node
)
{
...
...
@@ -1460,7 +1467,12 @@ Value ASTInterpreter::visit_num(AST_Num* node) {
}
else
RELEASE_ASSERT
(
0
,
"not implemented"
);
Py_INCREF
(
o
);
return
Value
(
o
,
jit
?
jit
->
imm
(
o
)
:
NULL
);
RewriterVar
*
v
=
NULL
;
if
(
jit
)
{
v
=
jit
->
imm
(
o
);
v
->
incref
();
}
return
Value
(
o
,
v
);
}
Value
ASTInterpreter
::
visit_index
(
AST_Index
*
node
)
{
...
...
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