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
ce233891
Commit
ce233891
authored
Apr 11, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bare raise
parent
19e1b6d8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
8 deletions
+9
-8
src/codegen/unwinding.cpp
src/codegen/unwinding.cpp
+4
-1
src/runtime/exceptions.cpp
src/runtime/exceptions.cpp
+4
-1
src/runtime/frame.cpp
src/runtime/frame.cpp
+1
-1
test/tests/imp_test.py
test/tests/imp_test.py
+0
-1
test/tests/incremental_tb.py
test/tests/incremental_tb.py
+0
-1
test/tests/incremental_tb_bjit.py
test/tests/incremental_tb_bjit.py
+0
-1
test/tests/traceback_limits.py
test/tests/traceback_limits.py
+0
-1
test/tests/tryfinally.py
test/tests/tryfinally.py
+0
-1
No files found.
src/codegen/unwinding.cpp
View file @
ce233891
...
...
@@ -681,6 +681,9 @@ ExcInfo* getFrameExcInfo() {
FrameInfo
*
frame_info
=
getTopFrameInfo
();
while
(
frame_info
)
{
if
(
copy_from_exc
)
to_update
.
push_back
(
copy_from_exc
);
copy_from_exc
=
&
frame_info
->
exc
;
if
(
!
cur_exc
)
cur_exc
=
copy_from_exc
;
...
...
@@ -688,7 +691,6 @@ ExcInfo* getFrameExcInfo() {
if
(
copy_from_exc
->
type
)
break
;
to_update
.
push_back
(
copy_from_exc
);
frame_info
=
frame_info
->
back
;
};
...
...
@@ -700,6 +702,7 @@ ExcInfo* getFrameExcInfo() {
}
for
(
auto
*
ex
:
to_update
)
{
assert
(
ex
!=
copy_from_exc
);
*
ex
=
*
copy_from_exc
;
Py_INCREF
(
ex
->
type
);
Py_INCREF
(
ex
->
value
);
...
...
src/runtime/exceptions.cpp
View file @
ce233891
...
...
@@ -159,7 +159,6 @@ ExcInfo excInfoForRaise(STOLEN(Box*) type, STOLEN(Box*) value, STOLEN(Box*) tb)
}
extern
"C"
void
raise0
(
ExcInfo
*
frame_exc_info
)
{
assert
(
0
&&
"check refcounting"
);
updateFrameExcInfoIfNeeded
(
frame_exc_info
);
assert
(
frame_exc_info
->
type
);
...
...
@@ -169,6 +168,10 @@ extern "C" void raise0(ExcInfo* frame_exc_info) {
startReraise
();
assert
(
!
PyErr_Occurred
());
Py_INCREF
(
frame_exc_info
->
type
);
Py_INCREF
(
frame_exc_info
->
value
);
Py_INCREF
(
frame_exc_info
->
traceback
);
throw
*
frame_exc_info
;
}
...
...
src/runtime/frame.cpp
View file @
ce233891
...
...
@@ -285,7 +285,7 @@ extern "C" void setFrameExcInfo(FrameInfo* frame_info, STOLEN(Box*) type, STOLEN
if
(
old_type
)
{
Py_DECREF
(
old_type
);
Py_DECREF
(
old_value
);
Py_DECREF
(
old_traceback
);
Py_
X
DECREF
(
old_traceback
);
}
}
...
...
test/tests/imp_test.py
View file @
ce233891
# expected: reffail
import
imp
print
len
(
imp
.
find_module
(
"os"
))
e
=
imp
.
find_module
(
"encodings"
)
...
...
test/tests/incremental_tb.py
View file @
ce233891
# expected: reffail
import
traceback
import
sys
def
f
():
...
...
test/tests/incremental_tb_bjit.py
View file @
ce233891
# expected: reffail
# This is the same as incremental_tb_bjit.py but tests the baseline JIT.
try
:
import
__pyston__
...
...
test/tests/traceback_limits.py
View file @
ce233891
# expected: reffail
import
sys
import
traceback
...
...
test/tests/tryfinally.py
View file @
ce233891
# expected: reffail
# try-finally support
import
sys
...
...
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