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
21ccf4c9
Commit
21ccf4c9
authored
Jun 18, 2015
by
Chris Toshok
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up some remaining code movement from rebases
parent
925a6bbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+20
-20
No files found.
src/codegen/ast_interpreter.cpp
View file @
21ccf4c9
...
...
@@ -55,6 +55,26 @@ namespace {
static
BoxedClass
*
astinterpreter_cls
;
class
ASTInterpreter
;
// Map from stack frame pointers for frames corresponding to ASTInterpreter::execute() to the ASTInterpreter handling
// them. Used to look up information about that frame. This is used for getting tracebacks, for CPython introspection
// (sys._getframe & co), and for GC scanning.
static
std
::
unordered_map
<
void
*
,
ASTInterpreter
*>
s_interpreterMap
;
static_assert
(
THREADING_USE_GIL
,
"have to make the interpreter map thread safe!"
);
class
RegisterHelper
{
private:
void
*
frame_addr
;
ASTInterpreter
*
interpreter
;
public:
RegisterHelper
();
~
RegisterHelper
();
void
doRegister
(
void
*
frame_addr
,
ASTInterpreter
*
interpreter
);
static
void
deregister
(
void
*
frame_addr
);
};
union
Value
{
bool
b
;
int64_t
n
;
...
...
@@ -70,20 +90,6 @@ union Value {
}
};
class
ASTInterpreter
;
class
RegisterHelper
{
private:
void
*
frame_addr
;
ASTInterpreter
*
interpreter
;
public:
RegisterHelper
();
~
RegisterHelper
();
void
doRegister
(
void
*
frame_addr
,
ASTInterpreter
*
interpreter
);
static
void
deregister
(
void
*
frame_addr
);
};
class
ASTInterpreter
:
public
Box
{
public:
typedef
ContiguousMap
<
InternedString
,
Box
*>
SymMap
;
...
...
@@ -311,12 +317,6 @@ void ASTInterpreter::initArguments(int nargs, BoxedClosure* _closure, BoxedGener
}
}
// Map from stack frame pointers for frames corresponding to ASTInterpreter::execute() to the ASTInterpreter handling
// them. Used to look up information about that frame. This is used for getting tracebacks, for CPython introspection
// (sys._getframe & co), and for GC scanning.
static
std
::
unordered_map
<
void
*
,
ASTInterpreter
*>
s_interpreterMap
;
static_assert
(
THREADING_USE_GIL
,
"have to make the interpreter map thread safe!"
);
RegisterHelper
::
RegisterHelper
()
:
frame_addr
(
NULL
),
interpreter
(
NULL
)
{
}
...
...
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