changed testing order for type inferral

speeds up list operations significantly, especially recursive ones such
as MAP
upd4.2
Jens Mönig 2018-03-14 08:47:59 +01:00
rodzic 60b0ce1688
commit a8337d64a7
2 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -4027,3 +4027,7 @@ Translation Updates:
* Objects: draw a "dot" pentrail when moving zero steps while the pen is down
=== v4.1.2.5 maintenance release ===
180314
------
* Threads: changed testing order for type inferral, speeds up list operations significantly

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
TableFrameMorph, ColorSlotMorph, isSnapObject*/
modules.threads = '2018-March-09';
modules.threads = '2018-March-14';
var ThreadManager;
var Process;
@ -2545,15 +2545,15 @@ Process.prototype.reportTypeOf = function (thing) {
if (thing === true || (thing === false)) {
return 'Boolean';
}
if (thing instanceof List) {
return 'list';
}
if (!isNaN(+thing)) {
return 'number';
}
if (isString(thing)) {
return 'text';
}
if (thing instanceof List) {
return 'list';
}
if (thing instanceof SpriteMorph) {
return 'sprite';
}