Giter VIP home page Giter VIP logo

evo's Introduction

E-VO Amiga E Compiler is a derivative of the original Amiga E compiler written by Wouter van Oortmerssen. It adds many new features, bug fixes and optimisations including object UNIONs, string merging, non word-aligned objects and many more.

Changes in E-VO 3.8.1:

  • FindModule: add module version 14 support
  • Showmodule: add module version 14 support
  • fix legacy compile mode so it doesnt include changes in module version 14
  • Fix reaction texteditor tag values in gadgets/texteditor.m

E is an object oriented / procedural / unpure functional higher programming language, mainly influenced by languages such as C++, Ada, Lisp etc. It is a general-purpose programming language, and the Amiga implementation is specifically targeted at programming system applications.

If you want to assemble this code yourself you should use Asm-One or Vasm. The source is all contained within a single source file and requires no additional resources.

The program is released into the public domain for anyone to use however they wish with no restrictions apart from that the E-VO program (or related support programs) should not be sold for profit.

You may use this program to develop any application without restriction however use of this project is entirely at your own risk. I will not accept responsibilty for any issues arising from the use of E-VO.

Darren Coles

evo's People

Contributors

dmcoles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

evo's Issues

CLR opcode workaround

When generating code for the CLR opcode using a data register operand, there is a microcode bug in the 68000 CPU that can crash the system. If it hasn't been fixed already, the CLR.W D0 opcode should be implemented as EOR.W D0,D0. It's a drop-in substitute for all sizes.

Case sensitivity in double precision module

When trying to compile EEC on MorphOS, I ran into a function called IeeeDPFieee used to convert single precision to double. It didn't compile correctly with E-VO v3.6.0 because I listed it in ShowModule as IeEEDPFieee. The third and fourth character of all of the calls in the library need to be lowercase. Could this have something to do with the FD files for OS3.x not matching?

Why does this work?

Sorry to spam the ticket reporting system.
I don't really know where to discuss AmigaE coding. So please let me know where is a better place (anyone reading here, maybe open Discussions?).

I've again played a bit with AmigaE lately and thought I'd add some higher-level functions/PROCs, i.e. for 'reduce/fold'.

What I came up with is this:

EXPORT PROC reduce(lst, initialValue, fun)
    DEF accu, it, tmp, len, i
    len := ListLen(lst)
    accu := initialValue
    FOR i := 0 TO len-1
        it := ListItem(lst, i)
        tmp := accu
        accu := Eval(fun)
    ENDFOR
ENDPROC accu

Called like so using a quoted expression:

    DEF result, accu, it
    result := reduce([1,2,3,4,5], 0, `accu+it)
    PrintF('reduce result: \d\n', result)
    assertTrue(result = 15, 'Is not 15')

In the reduce function the tmp := accu is necessary, otherwise it won't work. But I do not understand why. Can someone shed some light?

I've also seen some built-in function like MapList use a variable pointer ({x}), but I'm not sure how this is used in the implementation and why is it needed.
My variant works with convention that accu and it must be used.

Optimizing for lower calling overhead

EEC-Developers/eec#25 describes an optimization where the first pass of the compiler could keep track of which registers are used by a function and save only the non-scratch members of the register list to the stack in the function preamble and restore the same list at the end. Since it's 68k series only, I thought I'd mention it here also.

Different assigns for debug modules

In a future release could there be a separate assign other than emodules: for debug mode? I find myself having to put debug modules in the place of release mode compiles when tinkering with the module framework.

#ifdef doesn't work at global scope

I tried to implement file logging with the following:

-> Globals are prefixed with g_ and defined here
DEF g_idcmp, g_scrn, g_wndw

#ifdef DEBUG
DEF g_log
PROC trace(msg,var=NIL)
    IF var
        VfPrintf(g_log,msg,var)
    ELSE
        Fputs(g_log,msg)
    ENDIF
    Flush(g_log)
ENDPROC
#else
PROC trace(msg,var=NIL) IS RETURN
#endif

PROC main()
#ifdef DEBUG
    g_log:=Open('file.log',MODE_NEWFILE)
#endif
    trace('hello log!\n')
#ifdef DEBUG
    Close(g_log)
#endif
ENDPROC

When compiled with DEBUG not defined, the compiler complains about the preprocessor directive being in the Global scope.

Module won't always load

screenshot
Yet on the unit test it seems to work. All that's in the module is a single function and an enum definition. There is a possibility that loading a module from in another module might be the culprit. The sources are in the EEC Framework project. The module it is being loaded from is not uploaded yet.

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.