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
7eb225b1
Commit
7eb225b1
authored
Feb 25, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'b33228' into refcounting
parents
78c32145
b33228cd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
2 deletions
+51
-2
docs/INSTALLING.md
docs/INSTALLING.md
+2
-2
src/runtime/traceback.cpp
src/runtime/traceback.cpp
+16
-0
test/extra/paste_test.py
test/extra/paste_test.py
+33
-0
No files found.
docs/INSTALLING.md
View file @
7eb225b1
...
@@ -32,8 +32,8 @@ sudo yum install git make cmake clang gcc gcc-c++ ccache ninja-build xz-devel au
...
@@ -32,8 +32,8 @@ sudo yum install git make cmake clang gcc gcc-c++ ccache ninja-build xz-devel au
```
```
git clone https://github.com/dropbox/pyston.git ~/pyston
git clone https://github.com/dropbox/pyston.git ~/pyston
git clone
git
://github.com/llvm-mirror/llvm.git ~/pyston_deps/llvm-trunk
git clone
https
://github.com/llvm-mirror/llvm.git ~/pyston_deps/llvm-trunk
git clone
git
://github.com/llvm-mirror/clang.git ~/pyston_deps/llvm-trunk/tools/clang
git clone
https
://github.com/llvm-mirror/clang.git ~/pyston_deps/llvm-trunk/tools/clang
git config --global user.email "you@example.com"
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global user.name "Your Name"
...
...
src/runtime/traceback.cpp
View file @
7eb225b1
...
@@ -132,6 +132,13 @@ int BoxedTraceback::clear(Box* self) noexcept {
...
@@ -132,6 +132,13 @@ int BoxedTraceback::clear(Box* self) noexcept {
abort
();
abort
();
}
}
static
Box
*
traceback_tb_next
(
Box
*
self
,
void
*
)
{
assert
(
self
->
cls
==
traceback_cls
);
BoxedTraceback
*
traceback
=
static_cast
<
BoxedTraceback
*>
(
self
);
return
traceback
->
tb_next
;
}
void
setupTraceback
()
{
void
setupTraceback
()
{
traceback_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
BoxedTraceback
),
false
,
"traceback"
,
traceback_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
BoxedTraceback
),
false
,
"traceback"
,
(
destructor
)
BoxedTraceback
::
dealloc
,
NULL
,
true
,
(
destructor
)
BoxedTraceback
::
dealloc
,
NULL
,
true
,
...
@@ -140,6 +147,15 @@ void setupTraceback() {
...
@@ -140,6 +147,15 @@ void setupTraceback() {
traceback_cls
->
giveAttr
(
"getLines"
,
traceback_cls
->
giveAttr
(
"getLines"
,
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
BoxedTraceback
::
getLines
,
UNKNOWN
,
1
)));
new
BoxedFunction
(
FunctionMetadata
::
create
((
void
*
)
BoxedTraceback
::
getLines
,
UNKNOWN
,
1
)));
/*
* Currently not supported.
traceback_cls->giveAttr("tb_frame", new (pyston_getset_cls) BoxedGetsetDescriptor(traceback_tb_frame, NULL, NULL));
traceback_cls->giveAttr("tb_lasti", new (pyston_getset_cls) BoxedGetsetDescriptor(traceback_tb_lasti, NULL, NULL));
traceback_cls->giveAttr("tb_lineno", new (pyston_getset_cls) BoxedGetsetDescriptor(traceback_tb_lineno, NULL,
NULL));
*/
traceback_cls
->
giveAttr
(
"tb_next"
,
new
(
pyston_getset_cls
)
BoxedGetsetDescriptor
(
traceback_tb_next
,
NULL
,
NULL
));
traceback_cls
->
freeze
();
traceback_cls
->
freeze
();
}
}
}
}
test/extra/paste_test.py
0 → 100644
View file @
7eb225b1
# expected: fail
# The paste test suite uses pytest, so this test file incentally also tests pytest.
# Pytest relies quite heavily on a number of code introspection features, which
# we currently don't have. This includes:
# 1) The ast module
# 2) traceback.tb_frame, traceback.tb_next
import
os
,
sys
,
subprocess
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"/../lib"
)
from
test_helper
import
create_virtenv
,
run_test
ENV_NAME
=
"paste_test_env_"
+
os
.
path
.
basename
(
sys
.
executable
)
PYTHON_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"python"
))
PYTEST_EXE
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"bin"
,
"py.test"
))
PASTE_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
ENV_NAME
,
"paste"
))
PASTE_TEST_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
PASTE_DIR
,
"tests"
))
packages
=
[
"pytest"
,
"paste"
,
"nose==1.3.7"
]
create_virtenv
(
ENV_NAME
,
packages
,
force_create
=
True
)
# Need the test files in the source
subprocess
.
check_call
([
"hg"
,
"clone"
,
"https://bitbucket.org/ianb/paste"
],
cwd
=
ENV_NAME
)
print
">> "
print
">> Setting up paste..."
print
">> "
subprocess
.
check_call
([
PYTHON_EXE
,
"setup.py"
,
"build"
],
cwd
=
PASTE_DIR
)
print
">> "
print
">> Running paste tests..."
print
">> "
subprocess
.
check_call
([
PYTEST_EXE
],
cwd
=
PASTE_TEST_DIR
)
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