Skip to content
Fast C-like programming language with advanced features
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Modules Added std.io module read/write function customization, fixed windows … Mar 20, 2019
NULLC Fix for line/column location tracking after a multi-line string or ch… Apr 21, 2019
bin
external Additional common include search path for external libraries Mar 25, 2019
nullc_exec
nullc_ide Additional common include search path for external libraries Mar 25, 2019
nullcl
tests
vscode
.gitignore Ignore list update Apr 21, 2019
.travis.yml Removed manual external call build from build matrix Mar 21, 2019
CmdRef.html Updated command reference and language reference. Jan 10, 2010
LICENSE Added LICENSE file Sep 10, 2015
LanguageEN.html Basic types (short, int, long, float and double) are aligned the same… Nov 3, 2013
LibraryEN.html Log file output control and test in coverage configuration Feb 23, 2019
Makefile Compile llvm module if support is enabled, in debug configuration wit… Mar 25, 2019
README.md * Readme update Apr 4, 2019
TODOlist.txt Re-organized project structure, renamed sub-projects Mar 18, 2019
codecov.sh
codecov.yml Ignore external libraries in coverage data Mar 25, 2019
nullc.natvis Added natvis for ArrayView and FastVector Feb 2, 2019
nullc_100.sln Visual Studio project configuration fixes Mar 19, 2019
nullc_110.sln x86 platform for Visual Studio 2012 project + enabled multiprocessor … Mar 18, 2019
nullc_141.sln Extension update: language client for Visual Studio Apr 21, 2019

README.md

nullc

Build Status Build status codecov.io Coverity Scan Codacy Badge Language grade


nullc is a C-like embeddable programming language with advanced features such as function overloading, operator overloading, class member functions and properties, automatic garbage collection, closures, coroutines, local functions, type inference, runtime type information, modules, list comprehension, enums, namespaces, generic functions and classes.

Language is type-safe and memory-safe.

nullc library can execute code on a VM or translate it to x86 code for fast execution. It can also translate nullc files into C source files.

This repository builds multiple additional tools:

  • nullcl - a tool to compile nullc source files into a binary module, C source files or an executable (using gcc).
  • nullcexec - a tool to execute nullc source files.
  • nullc_ide - a simple text editor with code colorizing and simple debug compatibilities (including remote debugging for applications that execute nullc scripts).
  • nullc_lang_server - a language server implementation for integration with IDEs
  • nullc_lang_debugger - a debug adapter that also includes language runtime for execution of nullc programs
  • nullc_lang_client - a Visual Studio Code extension adapter that includes nullc_lang_server and nullc_lang_debugger

March 2019 Update

Core:

  • New two-phase (parse/analyze) compiler
  • Improved syntax and expression trees
  • Parse error recovery with multiple error reports
  • Partial analyzer error recovery
  • Extended constant evaluation
  • Additional SSA intermediate representation with optimization passes
  • Improved source location tracking
  • Language improvements:
    • Member functions defined inside class body have access to complete class definition
    • Local function external variables are captures the same way in global code, functions and coroutines: when they go out of scope
    • Support for partial type inference when only parts of target type are marked as generic
    • Support for explicit type casts
    • Variable can be defined inside an 'if' condition
    • Class accessors can be used in modify-assignment expressions
    • enum constants can reference previous constants
    • Conditional expression will find common type between arrays of different explicit size
  • Compiler fixes:
    • Numerical unary operations can no longer be performed on 'auto ref' pointers
    • Read-only array size and type members can't be changed using member functions
    • Local classes can't be used after owning scope has ended
    • Fixed missing class constructor calls
    • Fixed alignment of function pointers
    • Fixed type inference for for-each iterator values
    • Fixed lookup of names inside a namespace
    • Fixed variable visibility after shadowing of said variable has ended
    • Fixed integer literal value overflow
  • Runtime fixes:
    • Fixed crash on external function calls with non-zero terminated character arrays

Misc:

  • Fixed translation to C++
  • VS Code extension with language server and debugger
  • arm and arm64 support
  • External function calls are handled by dyncall library on all supported platforms (x86, x64, arm, arm64, powerpc)

Interface:

  • Support for multiple module search paths
  • Log file output control
  • Optimization level control

Changes in 2015

Core:

  • Improved type inference in short inline functions

Misc:

  • Fixed bugs, crashes and hangs in the compiler found by extensive fuzz-testing
  • Fixed compilation with gcc and clang on x86/x64
  • dyncall library can be used to perform external function calls

Changes in 2013

Core:

  • 'explicit' function argument types to opt-out from implicit conversions in overload resolution
  • function overload resolution based on function return type

Misc:

  • std.string module for string operations
  • std.event module for C#-style event handlers
  • Android support (armeabi, armeabi-v7a and x86 targets)

Interface:

  • nullcGetGlobalType to get nullc type id by name

Changes in 2012

Changes from 0.9 tag

Core:

  • Type inheritance
  • Generic function specialization
  • Generic functions with explicit type specification
  • Generic type specializations for a different number of template parameters
  • Static 'if' in class body
  • Named function arguments
  • Extended typeof expression improvements
  • Allocation of any type using 'new' expression
  • Nested comments
  • Numerous bug fixes

Misc:

  • Run-time type introspection improvements
  • Wrapper for binding class member functions and class members from C++.

November 19, 2010

Changes from 0.8b to 0.9

Core:

Misc:

SuperCalc:

  • Redo support
  • Persistent undo

Translation to C doesn't work in this version, use 0.8

September 18, 2010

Changes from 0.7 to 0.8b

Core:

  • List comprehension
  • Coroutine can be used as a generator in for each expression.
  • JiT executor supports dynamic code linking and evaluation

Misc:

  • Automatic function binding under gcc and msvs.

Interface:

  • Added nullcIsStackPointer and nullcIsManagedPointer.
  • Added nullcGetFunction and nullcSetFunction.

June 18, 2010

Changes from 0.6b to 0.7:

Core:

  • Coroutines
  • Compile-time function evaluation
  • Better structure compatibility with C
  • Type constructor can be called in new expression.
  • added auto[``] type - an array with implicit size and element type. Helps GC when pointer contains objects of unspecified type.
  • nullptr can be assigned to type[``]
  • Various GC fixes and performance improvements
  • VM speedup

Misc:

  • Linux x86/x64 support
  • PS3 support
  • Documentation update

Interface:

  • Debug break actions: step over, step into, step out.
  • Global memory limit can be set
  • Further translation to C improvements

SuperCalc:

  • Added watch
  • Debug improvements: step over, step into, step out, module source code load

May 14, 2010

Changes from 0.5 to 0.6b:

Core:

  • Stack overflow exception handling in JiT
  • x86 asm optimization
  • Function override
  • eval() (VM-only)
  • Translation of NULLC code into C++ code
  • Support for unary operator +, -, ! and ~ overloading.
  • NULLC function call when executor is running
  • NULLC function call by pointer
  • NULLC function call with parameters
  • Functions with variable argument count
  • Function call of auto ref type redirection to target type
  • Ability to define arrays of non-stack types char, short and float
  • Default function argument values are exported and imported
  • Operators can be defined and overloaded in functions and classes

Misc:

  • x64 support
  • Digitalmars C++ compiler support
  • NULLC can compile code containing characters with codes over 0x7f

Interface:

  • Debugging features (call stack, stack frame contents, breakpoints (VM-only))
  • Functions for fast execution result retrieval as numeric values
  • nullcSetGlobal and nullcGetGlobal functions.
  • JiT executor parameter stack placement can be specified
  • NULLC_NO_EXECUTOR define that compiles NULLC without executors

SuperCalc:

  • Remote debugging
You can’t perform that action at this time.