*fixed a wrong scope processing bug when resetting interpreter.

This commit is contained in:
Wang Renxin 2018-12-31 16:13:06 +08:00
parent 0c6c9a5fd9
commit 67353d1da8
11 changed files with 40 additions and 15 deletions

View File

@ -1,3 +1,6 @@
Dec. 31 2018
Fixed a wrong scope processing bug when resetting interpreter
Nov. 10 2018
Fixed a mod by zero bug with real number

View File

@ -1,6 +1,6 @@
The MIT License
Copyright (C) 2011 - 2018 Wang Renxin
Copyright (C) 2011 - 2019 Wang Renxin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

View File

@ -5,7 +5,7 @@
|_|_|_| |_| |_____|__|__|_____|_____|_____|
~~~~~~~~~~
**Copyright (C) 2011 - 2018 Wang Renxin**
**Copyright (C) 2011 - 2019 Wang Renxin**
[![Build status](https://travis-ci.org/paladin-t/my_basic.svg?branch=master)](https://travis-ci.org/paladin-t/my_basic)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

View File

@ -3,7 +3,7 @@
**
** For the latest info, see https://github.com/paladin-t/my_basic/
**
** Copyright (C) 2011 - 2018 Wang Renxin
** Copyright (C) 2011 - 2019 Wang Renxin
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
@ -12231,6 +12231,8 @@ int mb_reset(struct mb_interpreter_t** s, bool_t clrf) {
if(!s || !(*s))
return MB_FUNC_ERR;
(*s)->valid = false;
(*s)->run_count = 0;
(*s)->has_run = false;
(*s)->jump_set = _JMP_NIL;
@ -12291,6 +12293,8 @@ int mb_reset(struct mb_interpreter_t** s, bool_t clrf) {
result = _open_constant(*s);
mb_assert(MB_FUNC_OK == result);
(*s)->valid = true;
return result;
}

View File

@ -3,7 +3,7 @@
**
** For the latest info, see https://github.com/paladin-t/my_basic/
**
** Copyright (C) 2011 - 2018 Wang Renxin
** Copyright (C) 2011 - 2019 Wang Renxin
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!--
COPYRIGHT 2011 - 2018 WANG RENXIN. ALL RIGHTS REESERVED.
COPYRIGHT 2011 - 2019 WANG RENXIN. ALL RIGHTS REESERVED.
LIST OF DONORS.
-->
<html>
@ -10,19 +10,21 @@ LIST OF DONORS.
<title>Donate to MY-BASIC</title>
<style type="text/css">
body {
background-color: #789; margin: 0;
padding: 0; font: 14px Helvetica, Arial, sans-serif;
margin: 0; padding: 0;
background-color: #789;
font: 14px Helvetica, Arial, sans-serif;
}
div.content {
width: 600px; margin: 2em auto; padding: 20px 50px;
background-color: #fff; border-radius: 1em;
border-radius: 1em;
background-color: #fff;
}
a:link, a:visited { color: #69c; text-decoration: none; }
@media (max-width: 700px) {
body { background-color: #fff; }
div.content {
width: auto; margin: 0 auto; border-radius: 0;
padding: 1em;
width: auto; margin: 0 auto; padding: 1em;
border-radius: 0;
}
}
</style>
@ -113,6 +115,6 @@ LIST OF DONORS.
<a href="https://github.com/paladin-t/my_basic">BACK TO MY-BASIC</a>
</p>
</div>
<p align="center">Copyright (C) 2011 - 2018 Wang Renxin. All rights reserved.</p>
<p align="center">Copyright (C) 2011 - 2019 Wang Renxin. All rights reserved.</p>
</body>
</html>

View File

@ -101,7 +101,7 @@
03F4D7221A1D0081009F920C /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "Wang Renxin";
TargetAttributes = {
03F4D7291A1D0081009F920C = {
@ -147,14 +147,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -191,14 +199,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

Binary file not shown.

Binary file not shown.

View File

@ -57,7 +57,7 @@
VALUE "FileDescription", "MY-BASIC Interpreter for Windows"
VALUE "FileVersion", "1, 2, 0, 0"
VALUE "InternalName", "my_basic"
VALUE "LegalCopyright", "Copyright (C) 2011 - 2018 Wang Renxin"
VALUE "LegalCopyright", "Copyright (C) 2011 - 2019 Wang Renxin"
VALUE "LegalTrademarks", "MY-BASIC"
VALUE "OriginalFilename", "my_basic.exe"
VALUE "ProductName", "MY-BASIC"

View File

@ -3,7 +3,7 @@
**
** For the latest info, see https://github.com/paladin-t/my_basic/
**
** Copyright (C) 2011 - 2018 Wang Renxin
** Copyright (C) 2011 - 2019 Wang Renxin
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
@ -979,7 +979,7 @@ static void _list_directory(const char* path) {
static void _show_tip(void) {
_printf("MY-BASIC Interpreter Shell - %s\n", mb_ver_string());
_printf("Copyright (C) 2011 - 2018 Wang Renxin. All Rights Reserved.\n");
_printf("Copyright (C) 2011 - 2019 Wang Renxin. All Rights Reserved.\n");
_printf("For more information, see https://github.com/paladin-t/my_basic/.\n");
_printf("Input HELP and hint enter to view help information.\n");
}