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
04c38db9
Commit
04c38db9
authored
Jul 13, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #691 from toshok/gcc-4.8-fix
use inline functions instead of casting function pointers
parents
ec6f626b
d69886d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
16 deletions
+31
-16
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+31
-16
No files found.
src/runtime/objmodel.cpp
View file @
04c38db9
...
@@ -86,14 +86,20 @@ void REWRITE_ABORTED(const char* reason) {
...
@@ -86,14 +86,20 @@ void REWRITE_ABORTED(const char* reason) {
#define REWRITE_ABORTED(reason) ((void)(reason))
#define REWRITE_ABORTED(reason) ((void)(reason))
#endif
#endif
static
Box
*
(
*
runtimeCallInternal0
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
)
static
inline
Box
*
runtimeCallInternal0
(
Box
*
obj
,
CallRewriteArgs
*
rewrite_args
,
ArgPassSpec
argspec
)
{
=
(
Box
*
(
*
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
))
runtimeCallInternal
;
return
runtimeCallInternal
(
obj
,
rewrite_args
,
argspec
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
static
Box
*
(
*
runtimeCallInternal1
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
)
}
=
(
Box
*
(
*
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
))
runtimeCallInternal
;
static
inline
Box
*
runtimeCallInternal1
(
Box
*
obj
,
CallRewriteArgs
*
rewrite_args
,
ArgPassSpec
argspec
,
Box
*
arg1
)
{
static
Box
*
(
*
runtimeCallInternal2
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
)
return
runtimeCallInternal
(
obj
,
rewrite_args
,
argspec
,
arg1
,
NULL
,
NULL
,
NULL
,
NULL
);
=
(
Box
*
(
*
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
))
runtimeCallInternal
;
}
static
Box
*
(
*
runtimeCallInternal3
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
,
Box
*
)
static
inline
Box
*
runtimeCallInternal2
(
Box
*
obj
,
CallRewriteArgs
*
rewrite_args
,
ArgPassSpec
argspec
,
Box
*
arg1
,
=
(
Box
*
(
*
)(
Box
*
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
,
Box
*
))
runtimeCallInternal
;
Box
*
arg2
)
{
return
runtimeCallInternal
(
obj
,
rewrite_args
,
argspec
,
arg1
,
arg2
,
NULL
,
NULL
,
NULL
);
}
static
inline
Box
*
runtimeCallInternal3
(
Box
*
obj
,
CallRewriteArgs
*
rewrite_args
,
ArgPassSpec
argspec
,
Box
*
arg1
,
Box
*
arg2
,
Box
*
arg3
)
{
return
runtimeCallInternal
(
obj
,
rewrite_args
,
argspec
,
arg1
,
arg2
,
arg3
,
NULL
,
NULL
);
}
bool
checkClass
(
LookupScope
scope
)
{
bool
checkClass
(
LookupScope
scope
)
{
return
(
scope
&
CLASS_ONLY
)
!=
0
;
return
(
scope
&
CLASS_ONLY
)
!=
0
;
...
@@ -101,14 +107,23 @@ bool checkClass(LookupScope scope) {
...
@@ -101,14 +107,23 @@ bool checkClass(LookupScope scope) {
bool
checkInst
(
LookupScope
scope
)
{
bool
checkInst
(
LookupScope
scope
)
{
return
(
scope
&
INST_ONLY
)
!=
0
;
return
(
scope
&
INST_ONLY
)
!=
0
;
}
}
static
Box
*
(
*
callattrInternal0
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
)
=
(
Box
*
(
*
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
))
callattrInternal
;
static
inline
Box
*
callattrInternal0
(
Box
*
obj
,
BoxedString
*
attr
,
LookupScope
scope
,
CallRewriteArgs
*
rewrite_args
,
static
Box
*
(
*
callattrInternal1
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
)
ArgPassSpec
argspec
)
{
=
(
Box
*
(
*
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
))
callattrInternal
;
return
callattrInternal
(
obj
,
attr
,
scope
,
rewrite_args
,
argspec
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
static
Box
*
(
*
callattrInternal2
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
)
}
=
(
Box
*
(
*
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
))
callattrInternal
;
static
inline
Box
*
callattrInternal1
(
Box
*
obj
,
BoxedString
*
attr
,
LookupScope
scope
,
CallRewriteArgs
*
rewrite_args
,
static
Box
*
(
*
callattrInternal3
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
,
Box
*
)
ArgPassSpec
argspec
,
Box
*
arg1
)
{
=
(
Box
*
(
*
)(
Box
*
,
BoxedString
*
,
LookupScope
,
CallRewriteArgs
*
,
ArgPassSpec
,
Box
*
,
Box
*
,
Box
*
))
callattrInternal
;
return
callattrInternal
(
obj
,
attr
,
scope
,
rewrite_args
,
argspec
,
arg1
,
NULL
,
NULL
,
NULL
,
NULL
);
}
static
inline
Box
*
callattrInternal2
(
Box
*
obj
,
BoxedString
*
attr
,
LookupScope
scope
,
CallRewriteArgs
*
rewrite_args
,
ArgPassSpec
argspec
,
Box
*
arg1
,
Box
*
arg2
)
{
return
callattrInternal
(
obj
,
attr
,
scope
,
rewrite_args
,
argspec
,
arg1
,
arg2
,
NULL
,
NULL
,
NULL
);
}
static
inline
Box
*
callattrInternal3
(
Box
*
obj
,
BoxedString
*
attr
,
LookupScope
scope
,
CallRewriteArgs
*
rewrite_args
,
ArgPassSpec
argspec
,
Box
*
arg1
,
Box
*
arg2
,
Box
*
arg3
)
{
return
callattrInternal
(
obj
,
attr
,
scope
,
rewrite_args
,
argspec
,
arg1
,
arg2
,
arg3
,
NULL
,
NULL
);
}
#if STAT_TIMERS
#if STAT_TIMERS
static
uint64_t
*
pyhasher_timer_counter
=
Stats
::
getStatCounter
(
"us_timer_PyHasher"
);
static
uint64_t
*
pyhasher_timer_counter
=
Stats
::
getStatCounter
(
"us_timer_PyHasher"
);
...
...
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