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
9e8f0868
Commit
9e8f0868
authored
May 05, 2015
by
Chris Toshok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
root the BoxIterators we create for both zip() and map()
parent
a78a72f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/runtime/builtin_modules/builtins.cpp
src/runtime/builtin_modules/builtins.cpp
+4
-4
No files found.
src/runtime/builtin_modules/builtins.cpp
View file @
9e8f0868
...
@@ -477,8 +477,8 @@ Box* map(Box* f, BoxedTuple* args) {
...
@@ -477,8 +477,8 @@ Box* map(Box* f, BoxedTuple* args) {
if
(
num_iterable
==
1
)
if
(
num_iterable
==
1
)
return
map2
(
f
,
args
->
elts
[
0
]);
return
map2
(
f
,
args
->
elts
[
0
]);
std
::
vector
<
BoxIterator
>
args_it
;
std
::
vector
<
BoxIterator
,
StlCompatAllocator
<
BoxIterator
>
>
args_it
;
std
::
vector
<
BoxIterator
>
args_end
;
std
::
vector
<
BoxIterator
,
StlCompatAllocator
<
BoxIterator
>
>
args_end
;
for
(
auto
e
:
*
args
)
{
for
(
auto
e
:
*
args
)
{
auto
range
=
e
->
pyElements
();
auto
range
=
e
->
pyElements
();
...
@@ -561,12 +561,12 @@ Box* zip(BoxedTuple* containers) {
...
@@ -561,12 +561,12 @@ Box* zip(BoxedTuple* containers) {
if
(
containers
->
size
()
==
0
)
if
(
containers
->
size
()
==
0
)
return
rtn
;
return
rtn
;
std
::
vector
<
llvm
::
iterator_range
<
BoxIterator
>>
ranges
;
std
::
vector
<
llvm
::
iterator_range
<
BoxIterator
>
,
StlCompatAllocator
<
llvm
::
iterator_range
<
BoxIterator
>>
>
ranges
;
for
(
auto
container
:
*
containers
)
{
for
(
auto
container
:
*
containers
)
{
ranges
.
push_back
(
container
->
pyElements
());
ranges
.
push_back
(
container
->
pyElements
());
}
}
std
::
vector
<
BoxIterator
>
iterators
;
std
::
vector
<
BoxIterator
,
StlCompatAllocator
<
BoxIterator
>
>
iterators
;
for
(
auto
range
:
ranges
)
{
for
(
auto
range
:
ranges
)
{
iterators
.
push_back
(
range
.
begin
());
iterators
.
push_back
(
range
.
begin
());
}
}
...
...
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