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
24b8ce70
Commit
24b8ce70
authored
May 05, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deopt: free additional deopt state copy of all object before starting to interpret
parent
e07eda8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+5
-1
src/codegen/ast_interpreter.h
src/codegen/ast_interpreter.h
+1
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+0
-1
No files found.
src/codegen/ast_interpreter.cpp
View file @
24b8ce70
...
...
@@ -2046,7 +2046,7 @@ Box* astInterpretFunctionEval(FunctionMetadata* md, Box* globals, Box* boxedLoca
// caution when changing the function arguments: this function gets called from an assembler wrapper!
extern
"C"
Box
*
astInterpretDeoptFromASM
(
FunctionMetadata
*
md
,
AST_expr
*
after_expr
,
AST_stmt
*
enclosing_stmt
,
Box
*
expr_val
,
FrameStackState
frame_state
)
{
Box
*
expr_val
,
STOLEN
(
FrameStackState
)
frame_state
)
{
static_assert
(
sizeof
(
FrameStackState
)
<=
2
*
8
,
"astInterpretDeopt assumes that all args get passed in regs!"
);
assert
(
md
);
...
...
@@ -2139,6 +2139,10 @@ extern "C" Box* astInterpretDeoptFromASM(FunctionMetadata* md, AST_expr* after_e
assert
(
starting_statement
);
}
// clear the frame_state now that we have initalized the interpreter with it.
// this make sure that we don't have unneccessary references around (e.g. could be a problem for PASSED_GENERATOR)
Py_CLEAR
(
frame_state
.
locals
);
Box
*
v
=
ASTInterpreter
::
execute
(
interpreter
,
start_block
,
starting_statement
);
return
v
?
v
:
incref
(
None
);
}
...
...
src/codegen/ast_interpreter.h
View file @
24b8ce70
...
...
@@ -79,7 +79,7 @@ Box* astInterpretFunction(FunctionMetadata* f, Box* closure, Box* generator, Box
Box
*
astInterpretFunctionEval
(
FunctionMetadata
*
cf
,
Box
*
globals
,
Box
*
boxedLocals
);
// this function is implemented in the src/codegen/ast_interpreter_exec.S assembler file
extern
"C"
Box
*
astInterpretDeopt
(
FunctionMetadata
*
cf
,
AST_expr
*
after_expr
,
AST_stmt
*
enclosing_stmt
,
Box
*
expr_val
,
FrameStackState
frame_state
);
STOLEN
(
FrameStackState
)
frame_state
);
struct
FrameInfo
;
FrameInfo
*
getFrameInfoForInterpretedFrame
(
void
*
frame_ptr
);
...
...
src/runtime/objmodel.cpp
View file @
24b8ce70
...
...
@@ -148,7 +148,6 @@ extern "C" Box* deopt(AST_expr* expr, Box* value) {
deopt_state
.
frame_state
.
frame_info
->
exc
.
value
=
NULL
;
}
AUTO_DECREF
(
deopt_state
.
frame_state
.
locals
);
return
astInterpretDeopt
(
deopt_state
.
cf
->
md
,
expr
,
deopt_state
.
current_stmt
,
value
,
deopt_state
.
frame_state
);
}
...
...
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