Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
9ebfeac1
Commit
9ebfeac1
authored
Feb 14, 2014
by
Li Yazhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep stack with nlocals instead of nregs; fix #1706
parent
ba8a8e75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
+3
-5
No files found.
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
View file @
9ebfeac1
...
...
@@ -251,8 +251,7 @@ main(int argc, char **argv)
int
n
;
mrb_bool
code_block_open
=
FALSE
;
int
ai
;
mrb_bool
first_command
=
TRUE
;
unsigned
int
nregs
;
unsigned
int
stack_keep
=
0
;
/* new interpreter instance */
mrb
=
mrb_open
();
...
...
@@ -365,12 +364,12 @@ main(int argc, char **argv)
mrb_codedump_all
(
mrb
,
proc
);
}
/* pass a proc for evaulation */
nregs
=
first_command
?
0
:
proc
->
body
.
irep
->
nregs
;
/* evaluate the bytecode */
result
=
mrb_context_run
(
mrb
,
proc
,
mrb_top_self
(
mrb
),
nregs
);
stack_keep
);
stack_keep
=
proc
->
body
.
irep
->
nlocals
;
/* did an exception occur? */
if
(
mrb
->
exc
)
{
p
(
mrb
,
mrb_obj_value
(
mrb
->
exc
),
0
);
...
...
@@ -390,7 +389,6 @@ main(int argc, char **argv)
}
mrb_parser_free
(
parser
);
cxt
->
lineno
++
;
first_command
=
FALSE
;
}
mrbc_context_free
(
mrb
,
cxt
);
mrb_close
(
mrb
);
...
...
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