Commit Graph

981 Commits

Author SHA1 Message Date
Vijay Menon 3377d2b7c5 Angular workarounds
- Workaround for symbolized methods (e.g., core.$map)
- dload/dput workarounds
- NSM workaround
- generic method type check workarounds

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1131143002
2015-05-14 12:47:32 -07:00
John Messerly ef8edb1273 fixes #175, fixed arrays
R=vsm@google.com

Review URL: https://codereview.chromium.org/1138533003
2015-05-08 14:33:37 -07:00
Leaf Petersen bf567bb94b Typing fixes to eliminate casts/dcalls
Tightens up some typing issues (mostly in the collections) to eliminate some casts and dynamic calls.  Also adds inference through parenthesized expressions.

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1122313002
2015-05-05 16:47:19 -07:00
Leaf Petersen 071e6d0d46 SDK fixes
This fixes all of the static errors from generating the SDK except those in the _interceptors library, and a set of errors associated with checks of the form (v is E) for generic type parameter E.  Most of the fixes consist of adding missing generic parameters, or making overrides consistent.  There are a few fixes to resolve issues around code that moved implicitly between hidden implementation classes and their public API classes, and some other miscellaneous fixes.

All of my changes are in the tool/input_sdk directory - the rest of the diff is generated code.

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1112403004
2015-05-05 10:58:33 -07:00
John Messerly b0899d64df fixes #150, broken code in js_number.dart
R=vsm@google.com

Review URL: https://codereview.chromium.org/1121853002
2015-05-01 14:37:19 -07:00
John Messerly 36373f06f2 add checks needed for covariant generics, and fixes #154, List<E> now has the right runtime type.
R=leafp@google.com

Review URL: https://codereview.chromium.org/1117793002
2015-05-01 14:11:52 -07:00
John Messerly 83a40f41c8 patch_sdk: fix part/import order
gets rid of one case of errors

R=leafp@google.com

Review URL: https://codereview.chromium.org/1104753002
2015-04-27 16:56:07 -07:00
Vijay Menon 0d49f0175a Generate static calls for Object fields and methods
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1100633006
2015-04-23 14:23:39 -07:00
Jacob Richman 2a1e4985d4 fuse List and js Array together and a few other misc fixes.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1071393007
2015-04-22 17:23:31 -07:00
John Messerly af584262c5 fix list initializers
also removes the int.parse hack, adds a special case to dindex instead.

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

Review URL: https://codereview.chromium.org/1093353004
2015-04-21 11:25:03 -07:00
John Messerly 1e43b3ad50 [refactor] js_codegen: remove currentClass, simplify visitSimpleIdentifier
We were tracking currentClass for no real reason.

Also attempted to discern what visitSimpleIdentifier was actually doing. It now prefers the original element (the "field" not the synthetic getter/setter) whenever possible. Previously was a mismash.

This little change tripped on the (larger, not fixed yet) issue #138 ... but I think I found a way around the issue for now, by tweaking the private TypeDataArray class.

R=jacobr@google.com

Review URL: https://codereview.chromium.org/1095563003
2015-04-21 11:21:20 -07:00
Jacob Richman 5a5ddca7bc Extension method support to move us closer to a valid List implementation.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1059583002
2015-04-03 14:52:04 -07:00
John Messerly db1d4fac75 reduce diff churn due to server_mode test
essentially verify the expected HTML in the test
this tripped on an interesting issue, we have two ways of computing MD5 hashes that produce different answers. I left that as a TODO.

R=jacobr@google.com

Review URL: https://codereview.chromium.org/1056613002
2015-04-01 13:49:11 -07:00
John Messerly 7cb01cb2a6 tweaks to build/test scripts
this is a follow up to reverted https://github.com/dart-lang/dev_compiler/pull/114
it relands it so it can pass on travis, with some additional tweaks to names

The new structure is:

    tool/
      presubmit.sh  # both build and test
      build_sdk.sh
      test.sh
      coverage.sh
    test/test.sh    # deprecated, with a warning message

Thoughts?

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1042863004
2015-03-30 12:52:03 -07:00
John Messerly 2de38f1bf7 Revert "Reuse test.sh under Travis and fixe failing test" 2015-03-30 12:22:02 -07:00
Patrice Chalin dfff27cf78 Reuse test.sh under Travis and fixed failing test
Now running test.sh under Travis (actually script has been renamed to
`tool/build_and_test.sh` since it built and tested :). Keeping
`test.sh` as alias to build_and_test.sh in case people are used to
using it in the test directory.

Also removed `_visitOrEmpty` to resolve the following analyzer hint (so
that tests would pass):
> [hint] The method '_visitOrEmpty' is not used
(/Users/chalin/git/dev_compiler/lib/src/codegen/js_codegen.dart, line
2028, col 16)
2015-03-27 17:48:48 -07:00
John Messerly 68aada46f4 run build_sdk.sh from travis
this is done by our test.sh script, but we aren't covering it
2015-03-27 08:25:24 -07:00
Kevin Moore ea8aef3c4b test both stable and dev branches of SDK, but coverage only on stable 2015-03-27 01:16:20 +01:00
Patrice Chalin f73b4ec612 Make codegen_test more self contained
Addressed codegen_test `TODO(jmesserly): it'd be nice to do all cleanup
here …`.
2015-03-26 11:52:49 -07:00
John Messerly e1c8e996b7 Replace dart_core.js with actual compiled SDK
Almost no calls are going to work at this point, but core.js can load
now and there is enough in place to continue to load sunflower.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1020043002
2015-03-20 09:41:00 -07:00
Vijay Menon 48d4a4e320 Allow S->T <: dynamic->T
In followup CLs, I will:
- Fix coercions to limit implicit ones.

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

Review URL: https://codereview.chromium.org/1010893004
2015-03-18 16:40:43 -07:00
Kevin Moore 6796ce6884 Adding Travis CI and Coveralls support
only use compact config if we're not doing code coverage

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1014573003
2015-03-17 08:19:56 -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
John Messerly 807d3b3b22 reorganize SDK inputs
it's all under input_sdk now:
  lib -> the lib folder
  private -> the dart:_* libs
  patch -> the files with @patch

I imagine we'll try and focus changes on the last two
2015-03-02 16:00:53 -08:00
John Messerly 2a5adfe05a fix analysis messages
seen on the latest dev channel editor w/ analysis server

R=sigmund@google.com

Review URL: https://codereview.chromium.org/962213003
2015-02-27 09:06:13 -08:00
John Messerly a3bbe2a291 cleans up sdk patching so we no longer have unresolved names
js_codegen.dart and patch_sdk.dart are the only human-changed files.

This also pulls in dart:isolate, which is depended on from one of the implementation libraries

This also moves dart:_* files back to `lib/_internal/compiler/js_lib/` because there's where libraries.dart points to, and hence Analyzer looks for them there. Alternatively, we could put them somewhere like `tool/input_sdk_internal` and then copy that file into the right path.

R=vsm@google.com

Review URL: https://codereview.chromium.org/955513008
2015-02-26 17:58:13 -08:00
John Messerly ead4fe2e85 merge class extensions from patch files.
There are a few examples of classes like this:

```dart
@patch
class StringBuffer {
  ... various @patch members ...
  // no @patch here
  void _writeString(str) { ... }
}
```

we need to merge in those members too

R=vsm@google.com

Review URL: https://codereview.chromium.org/955513007
2015-02-26 08:08:21 -08:00
John Messerly 89651ccdef cleanup patch generation to preseve comments and remove @patch
the only human authored changes here are tool/patch_sdk.dart

R=vsm@google.com

Review URL: https://codereview.chromium.org/959913003
2015-02-25 13:23:23 -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
John Messerly 6c7cd9b731 Begin to handle some of the *_patch.dart files
Moves: test/sdk --> tool/input_sdk_src
Also moves: test/sdk/lib/_internal/js_lib --> tool/input_sdk_patch
we'll eventually need to customize that code

Adds tool/patch_sdk.dart, an offline transformation step that produces: test/generated_sdk

Essentially this merges the "external" declarations and the @patch syntactically. There's a comment in tool/patch_sdk.dart explaining the rationale behind this approach.

There's still *lots* to do in the generated code. This does none of that. The only new code is tool/patch_sdk.dart and the minimum changes to test/codegen_test.dart and js_codegen.dart to get test.sh running and debuggable.

Tracking bug for SDK is https://github.com/dart-lang/dart-dev-compiler/issues/58

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

Review URL: https://chromereviews.googleplex.com/157137013
2015-02-20 08:58:01 -08:00
John Messerly c08494e36f add sdk version check
R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/140347013
2015-01-27 15:14:53 -08:00