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
39732d08
Commit
39732d08
authored
Apr 09, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple slice issues
parent
e25ad306
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1 addition
and
9 deletions
+1
-9
src/codegen/compvars.cpp
src/codegen/compvars.cpp
+1
-0
src/runtime/types.h
src/runtime/types.h
+0
-3
test/tests/getattr_exceptions.py
test/tests/getattr_exceptions.py
+0
-1
test/tests/inspect_test.py
test/tests/inspect_test.py
+0
-1
test/tests/metaclass_parent.py
test/tests/metaclass_parent.py
+0
-1
test/tests/slice.py
test/tests/slice.py
+0
-1
test/tests/str_functions.py
test/tests/str_functions.py
+0
-1
test/tests/subprocess_test.py
test/tests/subprocess_test.py
+0
-1
No files found.
src/codegen/compvars.cpp
View file @
39732d08
...
...
@@ -350,6 +350,7 @@ public:
llvm
::
Value
*
r
=
emitter
.
createCall3
(
info
.
unw_info
,
g
.
funcs
.
apply_slice
,
var
->
getValue
(),
cstart
,
cstop
,
CAPI
,
getNullPtr
(
g
.
llvm_value_type_ptr
));
emitter
.
setType
(
r
,
RefType
::
OWNED
);
emitter
.
setNullable
(
r
,
true
);
return
new
ConcreteCompilerVariable
(
static_cast
<
ConcreteCompilerType
*>
(
return_type
),
r
);
}
else
{
...
...
src/runtime/types.h
View file @
39732d08
...
...
@@ -1088,9 +1088,6 @@ public:
Py_INCREF
(
lower
);
Py_INCREF
(
upper
);
Py_INCREF
(
step
);
ASSERT
(
lower
->
cls
==
none_cls
||
lower
->
cls
==
int_cls
,
"slice objects are not gc-aware (like in CPython)"
);
ASSERT
(
upper
->
cls
==
none_cls
||
upper
->
cls
==
int_cls
,
"slice objects are not gc-aware (like in CPython)"
);
ASSERT
(
step
->
cls
==
none_cls
||
step
->
cls
==
int_cls
,
"slice objects are not gc-aware (like in CPython)"
);
}
static
void
dealloc
(
Box
*
b
)
noexcept
;
...
...
test/tests/getattr_exceptions.py
View file @
39732d08
# expected: reffail
# This throws an exception in the import machinery when we try to access __path__,
# but that should get caught.
...
...
test/tests/inspect_test.py
View file @
39732d08
# expected: reffail
import
inspect
def
f1
(
a
,
b
=
2
,
*
args
,
**
kw
):
...
...
test/tests/metaclass_parent.py
View file @
39732d08
# expected: reffail
# This would make a good Python quiz:
sl
=
slice
(
1
,
2
)
...
...
test/tests/slice.py
View file @
39732d08
# expected: reffail
class
Indexable
(
object
):
def
__getitem__
(
self
,
idx
):
print
"called getitem on object"
,
idx
...
...
test/tests/str_functions.py
View file @
39732d08
# expected: reffail
print
"-"
.
join
([
"hello"
,
"world"
])
print
"-"
.
join
((
"hello"
,
"world"
))
...
...
test/tests/subprocess_test.py
View file @
39732d08
# expected: reffail
import
subprocess
subprocess
.
check_call
([
"true"
])
...
...
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