Making [IF] [THEN] work at console, bumping version.
This commit is contained in:
2
Makefile
2
Makefile
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
VERSION=7.0.7.4
|
||||
VERSION=7.0.7.5
|
||||
STABLE_VERSION=7.0.6.19
|
||||
OLD_STABLE_VERSION=7.0.5.4
|
||||
REVISION=$(shell git rev-parse HEAD | head -c 20)
|
||||
|
||||
@ -15,9 +15,12 @@
|
||||
( Interpret time conditionals )
|
||||
|
||||
: DEFINED? ( "name" -- xt|0 )
|
||||
bl parse find state @ if aliteral then ; immediate
|
||||
begin bl parse dup 0= while 2drop refill 0= throw repeat
|
||||
find state @ if aliteral then ; immediate
|
||||
defer [SKIP]
|
||||
: [THEN] ; : [ELSE] [SKIP] ; : [IF] 0= if [SKIP] then ;
|
||||
: [THEN] ; immediate
|
||||
: [ELSE] [SKIP] ; immediate
|
||||
: [IF] 0= if [SKIP] then ; immediate
|
||||
: [SKIP]' 0 begin postpone defined? dup if
|
||||
dup ['] [IF] = if swap 1+ swap then
|
||||
dup ['] [ELSE] = if swap dup 0 <= if 2drop exit then swap then
|
||||
|
||||
@ -109,6 +109,9 @@ static cell_t same(const char *a, const char *b, cell_t len) {
|
||||
}
|
||||
|
||||
static cell_t find(const char *name, cell_t len) {
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
}
|
||||
for (cell_t ***voc = g_sys->context; *voc; ++voc) {
|
||||
cell_t xt = (cell_t) **voc;
|
||||
while (xt) {
|
||||
|
||||
@ -117,6 +117,9 @@ function BUILTIN_CODE(i) {
|
||||
}
|
||||
|
||||
function Find(name) {
|
||||
if (name.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
name = name.toUpperCase();
|
||||
var raw = unescape(encodeURIComponent(name));
|
||||
for (var voc = i32[g_sys_context>>2]; i32[voc>>2]; voc += 4) {
|
||||
|
||||
Reference in New Issue
Block a user