Commit Graph

8 Commits

Author SHA1 Message Date
Paul Berry 421db9c69c Re-land "Implement proper checking for callability of Function class."
(was reverted in https://dart-review.googlesource.com/c/sdk/+/40980
due to an analyzer bot breakage)

Original commit message:
Implement proper checking for callability of Function class.

There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks.  This flag has been removed, since the new
behavior is now standard in Dart 2.0.

Fixes #31509

Change-Id: Ice5cf38bbc648badf7f2563ff930b69f9a799635
Reviewed-on: https://dart-review.googlesource.com/41120
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-14 11:30:23 +00:00
Paul Berry 35aea15097 Revert "Implement proper checking for callability of Function class."
This reverts commit 6837dafcc3.

Reason for revert: Broke analyzer bots.

Original change's description:
> Implement proper checking for callability of Function class.
> 
> There was some old (incorrect) logic for doing this, behind the flag
> enableStrictCallChecks.  This flag has been removed, since the new
> behavior is now standard in Dart 2.0.
> 
> Fixes #31509
> 
> Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
> Reviewed-on: https://dart-review.googlesource.com/40509
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Mike Fairhurst <mfairhurst@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com,mfairhurst@google.com

Change-Id: Ib631ad16bc5e937ff914127d1c5330f3fcaff2c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/40980
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-02-13 19:56:35 +00:00
Paul Berry 6837dafcc3 Implement proper checking for callability of Function class.
There was some old (incorrect) logic for doing this, behind the flag
enableStrictCallChecks.  This flag has been removed, since the new
behavior is now standard in Dart 2.0.

Fixes #31509

Change-Id: I4a6da34a4b85ea8409f6e0d14c377a586546056a
Reviewed-on: https://dart-review.googlesource.com/40509
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2018-02-13 14:19:08 +00:00
Bob Nystrom 68dc77f456 Build DDC's SDK as part of the regular build.
This involves a few main pieces:

- Add code to the GN scripts to generate DDC's patched SDK and then
  compile it to summaries and JS in the build output directory.

- Add support to the underlying DDC build scripts to support controlling
  which files are built where.

- Update test.dart to use the DDC SDK from the build directory.

- Update create_sdk to use the built SDK instead of the checked in one.

- Fix various internal DDC tools to build their own copy of the SDK
  (since they can't easily find the one in the build directory because
  it's path if config-specific) and use those.

- Delete the checked DDC SDK JS and summaries.

I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.

The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.

Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-20 23:24:07 +00:00
Jenny Messerly ef3ac59dd6 add a dartdevk command that compiles with the new front end
This ports a fairly large part of DDC's Analyzer-based code generator,
however most nodes are not supported yet.

The goal is to preserve all functionality of code that was ported,
except for deprecated features (e.g. mirrors, fuzzy arrows, libraryRoot).

Change-Id: I3b10d5773c7c10a740fa336720243b03c6b82529
Reviewed-on: https://dart-review.googlesource.com/10705
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-16 21:13:52 +00:00
Bob Nystrom 7b17a3dd01 Use "|" as the separator between module path and name. (#30106)
* Use "|" as the separator between module path and name.

":" is already a path character in Windows. This is why the
dartdevc tests aren't working on Windows. Because they try to do:

-sC:/some/path/blah.dart:blah

And it splits at the first ":". Oops.

* Switch to "=" for separating module path from name.

It looks a little funny when used with "--summary=", but it works fine
and is very unlikely to be used for anything else on any platform
(since we already use it as the separator between arg name and value).
2017-07-07 17:13:43 -07:00
Bob Nystrom 0b2c9b048d Dynamically load packages for dartdevc tests in test.dart.
This involves a few pieces:

- Add support to DDC for specifying the module name associated with a
  given summary. This lets test.dart invoke DDC using summaries in the
  build directory outside of the directory containing the test itself.

- Add support to the build scripts for building the packages. This adds
  a new GN target that builds everything needed to run test.dart with
  dartdevc. In particular, it invokes build_pkgs.dart to compile the
  relevant packages to JS+summary so that the tests can use them.

  This requires some changes to build_pkgs.dart so it can output to a
  given directory.

- In test.dart, when tests are compiled with dartdevc, pass in the
  summaries for the packages so they don't get compiled in. Then, when
  the test is run, configure require.js with the right paths to their
  JS files so they can be loaded.

  I also removed a bunch of unneeded buildDir parameters being passed
  around the various CompilerConfiguration class methods now that they
  have direct access to the configuration.

Fix #29923.

R=vsm@google.com, whesse@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2955513002 .
2017-06-29 13:45:57 -07:00
Dan Rubel 55ef6e193c support --options flag and other analysis options flags in DDC
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic

As well as general refactoring and cleanup of DDC options processing

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2598593003 .
2017-01-04 18:15:21 -05:00