Commit Graph

2256 Commits

Author SHA1 Message Date
Vijay Menon 5007e1a562 Fix internal NSM helper to use a Dart Symbol
Not sure if this entirely handles #470, but it does fix the breaking example.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1754773002 .
2016-03-11 09:05:56 -08:00
Vijay Menon d530938a2b Various cleanup
- Allow just analysis given html file
- Checked mode fix for html-report
- Clear pubspec.lock for transformer test
- Format run

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

Review URL: https://codereview.chromium.org/1762283003 .
2016-03-09 12:58:22 -08:00
John Messerly b8ae9f9b77 a few small refactorings to closure workarounds
* factor the class heritage workaround so it's out of the way & easier to remove later.
* always emit type parameters in the AST, and pass the flag to the printer to skip printing them.
* cleanup an unnecessary sync* method for closure field decls.
* also, reformats. I think I forgot to do that in previous CL.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1767803002 .
2016-03-08 15:56:18 -08:00
John Messerly edec4a53e6 Reorganize tool/input_sdk/private
In particular, this moves DDC's magic runtime library into its own folder. The runtime library doesn't follow the same rules as other libraries, so it's easier to reason about in its own folder.

This is only file moves + changing libraries.dart to point at the new location.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1771713002 .
2016-03-08 15:52:12 -08:00
John Messerly aad19229e2 DDC: remove dumpInfo flag
I was hoping to get rid of SummaryReporter altogether, but it looks like it's still used by server mode.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1778623002 .
2016-03-08 15:47:03 -08:00
Vijay Menon f52a8c652f Allow failure on transformer bot
This is experimental.  We'll need to let this go red on occasion.

TBR=ochafik@google.com

Review URL: https://codereview.chromium.org/1772993004 .
2016-03-08 11:30:08 -08:00
John Messerly 4e29500150 remove checked mode from build_sdk. Saves ~25% from build SDK time
Review URL: https://codereview.chromium.org/1753453002 .
2016-03-08 11:03:33 -08:00
Vijay Menon 883972e37a Fix deprecation message
TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/1775673002 .
2016-03-07 15:33:01 -08:00
vsmenon 4a108cc638 Update GENERIC_METHODS.md 2016-03-04 05:51:45 -08:00
John Messerly 93251ee241 upgrade to latest analyzer
fixes https://github.com/dart-lang/dev_compiler/issues/471

Changes here are:
* Analyzer now infers list/map literals
* Analyzer changed how isPotentiallyMutated* APIs work, so we need to track current function
* Another fix to arrow functions. We shouldn't skip generating covariant arg checks. If there were any, we use `=> { block }` form rather than `=> expr` form.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1757343002 .
2016-03-03 11:32:54 -08:00
John Messerly d3932e1c50 Add a few more known non-null cases
Improves handling of identifiers and known elements, the `identical` function, and generative constructors.

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

Review URL: https://codereview.chromium.org/1752193002 .
2016-03-02 13:32:27 -08:00
John Messerly e1c5f6ddcd use Source.isInSystemLibrary
Just a small cleanup to use the property instead of comparing the URI

R=vsm@google.com

Review URL: https://codereview.chromium.org/1749213006 .
2016-03-02 13:07:34 -08:00
John Messerly 5e36d5d0a0 Merge pull request #472 from dart-lang/allow-analyzer-master-failures
Allow analyzer master failures in Travis
2016-03-02 09:23:59 -08:00
vsmenon d0374325ad Update STRONG_MODE.md 2016-03-02 08:49:35 -08:00
Olivier Chafik b28c202f0a Allow failures with ANALYZER=master 2016-03-02 07:44:21 -08:00
Olivier Chafik f20caad681 Split out transformer and node tests in their own env 2016-03-01 18:48:47 -08:00
Olivier Chafik cc153484d3 Run a separate Travis env with analyzer#master 2016-03-01 18:48:47 -08:00
John Messerly 67b24939cd refactor/simplify nullable inference code
Some of the high level changes are:
* visit catch body, fixes #463
* handle temps created by the compiler. These were in some cases treated incorrectly as non-null (see tests diff)
* compute nullable in the same pass as visiting assignments
* simplify visiting += and ++, fix ++ (it was dead code, #463)
* simplify _isNullable
* if we fail to see a variable declaration, treat it as nullable
* stack trace in catch is treated as non-null

R=vsm@google.com

Review URL: https://codereview.chromium.org/1751963002 .
2016-03-01 16:44:05 -08:00
Vijay Menon 243a0377db Search html extension types lazily
This speeds up compile of helloworld (non html) by 2x, and tools/test.sh by about 30%.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1752133002 .
2016-03-01 15:20:44 -08:00
Vijay Menon 316d1b6695 Fix #465
This preserves the type when cloning an AdjacentStrings node.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1756563002 .
2016-03-01 13:08:05 -08:00
Vijay Menon 3c049a8f3d Fix #469
The real issue here is static type errors in dart:html code, which we need to cleanup.  But it doesn't appear to ever make sense to use the static type here.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1754783002 .
2016-03-01 13:01:27 -08:00
John Messerly ae404442ca a little refactoring around identifiers/parameters
Main goal here is to isolate some code that was treating parameter declarations differently from other SimpleIdentifiers.

(We're going to need to emit generic method instantiations for SimpleIdentifiers in some cases, so it's going to be important to split out parameters from other expressions)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1744453002 .
2016-02-26 10:00:15 -08:00
John Messerly abf6065dc2 more function refactoring
Two more small bug caught/fixed in the process:
* Dart lambdas must generate as `=>` functions or we'll get the wrong `this`
* Another case where generators we using destructuring in a mismatched way

R=vsm@google.com

Review URL: https://codereview.chromium.org/1736723002 .
2016-02-24 16:54:07 -08:00
John Messerly ca46b80811 simplify generation of functions
fixes incorrect destructuring codegen, and encapsulates type parameter comments better in _emitFunctionBody

R=vsm@google.com

Review URL: https://codereview.chromium.org/1729933002 .
2016-02-24 09:18:46 -08:00
John Messerly d959316526 refactor: avoid parts
we try to avoid "parts" except in js_ast (because that will be split out into its own package)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1724463003 .
2016-02-22 16:01:35 -08:00
vsmenon 2d0ad590a0 Update CHANGELOG.md 2016-02-22 15:08:55 -08:00
vsmenon 9586a5d217 Update devc.dart 2016-02-22 15:08:17 -08:00
vsmenon d963f4f544 Update package.json 2016-02-22 15:08:03 -08:00
vsmenon c54b468584 Update pubspec.yaml 2016-02-22 15:07:47 -08:00
Vijay Menon c75d51d6bf Fixes #460
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1718353002 .
2016-02-22 15:03:56 -08:00
Vijay Menon c9c1c5233a Disable transformer test to get travis green
See #458

TBR=ochafik@google.com

Review URL: https://codereview.chromium.org/1719983002 .
2016-02-22 08:43:12 -08:00
John Messerly ab963d493b fix analysis options to exclude an invalid test file
R=vsm@google.com

Review URL: https://codereview.chromium.org/1713273002 .
2016-02-19 15:41:28 -08:00
vsmenon a0e81c9984 Update CHANGELOG.md 2016-02-19 15:05:03 -08:00
vsmenon c222c45599 Update devc.dart 2016-02-19 15:04:31 -08:00
vsmenon 700e1d725f Update package.json 2016-02-19 15:04:04 -08:00
vsmenon a2841d780f Update pubspec.yaml 2016-02-19 15:03:47 -08:00
Vijay Menon ce985ef38d Support StackTrace.current
This was recently added to the Dart SDK.  Breaking Angular in DDC via stack_trace package.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1720473002 .
2016-02-19 14:25:21 -08:00
Bob Nystrom 472687101a Update docs to suggest replacing dynamic with a type parameter.
R=vsm@google.com

Review URL: https://codereview.chromium.org/1716593002 .
2016-02-18 16:14:54 -08:00
vsmenon 64f6ccb819 Update CHANGELOG.md 2016-02-18 16:09:27 -08:00
vsmenon de5b729e4a Update devc.dart 2016-02-18 16:07:50 -08:00
vsmenon c74bbb6c6d Update package.json 2016-02-18 16:07:30 -08:00
vsmenon 381464a6a7 Update pubspec.yaml 2016-02-18 16:07:01 -08:00
vsmenon 4f37e97956 Update STATIC_SAFETY.md 2016-02-18 15:43:19 -08:00
Vijay Menon 93a627bf44 Wrapperless dart:html and friends
This reuses the dart2js code.

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

Review URL: https://codereview.chromium.org/1700153002 .
2016-02-18 13:57:59 -08:00
Olivier Chafik 09845fbaf7 Use dart.global instead of window in debugger.dart
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1706973002 .
2016-02-18 16:38:00 +00:00
Vijay Menon 07155de9df Fix additional hint
Missed this locally, but hitting travis.  Probably need to update locally.

TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/1703263002 .
2016-02-17 13:31:21 -08:00
Vijay Menon a9bcaf6c5b Fix travis
This also regens based on the latest analyzer.  Looks like most improvements on the code.

See #456

TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/1710583002 .
2016-02-17 13:12:52 -08:00
vsmenon c2d42b14f8 Update STATIC_SAFETY.md 2016-02-17 11:19:08 -08:00
Olivier Chafik 8a28ce3c65 Introduce _emitParameterReferences to avoid mixing params with param references.
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1701583003 .
2016-02-16 14:39:15 +00:00
vsmenon 0e71ad70c6 Update CHANGELOG.md 2016-02-12 12:31:21 -08:00