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
b2a5d2b3
Commit
b2a5d2b3
authored
Jan 21, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I think this test is still working fine, but needs to have one of the limits bumped
parent
b68b8da7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+4
-0
test/tests/callattr.py
test/tests/callattr.py
+2
-1
No files found.
src/runtime/objmodel.cpp
View file @
b2a5d2b3
...
...
@@ -2155,6 +2155,10 @@ extern "C" Box* callattr(Box* obj, const std::string* attr, CallattrFlags flags,
int
num_orig_args
=
4
+
std
::
min
(
4
,
npassed_args
);
if
(
argspec
.
num_keywords
)
num_orig_args
++
;
// Uncomment this to help debug if callsites aren't getting rewritten:
// printf("Slowpath call: %p (%s.%s)\n", __builtin_return_address(0), obj->cls->tp_name, attr->c_str());
std
::
unique_ptr
<
Rewriter
>
rewriter
(
Rewriter
::
createRewriter
(
__builtin_extract_return_addr
(
__builtin_return_address
(
0
)),
num_orig_args
,
"callattr"
));
Box
*
rtn
;
...
...
test/tests/callattr.py
View file @
b2a5d2b3
...
...
@@ -3,7 +3,8 @@
# but calling an attribute is such a common case that we special case it as a callattr(),
# which avoids the allocation/immediate deallocation of the instancemethod object.
# statcheck: noninit_count('num_instancemethods') <= 10
# statcheck: noninit_count('slowpath_callattr') <= 100
# statcheck: noninit_count('slowpath_callattr') <= 120
class
C
(
object
):
def
foo
(
self
,
a0
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
a7
):
print
"foo"
,
a0
,
a1
,
a2
,
a3
,
a4
,
a5
,
a6
,
a7
...
...
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