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
ba82f050
Commit
ba82f050
authored
Jun 09, 2015
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip initializing exc fields inside JITed code
parent
bc36f5df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
src/codegen/irgen/irgenerator.cpp
src/codegen/irgen/irgenerator.cpp
+1
-6
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+7
-0
No files found.
src/codegen/irgen/irgenerator.cpp
View file @
ba82f050
...
...
@@ -179,16 +179,11 @@ llvm::Value* IRGenState::getFrameInfoVar() {
// The "normal" case
// frame_info.exc.type = NULL
// frame_info.exc.value = NULL
// frame_info.exc.traceback = NULL
llvm
::
Constant
*
null_value
=
getNullPtr
(
g
.
llvm_value_type_ptr
);
llvm
::
Value
*
exc_info
=
getExcinfoGep
(
builder
,
al
);
builder
.
CreateStore
(
null_value
,
builder
.
CreateConstInBoundsGEP2_32
(
exc_info
,
0
,
offsetof
(
ExcInfo
,
type
)
/
sizeof
(
Box
*
)));
builder
.
CreateStore
(
null_value
,
builder
.
CreateConstInBoundsGEP2_32
(
exc_info
,
0
,
offsetof
(
ExcInfo
,
value
)
/
sizeof
(
Box
*
)));
builder
.
CreateStore
(
null_value
,
builder
.
CreateConstInBoundsGEP2_32
(
exc_info
,
0
,
offsetof
(
ExcInfo
,
traceback
)
/
sizeof
(
Box
*
)));
// frame_info.boxedLocals = NULL
llvm
::
Value
*
boxed_locals_gep
=
getBoxedLocalsGep
(
builder
,
al
);
builder
.
CreateStore
(
getNullPtr
(
g
.
llvm_value_type_ptr
),
boxed_locals_gep
);
...
...
src/runtime/objmodel.cpp
View file @
ba82f050
...
...
@@ -173,6 +173,13 @@ extern "C" Box* deopt(AST_expr* expr, Box* value) {
// Should we only do this selectively?
execution_point
.
cf
->
speculationFailed
();
// Except of exc.type we skip initializing the exc fields inside the JITed code path (small perf improvement) that's
// why we have todo it now if we didn't set an exception (which sets all fields)
if
(
frame_state
.
frame_info
->
exc
.
type
==
NULL
)
{
frame_state
.
frame_info
->
exc
.
traceback
=
NULL
;
frame_state
.
frame_info
->
exc
.
value
=
NULL
;
}
return
astInterpretFrom
(
execution_point
.
cf
,
expr
,
execution_point
.
current_stmt
,
value
,
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