Commit Graph

2256 Commits

Author SHA1 Message Date
John Messerly 139483d395 create another copy of libraries.dart for 1.12-dev SDK
also adds .packages to .gitignore
Note: this isn't enough to fix things yet, it seems 0.25.1 analyzer has other breaking changes

R=vsm@google.com

Review URL: https://codereview.chromium.org/1231643009.
2015-07-09 09:36:52 -07:00
vsmenon a3bc92bba0 Update README.md 2015-07-08 13:23:46 -07:00
vsmenon 949df6416b Rename STRONGMODE.md to STRONG_MODE.md 2015-07-08 13:19:06 -07:00
Vijay Menon 8bc85e3da3 Document strong mode
See rendered markdown here:
 https://github.com/dart-lang/dev_compiler/blob/strong/STRONGMODE.md

Fixes #243

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

Review URL: https://codereview.chromium.org/1218993004.
2015-07-08 13:18:16 -07:00
Vijay Menon a68fa599f3 Option to disable message widget
R=leafp@google.com

Review URL: https://codereview.chromium.org/1213233006.
2015-06-30 16:40:20 -07:00
John Messerly 98d14b14da initial sync*, part of #221
Right now it maps straight to ES6 generators. This should handle some basic cases, but there's more work to get all of the corners working. For example: it doesn't implement Iterable yet.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1207313002.
2015-06-26 16:02:30 -07:00
Vijay Menon a458150539 Run canary tests in presubmit
This partially addresses #128

R=leafp@google.com

Review URL: https://codereview.chromium.org/1208413003
2015-06-26 10:03:11 -07:00
Vijay Menon 7837d31936 Fixes #246
Type checks await

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1209413002.
2015-06-26 09:59:43 -07:00
John Messerly c2e65df22c fixes #168, dart:js implementation with a test
R=vsm@google.com

Review URL: https://codereview.chromium.org/1200233004.
2015-06-25 13:18:52 -07:00
Leaf Petersen 53345a6d6d Syntax and subtyping for strong dart. Initial pass on a core calculus for exploring and defining the key ideas underlying the strong dart type system. This CL contains the initial latex setup, a proposed base syntax to start from, and the definition of subtyping.
BUG=
R=jmesserly@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/1205173003
2015-06-25 13:17:01 -07:00
Vijay Menon 6886143037 Revert "Cleanup travis passes"
Looks like this change broke the presubmit pass - reverting just this for now.

TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/1200383004.
2015-06-24 10:34:50 -07:00
Vijay Menon 297a159aa6 Enable Chrome Canary browser tests on Travis
I created a karma branch to test this on travis - see bottom of the log here:
https://travis-ci.org/dart-lang/dev_compiler/jobs/68106290

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1205043002.
2015-06-24 10:21:11 -07:00
John Messerly b9e48a6616 fixes #232, handling of arguments
our renamer wasn't trusting the JS builtin to use arguments correctly :)
incidentally, this does the final step in making the renamer precise: it tracks all renames per-scope now. In practice this was almost never hit except for "arguments" though.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1200243002.
2015-06-23 13:35:39 -07:00
Vijay Menon 4bb9fdce71 Fixes #151
Type check async-return, async*-yield, and sync*-yield.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1190413005.
2015-06-22 10:22:23 -07:00
John Messerly 9b1ad9cf1a fixes #231, mixin application (aka ClassTypeAlias) implicit ctors
R=vsm@google.com

Review URL: https://codereview.chromium.org/1193083002.
2015-06-22 08:55:56 -07:00
Leaf Petersen 4e7920c487 Handle dynamic as bottom inside of function type reps.
This changes the way we handle dynamic at runtime to be more correct and cleaner.  We now simply emit dynamic as dynamic instead of as core.Object.  There are now two ways to construct a function type: one can construct a fuzzy function type (the default), or a definite function type.  The constructor for a fuzzy function type replaces all uses of dynamic with bottom.  This function type is used for all type annotations.  Definite function types do not replace dynamic with bottom.  These only occur as the runtime type of actual functions, for which we really know the type. Because we now eagerly sort this out when we create the function type, the subtyping code doesn't need to deal with this.

This allows some additional subtyping: closures which actually are typed to take dynamic would previously not have been allowed to be cast to something with a concrete argument type.  Now this is allowed (see the change in runtime_tests.js for an example of this).

This fixes #107.

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1195523002
2015-06-17 16:46:38 -07:00
John Messerly 8d76f5f34e have build/test scripts automatically update baselines
we already have to review them, so running a diff and failing the rest of the test pass seems unhelpful. Instead operate like our generated SDK does, and update in place

R=vsm@google.com

Review URL: https://codereview.chromium.org/1188173003.
2015-06-17 09:05:59 -07:00
John Messerly de6df99db0 fixes #226 super == and fixes #227 escape \r \f
R=vsm@google.com

Review URL: https://codereview.chromium.org/1183453005.
2015-06-16 16:52:32 -07:00
John Messerly 7d8b38a236 js_ast: implement rest/spread parsing
R=vsm@google.com

Review URL: https://codereview.chromium.org/1183033004.
2015-06-16 16:10:05 -07:00
Vijay Menon 4c9fb31e35 Fix multipackage resolver paths
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1187163003
2015-06-16 13:15:22 -07:00
Vijay Menon d48b153193 dart:mirrors
This is a very bare bones version - just enough to get angular running.

See #199

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1186683005.
2015-06-15 16:22:54 -07:00
John Messerly b769aa5fbc fixes #25, most analyzer errors were not computed
It helps to call computeErrors ;)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1183733004.
2015-06-15 08:55:59 -07:00
John Messerly d1a4c5dc94 first step for #168, adds dart:js impl to the build
the code most likely does not work yet. But this gets it in so we can iterate more easily, from a clean baseline.

R=jacobr@google.com

Review URL: https://codereview.chromium.org/1179643005.
2015-06-12 15:17:38 -07:00
John Messerly 86c5ee932d fixes #192, encode dynamic info in checker
fixes a checker bug too: it wasn't working properly for cascade targets. Previously this caught #202 and #206 as well.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1184843002.
2015-06-12 13:39:41 -07:00
Leaf Petersen b9c83e0013 Most of this CL just re-organizes the runtime code into multiple sub-libraries. js_utils and loader remain as top level symbols (the former so that it has no dependencies, the latter since it defines the module system that the rest use).
The dart runtime files are roughly split around functional boundaries.  Comments at the top of each file describe the function of the library.  I'm not sure that these are 100% right yet, but they're closer.  We may want to iterate on the organization.

The main dart runtime file just re-exports various symbols from the sub-libraries.  It has hard dependencies on the other runtime files, some of which have soft (lazy) dependencies on SDK files.  The generated code now depends on dart and dartx as a imported libraries, rather than as top level symbols.

This CL also includes some new code to make type representations a bit better.  This is mostly in the new types.js file, which makes all of the non-instance types (dynamic, bottom, void, function types) subtypes of a common representation type.  Among other things, they now have the correct runtime type (core.Type).  Some of the type code has been rationalized around this a bit, but there is more left to do here.  The setSignature code in classes.js now also places the correct runtime type on nominal (instance) types.  There are new tests in the runtime_tests.js file to test for this.

The static object method code that implements the Object methods has not yet been updated to dispatch on type representations.  I will do that in a separate CL.

BUG=
R=jmesserly@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/1182653002
2015-06-12 13:34:39 -07:00
John Messerly cad6ec14b8 Update pubspec.yaml
bump version to publish
2015-06-12 08:36:55 -07:00
Günter Zöchbauer 32338dc16a Use hosted package instead of Git reference
now the packages is available on pub.dartlang.org
2015-06-12 09:20:02 +02:00
Günter Zöchbauer ba26ada185 make link work from pub.dartlang.org page 2015-06-12 09:11:33 +02:00
John Messerly f371445aaa Widen dependencies to match Dart SDK deps
R=vsm@google.com

Review URL: https://codereview.chromium.org/1180723004.
2015-06-11 13:41:34 -07:00
Vijay Menon 4be334a923 Fix runtime ordering and other minor fixes
Other than mirrors (coming next :-)), this gets angular todo running.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1177253002.
2015-06-11 11:06:49 -07:00
Vijay Menon 9c77254a27 Clean up runtime type code
R=leafp@google.com

Review URL: https://codereview.chromium.org/1177233004.
2015-06-11 09:41:18 -07:00
John Messerly 8f4db8f514 expose strong checker API, for use by analyzer_cli
most of the changes here are around making options sane(r), which fixes #204

R=vsm@google.com

Review URL: https://codereview.chromium.org/1174643003.
2015-06-11 07:47:12 -07:00
John Messerly b62fdb577d fixes #217, Object members on extension types
R=vsm@google.com

Review URL: https://codereview.chromium.org/1173023004.
2015-06-10 13:52:18 -07:00
John Messerly e7a5cc36ef fixes #216, JSNumber members
R=vsm@google.com

Review URL: https://codereview.chromium.org/1173903003.
2015-06-10 13:46:44 -07:00
John Messerly 86a8ac2b0c fix #214, check type of inferred initializing formal with default value
Analyzer does this inference (probably from spec?) very early in the compilation.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1180513002.
2015-06-10 12:59:55 -07:00
John Messerly d52346c201 fixes #215, removes special case for length
R=vsm@google.com

Review URL: https://codereview.chromium.org/1178523004.
2015-06-10 12:21:49 -07:00
John Messerly c7b3846d8e fixes detection of SDK libraries
R=vsm@google.com

Review URL: https://codereview.chromium.org/1170813008.
2015-06-10 09:59:18 -07:00
Olivier Chafik d159b6ee79 Fix dart.equals("10", 10) (issue #210)
See doc on == vs. === : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators
Note that the `== null` tests in the same function are probably preferable to `=== null` if both undefined and null values can be encountered.
2015-06-10 15:31:59 +01:00
Vijay Menon 321be0a426 Generate metadata
Fixes #198

BUG=https://github.com/dart-lang/dev_compiler/issues/198
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1177563003.
2015-06-10 06:28:33 -07:00
Vijay Menon 5ff3864a18 Load on demand
This fixes ordering issues.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1171843002
2015-06-09 08:05:26 -07:00
John Messerly 023bfc087d remove ignoreTypes flag, it doesn't work, see #134
If we wanted to bring this back, we should implement it differently, IMO
Instead simply replace all type annotations with `dynamic`

R=vsm@google.com

Review URL: https://codereview.chromium.org/1163393002
2015-06-08 16:57:24 -07:00
John Messerly 20d14a610c fixes #209, remove tree mutation from CodeChecker
R=vsm@google.com

Review URL: https://codereview.chromium.org/1172453002
2015-06-08 16:52:01 -07:00
John Messerly a5132e6436 remove covariant generics option
Thoughts? Seems unlikely we'll go with invariant at this point.
I'd like to see covariant generics go, but it seems we need variance annotations of some sort before that becomes realistic. (e.g. Iterable is used all over the place)

R=leafp@google.com

Review URL: https://codereview.chromium.org/1165303002
2015-06-08 14:35:56 -07:00
John Messerly 73be4cab48 remove ClosureWrap option and related implementation
Vijay thought that we don't need this anymore, as we decided not to wrap.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1171713002
2015-06-08 14:32:42 -07:00
John Messerly 92f7129ae3 split analyze and format steps out of test.sh
presubmit.sh still runs all of them in the same order

often I'd like to iterate on analyze or rerun format without running all of the tests, and find myself copying analyze or format lines from test.sh

R=leafp@google.com

Review URL: https://codereview.chromium.org/1167233002
2015-06-08 13:48:47 -07:00
John Messerly d88c36af77 remove unused allowConstCast option
this was for the Dart backend?

R=vsm@google.com

Review URL: https://codereview.chromium.org/1166163002
2015-06-08 13:19:06 -07:00
John Messerly cce21a4991 dead code elimination in reify_coercions
with the removal of dart backend, we don't need support for _runtime

R=leafp@google.com

Review URL: https://codereview.chromium.org/1169873002
2015-06-08 13:17:00 -07:00
Vijay Menon c139653fcb Check for duplicate library names
This bites us on Angular - dart:collection and angular's collection
(facade) lib smash on top of each other, silently causing issues.

We'll need a better naming convention - perhaps we should use the lib
name and require uniqueness.

Fixes #208

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1145243013
2015-06-05 16:34:10 -07:00
John Messerly a7adab29fa fixes browser/runtime_test, and a few of extension member fixes
* fixes generic List. Because generic arrays have the proto of JSArray, which itself extends Array, we need to make sure we don't override members from Array.

* fixes tear offs, they were not preserving type signatures in some cases. This doesn't change how we store signatures, but perhaps something we could consider, to make this bug less likely.

* the defineExtensionMembers call was not getting emitted unless the type implemented at least one interface.

R=leafp@google.com

Review URL: https://codereview.chromium.org/1156273010
2015-06-05 16:22:37 -07:00
John Messerly cac786f671 fixes #173, ability to use native JS indexers
dom_experimental could opt-in to use this

R=jacobr@google.com

Review URL: https://codereview.chromium.org/1145833004
2015-06-05 12:14:09 -07:00