Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: BESEN - A complete ECMAScript 5th edition implementation with a JIT

  1. #1

    BESEN - A complete ECMAScript 5th edition implementation with a JIT

    I want to post here my newest project named BESEN. BESEN is an acronym for "Bero's EcmaScript Engine", and it is a complete ECMAScript Fifth Edition Implemention in Object Pascal, which is compilable with Delphi >=7 and FreePascal >= 2.5.1 (maybe also 2.4.1).

    BESEN is licensed under a RubyLike+AGPLv3 dual-license.

    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 Just-in-Time Compiler (x64/AMD64 JIT is in the work and a ARMv7 EABI JIT for ARM CPUs with VFPUv1 instruction set is planned)
    • Constant folding
    • Dead code elimination
    • Abstract-Syntax-Tree based optimizations
    • Type inference (both exact and speculative)
    • Property Inline Cache
    • 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 ObjectPascal class integration (properties per RTTI and published methods per by-hand-parsing of the native virtual method table)


    And here is the link to BESEN: http://besen.sourceforge.net/

    Have fun with it

    EDIT: Moved to SF.NET

  2. #2

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    Wow, I've been looking for something like this to be integrated into my game engine.
    At the moment I'm using the Thorium scripting language (german link) for this task.

    Just took a quick look at it, but it failed to compile on Mac OS X 10.6.3 (Intel) with FreePascal 2.4.0 (just wanted to test if it would work with 2.4.0, I will use a more recent FPC version tomorrow) with some errors about wrong parameters for FormatDateTime and StrToDateTime.

    Well, as I said I will take a more thorough look at BESEN tomorrow.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  3. #3

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    Ok, this is truly awesome. Downloading now and will give it a shot in the versions of Delphi and FPC/Lazarus I have installed. Is this a full hand implementation or did you use a compiler builder (lex, coco, etc) for it?

    PS: How long till we see the docs

    - Jeremy

  4. #4

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT


    Yeah, BESEN is a full hand implementation. I hate lexer and parser generators Only the unicode lookup table constant arrays are auto-generated.

    I've fixed two bugs today (due to a >>= >>>= and <<= code generator bug), so a new version is online now. And i've added some hints to the BESEN webpage due to the code runtime perfomance.

    As said, it's is for FPC >=2.5.1 and Delphi >=7, so that FPC 2.4.0 isn't usable for it, because of old Delphi7-incompatible FormatDateTime definitions and so on.


  5. #5

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    Impressive!

    You keep making "impossible" projects with Pascal, BeRo!
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  6. #6
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    Excellent work! I shall be having a play
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  7. #7

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    This looks quite interesting. I'll give it a shot when i find the time.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  8. #8

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    100% impressive!
    From brazil (:

    Pascal pownz!

  9. #9

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    Thanks for all your feedback. I've made BESEN even compatible for to FPC 2.4.0 now, and fixed some bugs and moved to Sourceforge.

  10. #10

    Re: BESEN - A complete ECMAScript 5th edition implementation with a JIT

    Why would anyone write something like this is beyond my logic, but you really did write something very VERY nice here. Despite my hate for javascript from web programming i do every day something like this in a simplier form would be pretty suitable as a game scripting programming language, the only issue i see would be license (GPL/Custom), but i'll try to evalute it and see where i go from there.

    Really nice work, i was pleasantly suprised to see something this advanced on this forum.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •