Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 8cc6cfa

Browse files
Merge branch 'develop' of https://github.com/runrev/livecode into develop-gyp
Conflicts: ide toolchain/lc-compile/src/bind.g toolchain/lc-compile/src/emit.cpp toolchain/lc-compile/src/generate.g
2 parents 45f8976 + 2d03812 commit 8cc6cfa

40 files changed

+748
-502
lines changed

docs/lcb/notes/14991.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LiveCode Builder Language
2+
## Syntax
3+
4+
* `use` declarations may now occur anywhere in a module's top-level
5+
context.
6+
7+
# [14991] No 'use' clauses causes random parsing errors

docs/lcb/notes/15469.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# LiveCode Builder Tools
2+
## lc-compile
3+
### Command-line interface
4+
5+
* A new `--verbose` command line flag has been added. If it is specified, **lc-compile** will output additional debugging information.

docs/notes/bugfix-15416.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Crash when building a SQLite query with out-of-bounds placeholders

docs/notes/bugfix-15432.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Filename of stack not properly handling tilde character

docs/notes/bugfix-15455.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# custom property gets truncated if it contains a NULL byte

docs/notes/bugfix-9820.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# LiveCode Server provides no POST data when Content-Type is application/x-www-form-urlencoded; charset=<...>

engine/src/cmds.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,8 @@ void MCDo::exec_ctxt(MCExecContext& ctxt)
487487
// MW-2013-11-15: [[ Bug 11277 ]] If no handler, then evaluate in context of the
488488
// server script object.
489489
Exec_stat stat;
490-
if (ep . gethandler() != nil)
491-
stat = ep.gethandler()->doscript(*epptr, line, pos);
492-
else
493-
stat = ep.gethlist()->doscript(*epptr, line, pos);
490+
stat = ep.doscript(*epptr, line, pos);
491+
494492
if (added)
495493
MCnexecutioncontexts--;
496494
return stat;
@@ -3028,4 +3026,4 @@ void MCAssertCmd::exec_ctxt(MCExecContext& ctxt)
30283026
void MCAssertCmd::compile(MCSyntaxFactoryRef ctxt)
30293027
{
30303028

3031-
}
3029+
}

engine/src/cmdse.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,13 +1294,10 @@ void MCMessage::exec_ctxt(MCExecContext &ctxt)
12941294

12951295
// MW-2011-08-11: [[ Bug 9668 ]] Make sure we copy 'pdata' if we use it, since
12961296
// mptr (into which it points) only lasts as long as this method call.
1297-
// MW-2013-11-15: [[ Bug 11277 ]] If no handler, evaluate in the context of the
1298-
// server script object.
1297+
// MW-2013-11-15: [[ Bug 11277 ]] Refactor MCHandler::eval
12991298
Exec_stat t_stat;
1300-
if (ep.gethandler() != nil)
1301-
t_stat = ep . gethandler() -> eval(ep);
1302-
else
1303-
t_stat = ep . gethlist() -> eval(ep);
1299+
t_stat = ep . eval(ep);
1300+
13041301
if (t_stat == ES_NORMAL)
13051302
newparam->set_argument(ep);
13061303
else

engine/src/dispatch.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -971,28 +971,18 @@ IO_stat MCDispatch::doreadfile(MCStringRef p_openpath, MCStringRef p_name, IO_ha
971971

972972
IO_stat MCDispatch::loadfile(MCStringRef p_name, MCStack *&sptr)
973973
{
974-
IO_handle stream;
974+
IO_handle stream;
975975
MCAutoStringRef t_open_path;
976976

977977
bool t_found;
978978
t_found = false;
979979
if (!t_found)
980980
{
981981
if ((stream = MCS_open(p_name, kMCOpenFileModeRead, True, False, 0)) != NULL)
982-
{
983-
// This should probably use resolvepath().
984-
if (MCStringGetCharAtIndex(p_name, 0) != PATH_SEPARATOR
985-
&& MCStringGetCharAtIndex(p_name, 1) != ':')
986-
{
987-
MCAutoStringRef t_curpath;
988-
989-
/* UNCHECKED */ MCS_getcurdir(&t_curpath);
990-
/* UNCHECKED */ MCStringFormat(&t_open_path, "%@/%@", *t_curpath, p_name);
991-
}
992-
else
993-
t_open_path = p_name;
994-
995-
t_found = true;
982+
{
983+
// This should probably use resolvepath().
984+
// SN-2015-06-03: [[ Bug 15432 ]] Use resolvepath
985+
t_found = MCS_resolvepath(p_name, &t_open_path);
996986
}
997987
}
998988

@@ -1007,7 +997,7 @@ IO_stat MCDispatch::loadfile(MCStringRef p_name, MCStack *&sptr)
1007997
else
1008998
t_leaf_name = p_name;
1009999
if ((stream = MCS_open(*t_leaf_name, kMCOpenFileModeRead, True, False, 0)) != NULL)
1010-
{
1000+
{
10111001
MCAutoStringRef t_curpath;
10121002
/* UNCHECKED */ MCS_getcurdir(&t_curpath);
10131003
/* UNCHECKED */ MCStringFormat(&t_open_path, "%@/%@", *t_curpath, p_name);

engine/src/exec-debugging.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void MCDebuggingExecDebugDo(MCExecContext& ctxt, MCStringRef p_script, uinteger_
7878
MCExecContext *t_ctxt_ptr;
7979
t_ctxt_ptr = MCexecutioncontexts[MCdebugcontext];
8080

81-
t_ctxt_ptr->GetHandler()->doscript(*t_ctxt_ptr, p_script, p_line, p_pos);
81+
t_ctxt_ptr->doscript(*t_ctxt_ptr, p_script, p_line, p_pos);
8282

8383
// AL-2014-03-21: [[ Bug 11940 ]] Ensure the debug context is not permanently in a state of error.
8484
t_ctxt_ptr -> IgnoreLastError();
@@ -404,7 +404,9 @@ void MCDebuggingExecAssert(MCExecContext& ctxt, int type, bool p_eval_success, b
404404

405405
// Dispatch 'assertError <handler>, <line>, <pos>, <object>'
406406
MCParameter t_handler, t_line, t_pos, t_object;
407-
t_handler.setvalueref_argument(ctxt .GetHandler() -> getname());
407+
if (ctxt . GetHandler() != NULL) {
408+
t_handler.setvalueref_argument(ctxt . GetHandler() -> getname());
409+
}
408410
t_handler.setnext(&t_line);
409411
t_line.setn_argument((real8)ctxt . GetLine());
410412
t_line.setnext(&t_pos);

0 commit comments

Comments
 (0)