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
a01643bc
Commit
a01643bc
authored
Feb 01, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xxx testing
parent
206b8a24
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
9 deletions
+20
-9
src/codegen/baseline_jit.cpp
src/codegen/baseline_jit.cpp
+1
-0
src/core/options.cpp
src/core/options.cpp
+4
-4
src/runtime/int.cpp
src/runtime/int.cpp
+5
-4
src/runtime/types.cpp
src/runtime/types.cpp
+1
-1
src/runtime/types.h
src/runtime/types.h
+3
-0
test/tests/refcount_test.py
test/tests/refcount_test.py
+6
-0
No files found.
src/codegen/baseline_jit.cpp
View file @
a01643bc
...
...
@@ -167,6 +167,7 @@ RewriterVar* JitFragmentWriter::emitAugbinop(AST_expr* node, RewriterVar* lhs, R
}
RewriterVar
*
JitFragmentWriter
::
emitBinop
(
AST_expr
*
node
,
RewriterVar
*
lhs
,
RewriterVar
*
rhs
,
int
op_type
)
{
printf
(
"lhs is %p
\n
"
,
lhs
);
/// XXX increase this too much for testing
return
emitPPCall
((
void
*
)
binop
,
{
lhs
,
rhs
,
imm
(
op_type
)
},
2
,
640
,
node
)
->
setType
(
RefType
::
OWNED
);
}
...
...
src/core/options.cpp
View file @
a01643bc
...
...
@@ -26,7 +26,7 @@ int MAX_OPT_ITERATIONS = 1;
bool
ASSEMBLY_LOGGING
=
false
;
bool
CONTINUE_AFTER_FATAL
=
false
;
bool
FORCE_INTERPRETER
=
fals
e
;
bool
FORCE_INTERPRETER
=
tru
e
;
bool
FORCE_OPTIMIZE
=
false
;
bool
SHOW_DISASM
=
false
;
bool
PROFILE
=
false
;
...
...
@@ -46,8 +46,8 @@ bool ENABLE_TRACEBACKS = true;
bool
FORCE_LLVM_CAPI_CALLS
=
false
;
bool
FORCE_LLVM_CAPI_THROWS
=
false
;
int
OSR_THRESHOLD_INTERPRETER
=
2
5
;
// XXX
int
REOPT_THRESHOLD_INTERPRETER
=
2
;
// XXX
int
OSR_THRESHOLD_INTERPRETER
=
5
;
// XXX
int
REOPT_THRESHOLD_INTERPRETER
=
5
;
// XXX
int
OSR_THRESHOLD_BASELINE
=
2500
;
int
REOPT_THRESHOLD_BASELINE
=
1500
;
int
OSR_THRESHOLD_T2
=
10000
;
...
...
@@ -57,7 +57,7 @@ int SPECULATION_THRESHOLD = 100;
int
MAX_OBJECT_CACHE_ENTRIES
=
500
;
static
bool
_GLOBAL_ENABLE
=
1
;
bool
ENABLE_ICS
=
1
&&
_GLOBAL_ENABLE
;
bool
ENABLE_ICS
=
0
&&
_GLOBAL_ENABLE
;
bool
ENABLE_ICGENERICS
=
1
&&
ENABLE_ICS
;
bool
ENABLE_ICGETITEMS
=
1
&&
ENABLE_ICS
;
bool
ENABLE_ICSETITEMS
=
1
&&
ENABLE_ICS
;
...
...
src/runtime/int.cpp
View file @
a01643bc
...
...
@@ -88,14 +88,15 @@ PyIntObject* BoxedInt::fill_free_list(void) {
}
void
BoxedInt
::
tp_dealloc
(
Box
*
v
)
{
if
(
PyInt_CheckExact
(
v
))
{
BoxedInt
::
tp_free
(
v
);
}
else
{
//
if (PyInt_CheckExact(v)) {
//
BoxedInt::tp_free(v);
//
} else {
v
->
cls
->
tp_free
(
v
);
}
//
}
}
void
BoxedInt
::
tp_free
(
void
*
b
)
{
assert
(
0
);
PyIntObject
*
v
=
static_cast
<
PyIntObject
*>
(
b
);
v
->
ob_type
=
(
struct
_typeobject
*
)
free_list
;
free_list
=
v
;
...
...
src/runtime/types.cpp
View file @
a01643bc
...
...
@@ -3761,7 +3761,7 @@ void setupRuntime() {
dict_cls
->
tp_flags
|=
Py_TPFLAGS_DICT_SUBCLASS
;
file_cls
=
new
(
0
)
BoxedClass
(
object_cls
,
0
,
offsetof
(
BoxedFile
,
weakreflist
),
sizeof
(
BoxedFile
),
false
,
"file"
,
file_dealloc
,
NULL
,
false
);
int_cls
=
new
(
0
)
BoxedClass
(
object_cls
,
0
,
0
,
sizeof
(
BoxedInt
),
false
,
"int"
,
BoxedInt
::
tp_dealloc
,
BoxedInt
::
tp_free
,
false
);
int_cls
=
new
(
0
)
BoxedClass
(
object_cls
,
0
,
0
,
sizeof
(
BoxedInt
),
false
,
"int"
,
BoxedInt
::
tp_dealloc
,
/*BoxedInt::tp_free*/
NULL
,
false
);
int_cls
->
tp_flags
|=
Py_TPFLAGS_INT_SUBCLASS
;
bool_cls
=
new
(
0
)
BoxedClass
(
int_cls
,
0
,
0
,
sizeof
(
BoxedBool
),
false
,
"bool"
,
NULL
,
NULL
,
false
);
complex_cls
=
new
(
0
)
BoxedClass
(
object_cls
,
0
,
0
,
sizeof
(
BoxedComplex
),
false
,
"complex"
,
NULL
,
NULL
,
false
);
...
...
src/runtime/types.h
View file @
a01643bc
...
...
@@ -419,6 +419,8 @@ public:
}
// int uses a customized allocator, so we can't use DEFAULT_CLASS_SIMPLE (which inlines the default allocator)
void
*
operator
new
(
size_t
size
)
__attribute__
((
visibility
(
"default"
)))
{
return
Box
::
operator
new
(
size
,
int_cls
);
/*
if (free_list == NULL) {
free_list = fill_free_list();
RELEASE_ASSERT(free_list, "");
...
...
@@ -428,6 +430,7 @@ public:
free_list = (PyIntObject*)v->ob_type;
PyObject_INIT((BoxedInt*)v, &PyInt_Type);
return v;
*/
}
static
void
tp_dealloc
(
Box
*
b
);
...
...
test/tests/refcount_test.py
0 → 100644
View file @
a01643bc
def
f
():
n
=
20
while
n
:
n
=
n
-
1
f
()
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