diff --git a/Makefile b/Makefile index 48b15eb9..16f9749f 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ LIBS = $(sort $(notdir $(patsubst %/Makefile,%,$(wildcard src/libs/kpunch/*/Makefile)))) CORE_LIBS = libdvx libtasks -.PHONY: all clean $(LIBS) loader widgets apps tools installer dist deploy-helpsrc compile-help deploy-sdk test test-quick test-asan test-host test-samples coverage +.PHONY: all clean $(LIBS) loader widgets apps tools installer dist deploy-helpsrc compile-help deploy-sdk test test-quick test-asan test-host test-modules test-samples coverage bench bench-compare # Every build ends by making the release media in dist/ (a second or # two), so dist/ always holds the latest DVX. @@ -85,8 +85,9 @@ deploy-helpsrc: $(LIBS) widgets apps tools # Host-side tests. Every suite is native gcc; the GUI suites build # obj/host/libdvx.a, the widget .so files and libdvxtest.a themselves # (sanitizers on by default, SAN=1). -# make test -- everything: BASIC harnesses + fuzz, sample goldens, -# proxy build, all host suites, tools goldens, lint gate +# make test -- everything: DOS module symbol check, BASIC +# harnesses + fuzz, sample goldens, proxy build, all +# host suites, tools goldens, lint gate # make test-quick -- same minus the fuzzers, static analyzer and tools # make test-asan -- BASIC harnesses rebuilt under ASan/UBSan plus the # host suites (which are already sanitized) @@ -96,6 +97,7 @@ DVXBASIC_DIR = src/apps/kpunch/dvxbasic include src/test/suites.mk test: apps + $(MAKE) test-modules $(MAKE) -C $(DVXBASIC_DIR) tests $(MAKE) -C src/tools/proxy $(MAKE) test-samples @@ -104,12 +106,14 @@ test: apps $(MAKE) -C src/test/lint test-quick: apps + $(MAKE) test-modules $(MAKE) -C $(DVXBASIC_DIR) tests FUZZ_N=0 $(MAKE) test-samples $(MAKE) test-host $(MAKE) -C src/test/lint style ascii test-asan: apps + $(MAKE) test-modules $(MAKE) -C $(DVXBASIC_DIR) tests TESTSAN=1 $(MAKE) test-host @@ -121,6 +125,28 @@ test-host: test-samples: src/test/samples/runSamples.sh +# Every unresolved symbol of every built DOS module (bin/ .lib .wgt .drv +# .app .dxe, plus the BASIC stub that compiled programs are made from) must +# be exported by dvx.exe or by a module loaded before it, or dlopen() fails +# on DOS (src/test/shell/checkDxeExports.sh, src/test/tools/checkModules.py). +# Builds every module first so the check sees the current binaries. +BASIC_STUB = obj/dvxbasic/basstub.app + +test-modules: $(LIBS) loader widgets apps + src/test/shell/checkDxeExports.sh . $(BASIC_STUB) + +# BASIC compiler / VM benchmarks (src/test/basic/basBench.c, programs in +# src/test/basic/bench): results in obj/test/bench/results.txt; +# bench-compare shows the change from BENCH_OLD (default the Phase 0 +# baseline, src/test/basic/bench/baseline.txt) to BENCH_NEW (default the +# last make bench). BENCH_ARGS passes basBench options (-runs N, -profile, +# -filter NAME). +bench: + $(MAKE) -C src/test/basic bench + +bench-compare: + $(MAKE) -C src/test/basic bench-compare $(if $(BENCH_OLD),BENCH_OLD=$(abspath $(BENCH_OLD))) $(if $(BENCH_NEW),BENCH_NEW=$(abspath $(BENCH_NEW))) + # The real DOS build in an emulator (src/test/dos/runDos.sh; not part of # make test). EMULATOR=86box (default) or dosbox; SCRIPTS= a subset. test-dos: all diff --git a/docs/dvx_basic_reference.html b/docs/dvx_basic_reference.html index 58984ffc..f4728798 100644 --- a/docs/dvx_basic_reference.html +++ b/docs/dvx_basic_reference.html @@ -97,6 +97,8 @@ img { max-width: 100%; }
  • Form and Control Statements
  • Objects and Class Modules
  • @@ -179,6 +181,7 @@ img { max-width: 100%; }
  • App.Config
  • App.Data
  • App.Path
  • +
  • ARRAY
  • ASC
  • ATN
  • Attribute
  • @@ -192,6 +195,7 @@ img { max-width: 100%; }
  • Breakpoints
  • Breakpoints Window
  • Button
  • +
  • Byte
  • BYVAL
  • CALL
  • Call Stack
  • @@ -201,6 +205,8 @@ img { max-width: 100%; }
  • CASE
  • CASE ELSE
  • CBOOL
  • +
  • CBYTE
  • +
  • CCUR
  • CDATE
  • CDBL
  • Changes
  • @@ -271,6 +277,7 @@ img { max-width: 100%; }
  • CSNG
  • CSRLIN
  • CSTR
  • +
  • Currency
  • CurrentX
  • CurrentY
  • CursorLine
  • @@ -309,6 +316,10 @@ img { max-width: 100%; }
  • DECLARE LIBRARY
  • DEF FN
  • Default Member
  • +
  • Default Properties
  • +
  • Default Property
  • +
  • DEFBYTE
  • +
  • DEFCUR
  • DEFDBL
  • DEFINT
  • DEFLNG
  • @@ -348,6 +359,7 @@ img { max-width: 100%; }
  • END SELECT
  • END SUB
  • END TYPE
  • +
  • END WITH
  • ENUM
  • ENVIRON$
  • EOF
  • @@ -355,7 +367,16 @@ img { max-width: 100%; }
  • ERASE
  • ERL
  • ERR
  • +
  • Err
  • +
  • Err.Clear
  • +
  • Err.Description
  • +
  • Err.Number
  • +
  • Err.Raise
  • +
  • Err.Source
  • ERROR
  • +
  • ERROR$
  • +
  • Event
  • +
  • EVENT
  • Event Handlers
  • Events
  • Exit
  • @@ -370,6 +391,7 @@ img { max-width: 100%; }
  • False
  • File Attributes
  • File Menu
  • +
  • FILEATTR
  • FILECOPY
  • FillColor
  • FillStyle
  • @@ -397,6 +419,8 @@ img { max-width: 100%; }
  • Frame rate
  • FRAMEWAIT
  • FREEFILE
  • +
  • FRIEND
  • +
  • Friend
  • FRM
  • Full screen
  • FULLSCREEN
  • @@ -406,6 +430,9 @@ img { max-width: 100%; }
  • GameKeyDown
  • GET
  • GETATTR
  • +
  • GETBLUE
  • +
  • GETGREEN
  • +
  • GETRED
  • GOSUB
  • GOTO
  • GoToLine
  • @@ -429,6 +456,8 @@ img { max-width: 100%; }
  • ImageButton
  • Immediate Window
  • IMP
  • +
  • Implements
  • +
  • IMPLEMENTS
  • Include Libraries
  • Index Property
  • INI
  • @@ -444,6 +473,7 @@ img { max-width: 100%; }
  • INSTRREV
  • INT
  • Integer
  • +
  • Interface
  • Interval
  • Invalid use of Null
  • IS
  • @@ -466,18 +496,22 @@ img { max-width: 100%; }
  • Keyboard Shortcuts
  • KILL
  • Label
  • +
  • Labels
  • Late Binding
  • LBOUND
  • LCASE$
  • LEFT$
  • LEN
  • LET
  • +
  • Light pen
  • +
  • LIKE
  • Line
  • LINE (graphics)
  • LINE INPUT
  • LINE INPUT
  • Line method
  • Line Numbers
  • +
  • Line Numbers
  • LineNumbers
  • ListBox
  • ListCount
  • @@ -485,6 +519,7 @@ img { max-width: 100%; }
  • ListView
  • LOAD
  • Load
  • +
  • LOADPICTURE
  • LOC
  • Locals Window
  • LOCATE
  • @@ -511,6 +546,7 @@ img { max-width: 100%; }
  • Migration
  • Min
  • MINUTE
  • +
  • Missing
  • MKDIR
  • MOD
  • MONTH
  • @@ -542,6 +578,9 @@ img { max-width: 100%; }
  • MusicStop
  • MusicVolume
  • NAME
  • +
  • Name Resolution
  • +
  • Named Arguments
  • +
  • Names
  • net.bas
  • NEW
  • New Class Module
  • @@ -557,6 +596,7 @@ img { max-width: 100%; }
  • Objects
  • OCT$
  • ON ERROR
  • +
  • ON ERROR RESUME NEXT
  • ON GOSUB
  • ON GOTO
  • OPEN
  • @@ -573,11 +613,15 @@ img { max-width: 100%; }
  • OR
  • Output Window
  • PAINT
  • +
  • Paint event
  • PaintPicture
  • PALETTE
  • PALETTE USING
  • PARAMARRAY
  • Paste
  • +
  • PCOPY
  • +
  • PEN
  • +
  • PEN ON
  • Picture
  • PictureBox
  • PLAY
  • @@ -586,6 +630,7 @@ img { max-width: 100%; }
  • PlayTone
  • PlayWave
  • PlayWaveLoop
  • +
  • PMAP
  • POINT
  • Point method
  • POS
  • @@ -621,9 +666,13 @@ img { max-width: 100%; }
  • PSet method
  • PUBLIC
  • PUT
  • +
  • QBCOLOR
  • Radio Button
  • +
  • RaiseEvent
  • +
  • RAISEEVENT
  • RANDOMIZE
  • RANDOMIZE TIMER
  • +
  • Raster Operations
  • READ
  • RealMode
  • RecordSource
  • @@ -635,18 +684,21 @@ img { max-width: 100%; }
  • Remove File
  • RemoveControl
  • RemoveItem
  • +
  • Rename File
  • REPL
  • Replace
  • Replace
  • REPLACE$
  • ReplaceAll
  • Reposition
  • +
  • RESET
  • Resizable
  • resource.bas
  • RESTORE
  • RESUME
  • RESUME NEXT
  • RETURN
  • +
  • RGB
  • RIGHT$
  • RMDIR
  • RND
  • @@ -661,10 +713,17 @@ img { max-width: 100%; }
  • Save File
  • Save on Run
  • Save Project
  • +
  • Scale
  • ScaleHeight
  • +
  • ScaleLeft
  • +
  • ScaleMode
  • +
  • ScaleTop
  • ScaleWidth
  • +
  • ScaleX
  • +
  • ScaleY
  • SCREEN
  • SCREEN function
  • +
  • Screen pages
  • Scrollable Container
  • ScrollPane
  • Search
  • @@ -801,6 +860,7 @@ img { max-width: 100%; }
  • Variant
  • VARIANT
  • Variant Type
  • +
  • VARPTR$
  • VARTYPE
  • VB_Name
  • VB_UserMemId
  • @@ -809,12 +869,18 @@ img { max-width: 100%; }
  • vbAutomatic
  • vbBeginDrag
  • vbBinaryCompare
  • +
  • vbBlack
  • +
  • vbBlue
  • vbBoolean
  • +
  • vbByte
  • vbCancel
  • +
  • vbCentimeters
  • vbCFText
  • vbCFText
  • +
  • vbCharacters
  • vbCritical
  • vbCurrency
  • +
  • vbCyan
  • vbDataObject
  • vbDate
  • vbDirectory
  • @@ -828,12 +894,18 @@ img { max-width: 100%; }
  • vbFirstFullWeek
  • vbFirstJan1
  • vbFriday
  • +
  • vbGreen
  • vbHidden
  • +
  • vbHimetric
  • +
  • vbHimetric
  • +
  • vbInches
  • vbInformation
  • vbInteger
  • vbLeave
  • vbLong
  • +
  • vbMagenta
  • vbManual
  • +
  • vbMillimeters
  • vbModal
  • vbMonday
  • vbNo
  • @@ -846,30 +918,41 @@ img { max-width: 100%; }
  • vbOKOnly
  • vbOver
  • VBox
  • +
  • vbPicTypeBitmap
  • +
  • vbPicTypeNone
  • +
  • vbPixels
  • +
  • vbPoints
  • vbQuestion
  • vbReadOnly
  • +
  • vbRed
  • vbRetry
  • vbRetryCancel
  • vbSaturday
  • vbSingle
  • +
  • vbSrcCopy
  • vbString
  • vbSunday
  • vbSystem
  • vbTextCompare
  • vbThursday
  • vbTuesday
  • +
  • vbTwips
  • vbUseCompareOption
  • +
  • vbUser
  • vbUserDefinedType
  • vbUseSystem
  • vbUseSystemDayOfWeek
  • vbVariant
  • vbWednesday
  • +
  • vbWhite
  • +
  • vbYellow
  • vbYes
  • vbYesNo
  • vbYesNoCancel
  • Vertical Layout
  • VIEW
  • View Menu
  • +
  • VIEW PRINT
  • Visual Basic
  • VT100
  • Watch Expressions
  • @@ -881,10 +964,16 @@ img { max-width: 100%; }
  • WHILE
  • Widget Palette
  • WIDTH
  • +
  • WIDTH #
  • +
  • WIDTH LPRINT
  • WINDOW
  • Window
  • Window Menu
  • With
  • +
  • WITH
  • +
  • WITH...END WITH
  • +
  • WithEvents
  • +
  • WITHEVENTS
  • WrapBox
  • WRITE #
  • WYSIWYG
  • @@ -953,6 +1042,7 @@ img { max-width: 100%; } --- Make Executable... Compile the project and save it as a standalone .app file. Prompts for a debug or release build. --- + Rename File... Give the file selected in the Project Explorer a new name, on disk and in the project. See Renaming a File under Project System. Remove File Remove the selected file from the project (prompts to save if modified). --- Exit Close the IDE (prompts to save unsaved changes). @@ -1090,9 +1180,10 @@ img { max-width: 100%; }

    Object and Function Dropdowns

    At the top of the Code Editor are two dropdown lists:

    +

    A WithEvents variable (Dim WithEvents acct As Account, also Private or Public, in a module, a form or a class module) is listed as an object; its events are the ones its class module declares with Event. Picking one of them creates the handler acct_EventName with the event's own parameters, so it matches what the class raises. Selecting the variable when it has no handler yet creates the handler for the class's first event, as a control's default event is created.

    The editor shows one procedure at a time. Each procedure has its own buffer, and switching between them is instantaneous. The (General) section contains module-level declarations and code.

    Text outside the procedure being shown is never lost: lines typed above or below the SUB move to (General), a second SUB typed into the buffer becomes a procedure of its own, and a procedure whose SUB line was deleted becomes (General) text. When you leave an event handler that was generated and never edited it is removed; empty SUBs and FUNCTIONs you wrote yourself are kept. After a save the editor shows exactly what was stored (blank lines around a procedure are normalized). A section too large for the editor opens read-only, with a message in the status bar.

    Syntax Highlighting

    @@ -1104,8 +1195,9 @@ img { max-width: 100%; } Types INTEGER, LONG, SINGLE, DOUBLE, STRING, BOOLEAN, DATE, VARIANT, OBJECT, COLLECTION, TRUE, FALSE, NOTHING, EMPTY, NULL Strings "Hello, World!" Comments ' This is a comment, REM This is a comment - Numbers 42, 3.14, &HFF + Numbers 42, 3.14, &HFF, date literals such as #2026-09-30# and #1/15/2026 10:30 AM# Operators =, <, >, +, -, *, /, \, & +

    Date literals are colored as numbers only when they are real dates, as the compiler reads them; the # of a file number (CLOSE #1) is not. Some words are colored like keywords without being reserved -- built-in type names, Empty, Null, EACH, EVENT, WITHEVENTS, and the console and graphics statements such as CLS, LOCATE, COLOR, SCREEN, PSET, CIRCLE, PAINT, PCOPY and PMAP. A program may use them as its own names, and after a dot (Text1.Width, Picture1.Point) they are shown as ordinary names.

    Editor Features

    A new class module starts with these header lines:

    VERSION DVX 1.00 CLASS
    @@ -1326,7 +1422,7 @@ Option Explicit
    Name Variable name (internal mangled names like static variable placeholders are filtered out). Type Data type: Integer, Long, Single, Double, String, Boolean, Date, Variant, Array, UDT, or the type of object. Array types show the element type (e.g., Integer()). Value Current value. Strings are shown in quotes. Booleans as True/False. Arrays show bounds and element count (e.g., Integer(0 To 9) [10]). Uninitialized arrays show (uninitialized). -

    Variants show the value they currently hold, or Empty or Null. Object variables show Nothing, or which object they refer to: the class name of a class instance, a Collection with its number of items, or the form or control.

    +

    Variants show the value they currently hold, or Empty or Null; an OPTIONAL Variant parameter the caller left out shows Missing. Object variables show Nothing, or which object they refer to: the class name of a class instance, a Collection with its number of items, or the form or control.

    The Locals window displays: