Commit Graph

2821 Commits

Author SHA1 Message Date
John Messerly 8aa0f1c695 fix code coverage to work on dev channel
R=vsm@google.com

Review URL: https://codereview.chromium.org/1236493003 .
2015-07-22 14:50:23 -07:00
John Messerly 394836eaa2 fixes #259, clone ast before mutation
R=vsm@google.com

Review URL: https://codereview.chromium.org/1245013005 .
2015-07-21 15:36:55 -07:00
Vijay Menon 9fe41d1202 Fix server mode
TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/1235293004.
2015-07-17 21:21:18 -07:00
John Messerly 60aba749ca fixes #219, able to compile multiple entry points
also speeds up codegen_test by reusing the analysis context
BatchCompiler is pretty close to how analyzer_cli works now (other than missing features)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1235503010.
2015-07-16 17:41:33 -07:00
Vijay Menon ebe7d54efd Use standard harmony flag
This fixes current breakage with Chrome 46.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1235393004.
2015-07-16 09:33:10 -07:00
Leaf Petersen b561f0c284 Core static semantics checkpoint. First take on a core static semantics. Class typing is not done, but all of the core language is pretty well fleshed out. Fuzzy arrow types are handled, downwards inference on function types is modeled, and local variable type inference is modeled. Field lookup has not been specified yet.
I've split out the elaboration of the input syntax into the final program with runtime checks and suppressed that from the output for now.

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1236443002.
2015-07-15 15:52:39 -07:00
John Messerly c4267e5d35 analyzer fixes
found these in the "dart analysis" tool window
(after excluding test files and such)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1239803005.
2015-07-15 10:00:20 -07:00
John Messerly b1e92bfcaf simplify computing of runtime file location
R=vsm@google.com

Review URL: https://codereview.chromium.org/1223113005.
2015-07-15 09:58:26 -07:00
Vijay Menon f50661aac4 Add support for Enums
Fixes #248

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1224083017.
2015-07-14 17:48:38 -07:00
John Messerly edf237c202 fix coverage of sdk build
R=vsm@google.com

Review URL: https://codereview.chromium.org/1223103003.
2015-07-14 17:05:42 -07:00
Vijay Menon 8ccef442a3 Fixes #254 - Better stacktrace support
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1233553005
2015-07-14 13:33:01 -07:00
John Messerly bc4e0f2a38 fixes #6, refactor to use AnalysisError/Listener throughout dev_compiler
Main goal here was to get rid of the enter/exit compilation unit tracking, to allow further Compiler/Server refactoring. We can get the Uri/LineInfo/contents off Source, which AnalysisError already has
SummaryReporter is now fairly generic.

TODOs for the future:
* figure out what to do about ErrorCodes, in particular dev_compiler prefix feels off.
* skip the intermediate StaticInfo types? They're really just builders now for AnalysisError.
* don't classify all existing messages as "AnalyzerError" ... just print them ...
* skip logger. For our command line program, stdout is part of its "API", IMO it shouldn't use logging for those messages. Consider Pub, which uses stdout/err for its messages, and uses logging for more detailed troubleshooting.

R=pquitslund@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/1230903002.
2015-07-10 10:15:08 -07:00
John Messerly b0a1bed3e9 switch travis to only test dev SDK
R=vsm@google.com

Review URL: https://codereview.chromium.org/1223363002.
2015-07-09 10:29:41 -07:00
John Messerly 79b5dd8a44 bump pubspec.yaml for release
R=vsm@google.com

Review URL: https://codereview.chromium.org/1225373002.
2015-07-09 10:21:34 -07:00
John Messerly f17187f3aa fix for 1.12.0-dev SDK and 0.25.1 analyzer breaking changes
unfortunately we can't run on stable anymore

R=vsm@google.com

Review URL: https://codereview.chromium.org/1228063003.
2015-07-09 10:11:32 -07:00
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