From 74467c274b7a30cc0f46cfdf2dada07c218aa7e5 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sat, 18 Jan 2020 03:49:23 -0300 Subject: [PATCH] Replaces inefficient _BIT with _BYTE for InValidLine() array. --- source/ide/ide_methods.bas | 4 ++-- source/qb64.bas | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 610118e66..3c8883aa6 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -8462,7 +8462,7 @@ SUB ideshowtext IF l <= iden THEN DO UNTIL l < UBOUND(InValidLine) 'make certain we have enough InValidLine elements to cover us in case someone scrolls QB64 - REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT ' to the end of a program before the IDE has finished + REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BYTE ' to the end of a program before the IDE has finished LOOP ' verifying the code and growing the array during the IDE passes. a$ = idegetline(l) @@ -8621,7 +8621,7 @@ SUB ideshowtext COLOR 13 - IF InValidLine(l) AND 1 THEN COLOR 7: GOTO SkipSyntaxHighlighter + IF InValidLine(l) THEN COLOR 7: GOTO SkipSyntaxHighlighter IF (LEN(oldChar$) > 0 OR m = 1) AND inquote = 0 AND isKeyword = 0 THEN IF INSTR(initialNum.char$, thisChar$) > 0 AND oldChar$ <> ")" AND (INSTR(char.sep$, oldChar$) > 0 OR oldChar$ = "?") THEN diff --git a/source/qb64.bas b/source/qb64.bas index 4777910d5..63dacc26d 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -29,7 +29,7 @@ Set_OrderOfOperations REDIM EveryCaseSet(100), SelectCaseCounter AS _UNSIGNED LONG DIM ExecLevel(255), ExecCounter AS INTEGER REDIM SHARED UserDefine(1, 100) AS STRING '0 element is the name, 1 element is the string value -REDIM SHARED InValidLine(10000) AS _BIT +REDIM SHARED InValidLine(10000) AS _BYTE DIM DefineElse(255) AS _BYTE DIM SHARED UserDefineCount AS INTEGER UserDefine(0, 0) = "WINDOWS": UserDefine(0, 1) = "WIN" @@ -1569,7 +1569,7 @@ DO IF ColorConst = 0 THEN linenumber = linenumber + 1 'dont increment the line counter when adding all the color constants DO UNTIL linenumber < UBOUND(InValidLine) 'color information flag for each line - REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT + REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BYTE LOOP InValidLine(linenumber) = 0 @@ -1668,7 +1668,7 @@ DO IF ExecLevel(ExecCounter) THEN DO UNTIL linenumber < UBOUND(InValidLine) - REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BIT + REDIM _PRESERVE InValidLine(UBOUND(InValidLine) + 1000) AS _BYTE LOOP InValidLine(linenumber) = -1