Operators



Articles tagged 'operators'

2014-05-16
Writing a (Ruby) compiler in Ruby bottom up - step 35

Towards Self Hosting

As mentioned last time, this time around, I've first landed a number of changes that will make the parser able to parse the entire compiler (whether or not it parses it correctly or not remains to be seen, and is outside the scope).

You can find these ...

2014-04-06
Writing a (Ruby) compiler in Ruby bottom up - step 33

It took me two months to push this out, but I promise it doesn't mean I'm about to stop publishing these again anytime soon. I intend to shorten my "lead time" further again, so I'm hoping to publish the next one in 2-3 weeks time.

Register Allocation

We saw in some ...

2014-02-08
Writing a (Ruby) compiler in Ruby bottom up - step 32

Testing And Debugging Code Generation

Unit testing code generation poses some particular challenges because so many things can go wrong, and they can go wrong in all kinds of horrible ways that makes them extremely nasty to track down,

2013-12-31
Writing a (Ruby) compiler in Ruby bottom up - step 31

I promised to get a second part out in December somewhere, and it seems like I only barely made it. I'm still hoping to push two out in January, but that's contingent on actually getting time to finish the next one too. But there'll be at least one in January, sometimes ...

2013-12-04
Writing a (Ruby) compiler in Ruby bottom up - step 30

The Operators - Part 4: Comparisons

Where we left off last time, we had everything but comparison operators and &&, ! sorted out. When I started replacing runtime.c, I expected to do it in one go, as I've mentioned, but as you have seen there was quite a bit to ...

2013-11-04
Writing a (Ruby) compiler in Ruby bottom up - step 29

The Operators - Part 3: Operating on our newly minted Fixnums

Where we left off last time, we transform numbers into Fixnum objects, and turn + and other operators into method calls. In theory at least - we haven't actually tested that functionality properly in practice.

2013-10-08
Writing a (Ruby) compiler in Ruby bottom up - step 28

The Operators - Part 2: Turning numbers into Numbers

(or small enough integers into Fixnum's, at least)

As a recap from last time, where we left off we can parse our new, completely useless and primitive Numeric, Integer and FixNum classes, but our numbers aren't actually members of those classes, ...

2013-09-02
Writing a (Ruby) compiler in Ruby bottom up - step 27

The Operators - Part 1: Parsing

As mentioned last time, over the previous parts I at some point brutally broke our built in operators. I did so by actually implementing proper method calls.

It also made the compiler largely unusuable, and went unnoticed because, well, the compiler is still largely unusable.

...