Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x-RPySOM
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mu
x-RPySOM
Commits
7355bbba
Commit
7355bbba
authored
Nov 20, 2013
by
Stefan Marr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove bytecode index from frame, handled now by interpreter only [WIP]
Signed-off-by:
Stefan Marr
<
git@stefan-marr.de
>
parent
1818766c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
src/som/interpreter/frame.py
src/som/interpreter/frame.py
+2
-9
No files found.
src/som/interpreter/frame.py
View file @
7355bbba
...
...
@@ -20,7 +20,6 @@ class Frame(object):
self
.
_context
=
context
self
.
_stack
=
[
nilObject
]
*
num_elements
self
.
_stack_pointer
=
0
self
.
_bytecode_index
=
0
self
.
_previous_frame
=
previous_frame
def
get_previous_frame
(
self
):
...
...
@@ -89,12 +88,6 @@ class Frame(object):
self
.
_stack_pointer
=
(
self
.
get_number_of_arguments
()
+
self
.
get_method
().
get_number_of_locals
().
get_embedded_integer
()
-
1
)
def
get_bytecode_index
(
self
):
return
self
.
_bytecode_index
def
set_bytecode_index
(
self
,
value
):
self
.
_bytecode_index
=
value
def
get_stack_element
(
self
,
index
):
# Get the stack element with the given index
# (an index of zero yields the top element)
...
...
@@ -143,11 +136,11 @@ class Frame(object):
for
i
in
range
(
0
,
num_args
):
self
.
_stack
[
i
]
=
frame
.
get_stack_element
(
num_args
-
1
-
i
)
def
print_stack_trace
(
self
):
def
print_stack_trace
(
self
,
bytecode_index
):
# Print a stack trace starting in this frame
from
som.vm.universe
import
std_print
,
std_println
std_print
(
self
.
get_method
().
get_holder
().
get_name
().
get_string
())
std_println
(
" %d @ %s"
%
(
self
.
get_bytecode_index
()
,
std_println
(
" %d @ %s"
%
(
bytecode_index
,
self
.
get_method
().
get_signature
().
get_string
()))
if
self
.
has_previous_frame
():
...
...
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