Coder Social home page Coder Social logo

tiagoefmoraes / besen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bero1985/besen

0.0 0.0 0.0 3.55 MB

Complete ECMAScript Fifth Edition Implemention in Object Pascal

License: GNU Lesser General Public License v2.1

JavaScript 4.79% PHP 0.29% Pascal 94.92%

besen's Introduction

BESEN is an acronym for "B ero's E cma S cript E ngine", and it is a complete ECMAScript Fifth Edition Implemention in Object Pascal, which is compilable with Delphi >=7 and Free Pascal >= 2.5.1 (maybe also 2.4.1).

BESEN is licensed under the LGPL v2.1 with static-linking-exception.

Features

  • Complete implementation of the ECMAScript Fifth Edition standard
  • Own bytecode-based ECMA262-complaint Regular Expression Engine
  • Incremental praise/exact mark-and-sweep garbage collector
  • Unicode UTF8/UCS2/UTF16/UCS4/UTF32 support (on ECMAScript level, UCS2/UTF16)
  • Compatibility modes, for example also a facile Javascript compatibility mode
  • Bytecode compiler
  • Call-Subroutine-Threaded Register-based virtual machine
  • Context-Threaded 32-bit x86 and 64-bit x64/AMD64 Just-in-Time Compiler (a ARMv7 EABI JIT for ARM CPUs with VFPv3 instruction set is planned)
  • Constant folding
  • Dead code elimination
  • Abstract-Syntax-Tree based optimizations
  • Type inference (both exact and speculative)
  • Polymorphic Inline Cache based on object structure and property key IDs
  • Perfomance optimized hash maps
  • Self balanced trees (for example to sort on-the-fly linked list items of hash maps for very fast enumeration of array objects)
  • Easy native Object Pascal class integration (properties per RTTI and published methods per by-hand-parsing of the native virtual method table)

Hint

  • Function code runs faster than global non-function code, because function-local variable accesses will be always identifier index lookups instead of identifier string lookups.
  • Strict code runs faster than non-strict code, for that reason please use preferably "use strict" where is it possible, because at strict code is the arguments object creation cheaper at funtion calls, for example no setter/getter creation for each function argument in the arguments object.
  • Scoping and some other things between ECMAScript 3rd Edition and ECMAScript 5th Edition are a bit different, so the execution perfomance of ES3 code in a ES5-complaint engine can be strong faster or even strong slower, depends on the individual situation/code.
  • No all old ES3 code must be runnable in a ES5-complaint engine, but the most old ES3 code should be runnable, I think.

Flattr

[Flattr](http://flattr.com/thing/74902/BESEN-ECMAScript-5th-Edition-Engine Flattr)

Donate

Go to my donate page

IRC channel

IRC channel #besen on Freenode

Contact

Drop me a mail at benjamin at rosseaux dot com for bug reports, questions, feature suggestions or whatever. :-)

besen's People

Contributors

bero1985 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.