Giter Site home page Giter Site logo

start's People

Contributors

bholt avatar codeblack08 avatar melonhead901 avatar vsmenon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

start's Issues

Type issue with counters?

This IR:
method x@1:
method main@5: l1#-4:int
instr 1: enter 0
instr 2: nop
instr 3: wrl
instr 4: ret 0
instr 5: entrypc
instr 6: enter 4
instr 7: count 0
instr 8: count 10
instr 9: ret 0

produces some error when sorting keys to print out.
Class 'String' has no instance method '>'.

NoSuchMethodError : method not found: '>'
Receiver: "0"
Arguments: [10]
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:19:25)
#1 int.< (dart:core-patch/integers.dart:62:18)
#2 int.compareTo (dart:core-patch/integers.dart:107:14)
#3 Comparable.compare.compare (dart:core/comparable.dart:5:64)
#4 Sort.insertionSort_ (dart:_collection-dev/sort.dart:26:34)
#5 Sort._doSort (dart:_collection-dev/sort.dart:15:21)
#6 Sort.sort (dart:_collection-dev/sort.dart:5:12)
#7 IterableMixinWorkaround.sortList (dart:_collection-dev/iterable.dart:753:14)
#8 List.sort (dart:core-patch/growable_array.dart:262:37)
#9 execute (package:start/starti.dart:648:14)
#10 main (file:///home/darioush/git/start/bin/start.dart:45:26)

Therefore, I'm assuming there is some problem with the types.
changing instr 7 to be instr 7: count 00 magically solves the problem but I guess some type is being inferred incorrectly.

The "var_base#12" form in IR is ambiguous and can lead to errors.

Currently, the start compiler uses appends "_base" or "_offset" to a variable in the IR to indicate how to interpret it. E.g.,

  • x#8 resolves to *(FP+8)
  • x_base#8 resolves to 8

This is ambiguous if the variable actually ends in "_base". E.g., the following code runs incorrectly in Start.

import 'stdio.dart';

void main() {
int int_base;

int_base = 10;
WriteLong(int_base);
WriteLine();
}

Bug in the Start EBNF?

Currently, the EBNF has Term = Factor {('*' | '/' | '&') Factor}.. I think the & is supposed to be a % based on the listed Start operators.

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.