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
df9ec460
Commit
df9ec460
authored
Jun 23, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #631 from kmod/perf4
more rewriting
parents
9415d7c1
73fc53c9
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
170 additions
and
17 deletions
+170
-17
src/asm_writing/icinfo.cpp
src/asm_writing/icinfo.cpp
+4
-0
src/asm_writing/rewriter.h
src/asm_writing/rewriter.h
+1
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+153
-16
test/tests/weakref1.py
test/tests/weakref1.py
+6
-0
test/tests/weakref_proxy.py
test/tests/weakref_proxy.py
+6
-0
No files found.
src/asm_writing/icinfo.cpp
View file @
df9ec460
...
...
@@ -290,6 +290,10 @@ bool ICInfo::shouldAttempt() {
retry_in
--
;
return
false
;
}
// Note(kmod): in some pathological deeply-recursive cases, it's important that we set the
// retry counter even if we attempt it again. We could probably handle this by setting
// the backoff to 0 on commit, and then setting the retry to the backoff here.
return
!
isMegamorphic
();
}
...
...
src/asm_writing/rewriter.h
View file @
df9ec460
...
...
@@ -321,7 +321,7 @@ private:
// Loads the constant into any register or if already in a register just return it
assembler
::
Register
loadConst
(
uint64_t
val
,
Location
otherThan
=
Location
::
any
());
llvm
::
DenseM
ap
<
uint64_t
,
RewriterVar
*>
constToVar
;
std
::
unordered_m
ap
<
uint64_t
,
RewriterVar
*>
constToVar
;
};
...
...
src/runtime/objmodel.cpp
View file @
df9ec460
This diff is collapsed.
Click to expand it.
test/tests/weakref1.py
View file @
df9ec460
...
...
@@ -19,4 +19,10 @@ def fact(n):
w
=
doStuff
()
fact
(
10
)
# try to clear some memory
def
recurse
(
f
,
n
):
if
n
:
return
recurse
(
f
,
n
-
1
)
return
f
()
recurse
(
gc
.
collect
,
50
)
gc
.
collect
()
test/tests/weakref_proxy.py
View file @
df9ec460
...
...
@@ -21,6 +21,12 @@ def getWR():
wr
=
getWR
()
fact
(
100
)
# try to clear some memory
def
recurse
(
f
,
n
):
if
n
:
return
recurse
(
f
,
n
-
1
)
return
f
()
recurse
(
gc
.
collect
,
50
)
gc
.
collect
()
try
:
...
...
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