mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-22 11:01:06 +00:00
Fix stack underflow exception when computing the value of an empty
block. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@36422 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1fc2e5fb63
commit
b7a0150e02
2 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,9 @@
|
||||||
return the receiver from a method without an explicit return
|
return the receiver from a method without an explicit return
|
||||||
statement.
|
statement.
|
||||||
|
|
||||||
|
* STCompiler.m (-compileStatements:blockFlag:): Return nil from an
|
||||||
|
empty block and the receiver from an empty method.
|
||||||
|
|
||||||
2013-03-24 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2013-03-24 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* STExecutionContext.h: Change type of instruction pointer attribute
|
* STExecutionContext.h: Change type of instruction pointer attribute
|
||||||
|
|
|
@ -654,6 +654,17 @@ extern int STCparse(void *context);
|
||||||
}
|
}
|
||||||
[self compileExpression:expr];
|
[self compileExpression:expr];
|
||||||
}
|
}
|
||||||
|
else if (first)
|
||||||
|
{
|
||||||
|
if (blockFlag)
|
||||||
|
{
|
||||||
|
[self emitPushNil];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self emitPushSelf];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (blockFlag)
|
if (blockFlag)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue