Commit Graph

14 Commits

Author SHA1 Message Date
Vijay Menon acde775091 Update dart_runtime.dart rules
This should bring it in line with rules.dart.

R=jmesserly@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1043323002
2015-04-07 05:57:20 -07:00
Vijay Menon e4fdeb376d Fix logging test
Just updating the broken test.  The dart_runtime.dart type rules are still out of date.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1045753003
2015-03-30 16:03:50 -07:00
John Messerly 6e824067a3 rename ddc -> dev_compiler, fixes #84
R=sigmund@google.com

Review URL: https://codereview.chromium.org/967933005
2015-03-04 11:12:19 -08:00
Vijay Menon 946676554b Make int and double nullable by default
See patch set 1 for the initial step back and patch set 2 to try to get some of this back.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/977613002
2015-03-03 12:08:30 -08:00
Sigmund Cherem e57c960817 rename package:ddc to package:dev_compiler
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/954773003
2015-02-24 17:01:15 -08:00
Vijay Menon 5c1c9c2381 Add LICENSE and corresponding headers
Fix expectations where line number has changed.

R=dgrove@google.com

Review URL: https://chromereviews.googleplex.com/158257013
2015-02-24 15:02:26 -08:00
Vijay Menon e64630186d Add non-nullability logic for primitives
Still need to:
- Fix our dart:core errors
- Change DownCastLiteral to error
- Handle "int x;", etc.

R=jmesserly@google.com, leafp@google.com

Review URL: https://chromereviews.googleplex.com/156787013
2015-02-11 12:08:34 -08:00
Vijay Menon 29718b72e8 Support Function object typing
R=jmesserly@google.com, leafp@google.com

Review URL: https://chromereviews.googleplex.com/147547013
2015-02-05 14:06:09 -08:00
Vijay Menon 793131178f Remove non-nullability check
So ... I'd forgotten to remove this logic ... but maybe we still want it?  :-)

R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/140257013
2015-01-30 12:22:08 -08:00
Vijay Menon 4a8c10f58c Initial support for runtime logging
This is very half baked.  Putting it down to work on better type literal support for the moment.

Qs:
(1) What should we measure?  cast failures mapped back to source?  I don't think we inject anything else right now.
(2) How should we report?  I just have dump function right now, but that'll be unwieldy on large apps.

R=jacobr@google.com, jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/146737013
2015-01-26 10:51:38 -08:00
Vijay Menon 9e7634e0e6 Support for generic 'literals' in dart checks
Jacob, Siggi, and I were discussing something like this yesterday morning as a way to write List<String>.  Hacky, but does allow for inline checks.

R=jacobr@google.com

Review URL: https://chromereviews.googleplex.com/143037014
2015-01-23 10:01:19 -08:00
Vijay Menon 5e6edcbade Support covariant generics at runtime
R=leafp@google.com

Review URL: https://chromereviews.googleplex.com/142887013
2015-01-20 14:53:15 -08:00
Vijay Menon 20cf4c9c4b Runtime arity helper function
We'll need to figure out an efficient way to do this in JS output.

An alternative, suggested by Jacob, is only provide something like an applyTruncated function.  E.g., something like:

dynamic applyTruncated(Function f, List args) {
  var arity = getArity(f);
  assert(args.length >= arity.min);
  args = args.sublist(0, arity.max);
  return Function.apply(f, args);
}

Jacob: is this what you have in mind?

If so, we could *only* provide this.  The dart2j impl could use the existing code pattern of is-checks.  The ddc implementation could map to JS apply (with a check for named params?).

Thoughts?

R=jacobr@google.com

Review URL: https://chromereviews.googleplex.com/137047014
2015-01-13 17:55:44 -08:00
Sigmund Cherem 02a4650a24 Refactor: move code around a bit
- bin/
    devc.dart

- lib/
    devc.dart

    src/
       info.dart # static info we compute, used by checker & backends
       checker/  # implementation details for the checker
          checker.dart  # checking algorithm
          rules.dart    # type checking rules
          resolver.dart # same as today, type resolution via analyzer
       emitter/
          ...
- test/
     checker/    # unit tests for the checker internals
     codegen/    # left as is - maybe should rename to emitter?
     samples/    # stand alone samples that we run in the end_to_end tests.
     ...

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/128957013
2014-12-11 15:13:54 -08:00