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
eb4e7951
Commit
eb4e7951
authored
Nov 05, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add documentation for TrackingVRegPtr and delete BST_FunctionDef and BST_ClassDef nodes
parent
1138c9b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
src/core/cfg.cpp
src/core/cfg.cpp
+6
-0
src/runtime/types.cpp
src/runtime/types.cpp
+3
-0
No files found.
src/core/cfg.cpp
View file @
eb4e7951
...
@@ -36,6 +36,12 @@
...
@@ -36,6 +36,12 @@
//#define VERBOSITY(x) 2
//#define VERBOSITY(x) 2
namespace
pyston
{
namespace
pyston
{
// This class helps keeping track of the memory locations of vregs inside the bytecode by storing them as offsets from
// the start of the bytecode if the address is inside the bytecode otherwise it is just stored as a regular pointer.
// We can't directly keep track of the locations with normal pointers because during bytecode emission the memory
// location grows several times which will move around the memory location.
// TODO: all vreg locations should be inside the bytecode but currently we still emit a few references to outside vregs
// for the BST_ClassDef and BST_FunctionDef nodes. We should try to remove them.
class
TrackingVRegPtr
{
class
TrackingVRegPtr
{
private:
private:
union
{
union
{
...
...
src/runtime/types.cpp
View file @
eb4e7951
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "codegen/ast_interpreter.h"
#include "codegen/ast_interpreter.h"
#include "codegen/entry.h"
#include "codegen/entry.h"
#include "codegen/unwinding.h"
#include "codegen/unwinding.h"
#include "core/bst.h"
#include "core/options.h"
#include "core/options.h"
#include "core/stats.h"
#include "core/stats.h"
#include "core/types.h"
#include "core/types.h"
...
@@ -4054,6 +4055,8 @@ void CodeConstants::dealloc() const {
...
@@ -4054,6 +4055,8 @@ void CodeConstants::dealloc() const {
owned_refs
.
clear
();
owned_refs
.
clear
();
for
(
auto
&&
e
:
funcs_and_classes
)
{
for
(
auto
&&
e
:
funcs_and_classes
)
{
Py_DECREF
(
e
.
second
);
Py_DECREF
(
e
.
second
);
assert
(
e
.
first
->
type
()
==
BST_TYPE
::
FunctionDef
||
e
.
first
->
type
()
==
BST_TYPE
::
ClassDef
);
delete
[]
e
.
first
;
}
}
funcs_and_classes
.
clear
();
funcs_and_classes
.
clear
();
}
}
...
...
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