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
053a23d6
Commit
053a23d6
authored
Jun 15, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #610 from kmod/disable_deopt
Temporarily disable type speculation
parents
2e879e2f
f7ea6f5f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
1 deletion
+38
-1
src/analysis/type_analysis.cpp
src/analysis/type_analysis.cpp
+4
-0
src/codegen/irgen/hooks.cpp
src/codegen/irgen/hooks.cpp
+1
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+8
-0
test/tests/deopt_generator_tests.py
test/tests/deopt_generator_tests.py
+1
-0
test/tests/deopt_namescope_tests.py
test/tests/deopt_namescope_tests.py
+1
-0
test/tests/deopt_tests.py
test/tests/deopt_tests.py
+23
-0
No files found.
src/analysis/type_analysis.cpp
View file @
053a23d6
...
...
@@ -115,6 +115,10 @@ private:
assert
(
old_type
);
assert
(
speculation
!=
TypeAnalysis
::
NONE
);
if
(
VERBOSITY
()
>=
3
)
printf
(
"Would maybe try to speculate but deopt is currently broken
\n
"
);
return
old_type
;
if
(
speculated_cls
!=
NULL
&&
speculated_cls
->
is_constant
)
{
ConcreteCompilerType
*
speculated_type
=
unboxedType
(
typeFromClass
(
speculated_cls
));
if
(
VERBOSITY
()
>=
2
)
{
...
...
src/codegen/irgen/hooks.cpp
View file @
053a23d6
...
...
@@ -739,7 +739,7 @@ void CompiledFunction::speculationFailed() {
printf
(
"%p
\n
"
,
clfunc
->
versions
[
i
]);
}
}
assert
(
found
);
RELEASE_ASSERT
(
found
,
""
);
}
}
...
...
src/runtime/objmodel.cpp
View file @
053a23d6
...
...
@@ -165,6 +165,14 @@ extern "C" Box* deopt(AST_expr* expr, Box* value) {
static
StatCounter
num_deopt
(
"num_deopt"
);
num_deopt
.
log
();
printf
(
"Deopt!
\n
"
);
print_ast
(
expr
);
printf
(
"
\n
"
);
dump
(
value
);
printf
(
"
\n
"
);
RELEASE_ASSERT
(
0
,
"deopt is currently broken..."
);
FrameStackState
frame_state
=
getFrameStackState
();
auto
execution_point
=
getExecutionPoint
();
...
...
test/tests/deopt_generator_tests.py
View file @
053a23d6
# skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
...
...
test/tests/deopt_namescope_tests.py
View file @
053a23d6
# skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
...
...
test/tests/deopt_tests.py
View file @
053a23d6
# skip-if: '-O' in EXTRA_JIT_ARGS
# expected: statfail
# statcheck: 4 <= noninit_count('num_deopt') < 50
# statcheck: 1 <= stats["num_osr_exits"] <= 2
...
...
@@ -81,3 +82,25 @@ def main():
if
i
==
1500
:
c
.
pid
=
1.0
main
()
# This test tries to OSR up to the highest tier and then deopt from there:
def
test_deopt_from_maximal
(
C
):
c
=
C
()
c
.
a
=
1
def
f
(
c
):
n
=
1000000
while
n
:
c
.
a
n
-=
1
f
(
c
)
c
.
a
=
None
f
(
c
)
# Test for both old-style and new-style classes:
class
C
:
pass
class
D
(
object
):
pass
test_deopt_from_maximal
(
C
)
test_deopt_from_maximal
(
D
)
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