Commit-Graf

  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • *
  • 1acd725 (HEAD -> master) Default grammar is part of PEG VM frame. RULE2 and CALL2 change the default grammar for the duration of the rule being called. by Ian Piumarta 2024-07-10 11:32:25 +0900
  • 1bf9944 String literals make fresh copies of themselves every time they are evaluated. by Ian Piumarta 2024-07-05 17:19:32 +0900
  • 4e63df3 bench-sieve.txt repeates 200 times. by Ian Piumarta 2024-07-05 17:18:12 +0900
  • 4065107 String_append(), _appendAll(), and _format() allocate new memory to allow raw pointers to old content to persist. Add PEG operations TEST (fail if function returns false) and RULE2 (call rule in other grammar). PEG instruction's second operand is object not integer. Initialise top level state.variables with empty object in vmRun(). PEG instruction FAIL removes all actions added by its rule. by Ian Piumarta 2024-07-04 10:11:13 +0900
  • 1fbcf8f Turn off bogus compiler warnings about bounds errors when optimising. by Ian Piumarta 2024-07-04 10:10:46 +0900
  • 7e46198 Fix double-eval bug in apply(). Grow buffers by more than 1 wherever performance matters. by Ian Piumarta 2024-06-20 13:37:07 +0900
  • ea38861 vmCompile() checks that all PC destinations are in range. STRING and CLASS opcodes read the argument length from their string, ignoring the explicit length given in the program. by Ian Piumarta 2024-06-20 03:24:32 +0900
  • 1ea2557 Fix digitValue() and reading of numerical escaped characters in strings. Indexing a string always returns an unsigned char value. Add PEG VM and corresponding primitive __match__(). by Ian Piumarta 2024-06-20 02:34:32 +0900
  • c10c320 Add profiling support when compiled with PROFILE=1 and command-line option -p to enable profiling. Add [from:to] syntax for array and string slices. Fix passing of environment between primitive and user-defined __eval__ methods. by Ian Piumarta 2024-06-18 15:58:54 +0900
  • 6ae2155 Remove let keyword in front of local definition. by Ian Piumarta 2024-06-12 18:01:26 +0900
  • d6a9d2e Remove let keyword in front of local definition. by Ian Piumarta 2024-06-12 18:01:01 +0900
  • 2e94543 Enable profiling when poducing release binary. by Ian Piumarta 2024-06-12 18:00:25 +0900
  • 3d36581 Include libffi in executable. by Ian Piumarta 2024-06-02 17:47:44 +0900
  • 4b75732 Support super.id() to call method id in the delegate of the object in which the currently running method was found. Add __extern__ to support foreign function calls. by Ian Piumarta 2024-06-02 17:46:40 +0900
  • f2e790c Add String.bitSet, .bitClear, .bitInvert, bitTest, .charClass, .compareFrom. by Ian Piumarta 2024-05-30 18:07:10 +0900
  • 1fd5a0b New reference output. by Ian Piumarta 2024-05-30 18:06:08 +0900
  • e57242e Prefix 'local' constrins variables to be in current scope. Variable references, inrement operator l-values, and function definitions can all be qualified 'local' or 'global'. by Ian Piumarta 2024-05-30 14:49:20 +0900
  • 4622db9 Simplify variable lookup and implicit variable declarations. by Ian Piumarta 2024-05-29 14:22:07 +0900
  • 2983237 Object.push(x) returns self, not x. by Ian Piumarta 2024-05-29 11:05:38 +0900
  • 2171f47 Fold constants during parsing if FOLDCONST=1. by Ian Piumarta 2024-05-29 10:10:39 +0900
  • 4d396d6 Fix floating point comparison and assignment operators. by Ian Piumarta 2024-05-29 09:17:49 +0900
  • 883a9cf Remove let and ::. Add global keyword. Add Ref/Get/SetSym. Cast the 0 terminator in genericError to oop to ensure va_arg picks it up. Better error messages for broken statements in blocks and broken expressions in argument lists. by Ian Piumarta 2024-05-28 19:27:13 +0900
  • ea60878 Add exception tests. New test.txt reference output. by Ian Piumarta 2024-05-26 17:59:13 +0900
  • dcbef49 Exceptions are supported with syntax "try {} catch (e) {}", "try {} ensure {}", and "raise e". Add catch to the list of words that can end an expression statement. Most runtime errors are reported using exceptions when EXCEPTIONS=1. Add String_repeat() supporting multiplying a string and an integer. Illegal escape sequence in a string is a warning not an error. Break and continue work properly in while(). ForFromTo evaluates its start and end arguments. Rename primitive fatal() to error(). by Ian Piumarta 2024-05-26 17:58:27 +0900
  • 207ef22 Upate test reference output. by Ian Piumarta 2024-05-26 11:00:04 +0900
  • 46c7ef6 Run the first non-option command line argument as the program. Set _argv__ to program name plus any following command-line arguments. by Ian Piumarta 2024-05-26 10:58:39 +0900
  • 2fcfaa9 Primitives have a unique integer index to identify them. Add String_appendString(base, ext) with the obvious behaviour. Rename newStringEscaped -> newStringUnescaped to describe its operation not its input. Add String_escaped() to replace non-graphic characters. Add String_push() to append characters or strings. Add __primitives__ containing an array of all primitives. Add reverseString() that reverse a string in-place. Add reverseObject() that reverses an object in-place. Add reversed() that returns a reversed copy of an object or string. Fix Let_codeOn() to avoid the # in front of the variable name. Add /* ... */ syntax for multi-line, nesting comments. Add method String.new() to make a new, empty string. Add methods String.escaped(), String.unescaped(). Add method String.push() to append a character or another string. Add method String.pop() to remove and return the last character. Add methods String.asInteger(), String.asFloat(), String.asSymbol(). Provide an implementation of strnstr() for C libraries that lack it. Add method Object.includes() that searches indexable part of an object. Add method String.includes() that searches for characters or strings. Add String.sliced(start, stop) that returns a sub-string. Add method Symbol.asString(). Add method Object.findKey(). Add primitive reversed(). Add methods Symbol.getopt() and Symbol.setopt(). Add method Symbol.defined() that checks the global value, whereas the defined() primitive checks all visible bindings. Add method Symbol.define() to set the global value. Add method Symbol.value() to retrieve the global value. Add method Symbol.allInstances(). by Ian Piumarta 2024-05-23 16:43:43 +0900
  • cd992e1 Include profile guided optimisation workload. by Ian Piumarta 2024-05-21 09:13:27 +0900
  • f75c06c Target minproto-opt built with TYPECODES and DELOPT enabled. Target release profiles with -O to disable backtrace. by Ian Piumarta 2024-05-21 09:12:30 +0900
  • 09c4114 <type>.eval methods are installed in all built-in object types when TYPECODES=1. println() prints object properties in alphabetical order. by Ian Piumarta 2024-05-21 09:10:34 +0900
  • c5c29bd Add release target that uses profile guided optimisation. by Ian Piumarta 2024-05-20 08:49:14 +0900
  • 5e59fa5 Restore original benchmark size and number of repeats. by Ian Piumarta 2024-05-20 08:48:18 +0900
  • 4ac12f9 Add symbols #O, #d, #v and Symbol.setop() primitive. Add primitive method Symbol.setopt(N) to set command-line option at runtime. Add primitive method Symbol.defined() to test if a variable name has been defined. Overload primitive "+" to concatenate strings. Add stack of namespaces, initialised to empty object. refvar() and getvar() search namespaces, from most to least recent, when looking for global variables. setvar() always defines globals in the most recent namespace regardless of any existing shadowed definitions. Make OBJ::NAME a synonym for OBJ.NAME except that OBJ::NAME() applies a function whereas OBJ.NAME() invokes method NAME on OBJ. Add primitive error() to print source location, error message, and backtrace. by Ian Piumarta 2024-05-18 08:50:43 +0900
  • 2761c99 Object.dump() uses Object.allKeys() instead of Object.keys(). by Ian Piumarta 2024-05-16 11:40:21 +0900
  • 31e6d2f Primitives have correct names. Primitive Object.keys() returns properties that do not begin with "__". Add method Object.allKeys() that returns properties that do not begin with "__". Add method Object.sorted() to sort indexable elements. Add function sorted() for String and Object. Relations do not consider strings and symbols to be comparable. Printing strings does not include quotation marks at indentation levels 0 and 1. Printing strings escapes control characters at indentation levels other than 0 and 1. Rename SetVar.expr to SetVar.value to be consistent with SetProp and SetArray. Add RefVar, RefProp, RefArray that compute address of assignable value. Add Binops for autoincrement and assignment operators. Any expression can be the subject of increment or assignment operator. Enforce lvalue for increment and assignment operators by semanic check, not in syntax. String literals can contain escaped quotation marks. Keyword:value pairs in parameter lists provide arbitray expressions as default parameter values. Evaluate and assign default parameters values in apply(). by Ian Piumarta 2024-05-15 19:20:04 -0700
  • ff3dda9 Include recent results as comments. by Ian Piumarta 2024-05-15 18:38:14 -0700
  • 956adf8 Define _GNU_SOURCE to expose qsort_r(). by Ian Piumarta 2024-05-15 18:36:46 -0700
  • 9cc8c3e Top-level expressions use the value of symbol __globals__ as the base environment instead of nil. Fix off-by-1 error in nlrPush(). Object.keys() returns keys in alphabetical order. by Ian Piumarta 2024-05-14 12:16:39 +0900
  • 057733b Binary operators store pointer to implementation to avoid operator selection during eval. by Ian Piumarta 2024-05-14 06:34:30 +0900
  • 2f164a3 Use spaces instead of tabs to preserve visual alignment in broken tools. by Ian Piumarta 2024-05-14 05:14:24 +0900
  • 30facb8 Add auto increment/decrement and assignment operators. by Ian Piumarta 2024-05-14 05:13:03 +0900
  • 4d570df ForToFrom performs update step after continue. by Ian Piumarta 2024-05-12 07:58:22 +0900
  • 5ca296e Add return, break, and continue. by Ian Piumarta 2024-05-11 20:14:51 +0900
  • 5b1ec1d Test user-defined AST nodes. by Ian Piumarta 2024-05-10 03:22:30 +0900
  • 6ba66da Test user-defined AST nodes. by Ian Piumarta 2024-05-10 03:21:32 +0900
  • 57fe021 All symbols created with UNDEFINED_TYPECODE by default. AST nodes with undefined typecode are evaluated by invoking the method __eval__ on the node. Typecode is looked up in the immediate delegate of a node only. Object.__eval__() is primitive and returns self. by Ian Piumarta 2024-05-10 03:20:02 +0900
  • 82a4828 Make sieve be local, not global. by Ian Piumarta 2024-05-10 03:13:07 +0900
  • 4a959a1 Accessing an undefined variable causes a fatal error. by Ian Piumarta 2024-05-09 14:00:17 +0900
  • ddff3e4 Add "let name = value, ... ;" to create local variables. by Ian Piumarta 2024-05-09 13:38:47 +0900
  • a81312c Ignore more irrelevant stuff. by Ian Piumarta 2024-05-09 10:21:36 +0900
  • 4a3abfc Remove makeForm(). Use Closure.fixed property to change assert/refute closures into a special forms. by Ian Piumarta 2024-05-09 10:19:54 +0900
  • 3c992f4 Remove primitive makeForm (because Closure.fixed is now accessibe from userland). by Ian Piumarta 2024-05-09 10:18:28 +0900
  • 72753c6 All fields of Lambda and Closure are accessible via Object_{get,put}. by Ian Piumarta 2024-05-09 10:15:23 +0900
  • 48f7707 Ignore irrelevant files. by Ian Piumarta 2024-05-09 10:13:27 +0900
  • 7d3350b Run test on file, not on stdin. by Ian Piumarta 2024-05-09 10:11:39 +0900
  • bc3aae1 Block_eval() executes its body in a new environment by Ian Piumarta 2024-05-07 23:25:35 +0900
  • ec29069 import files by Ian Piumarta 2024-05-07 17:26:40 +0900
  • b552179 Initial commit by piumarta 2024-05-07 17:15:02 +0900