Commit Graph

41 Commits

Author SHA1 Message Date
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 b292b10b19 fixes #109, code coverage for SDK generation 2015-03-27 08:21:07 -07: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
Sigmund Cherem fa03b6b422 Move sunflower to a new directory, make final tweaks to make it all work.
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1007313003
2015-03-18 15:53:59 -07:00
John Messerly 9cf5a077e9 coverage: increase coverage of js_codegen
it was already decent, but this should plug the two biggest holes: source maps and maps with non-string keys

R=vsm@google.com

Review URL: https://codereview.chromium.org/1013223002
2015-03-18 09:20:36 -07:00
Sigmund Cherem c2d0c1b8b9 locating runtime files automatically (fixes #96)
R=vsm@google.com

Review URL: https://codereview.chromium.org/1013363002
2015-03-17 18:52:24 -07:00
Sigmund Cherem d08b3e49bd Do cleanup instead of excluding runtime files
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/985933004
2015-03-12 10:06:19 -07:00
Sigmund Cherem 6d9564b4ff Support browser caching using hashes in serverMode (fixes #93, fixes #92).
Now the HTML can include a hash in the URL for cachable resources, and the serve knows how to include cache-control headers.

In the process of doing so, I had to change a couple things that made it possible to fix #92 as well (producing different output in the command-line than in server mode).

R=vsm@google.com

Review URL: https://codereview.chromium.org/993213003
2015-03-10 18:27:23 -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
Sigmund Cherem 7dd29efd8f Initial cut for a development server
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/973433003
2015-03-04 09:40:06 -08:00
Sigmund Cherem f7b7f43d28 Fixing layout in js output (use full paths rather than just the library name)
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/968273002
2015-03-03 09:05:09 -08:00
Sigmund Cherem 17c3dcfca6 Fix test related to sdk move
BUG=

Review URL: https://codereview.chromium.org/970223002
2015-03-03 09:03:44 -08:00
John Messerly 4d7aa8e397 add source maps support, fixes #50
R=sigmund@google.com

Review URL: https://codereview.chromium.org/965033002
2015-02-27 15:17:19 -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
Sigmund Cherem 9369b3e981 Fix new line breaks on }
R=leafp@google.com

Review URL: https://codereview.chromium.org/959073002
2015-02-26 14:32:48 -08:00
Sigmund Cherem 2ffd89471a Disable formatting and add new-lines to make tests faster.
R=vsm@google.com

Review URL: https://codereview.chromium.org/963593002
2015-02-26 13:13:56 -08:00
John Messerly 425c3d8359 don't run dart gen on JS patch code
R=vsm@google.com

Review URL: https://codereview.chromium.org/961493003
2015-02-26 08:07:22 -08:00
Sigmund Cherem e57c960817 rename package:ddc to package:dev_compiler
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/954773003
2015-02-24 17:01:15 -08:00
John Messerly 0e46bb35ba fix formatting to include test, exclude lib/src/js
R=sigmund@google.com

Review URL: https://codereview.chromium.org/953093005
2015-02-24 16:56:13 -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
Sigmund Cherem 6ca4479a85 Undo rename of analyzer now that we are unforked
BUG=

Review URL: https://chromereviews.googleplex.com/158907014
2015-02-24 10:06:47 -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
Sigmund Cherem ce3dd48740 Accept compilng HTML files
R=jmesserly@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/153157013
2015-02-18 16:48:56 -08:00
Sigmund Cherem b23578984b Unify naming of output libraries in both backends
R=jmesserly@google.com, leafp@google.com

Review URL: https://chromereviews.googleplex.com/157197015
2015-02-18 10:12:54 -08:00
Sigmund Cherem ae910f2860 Infer return types and field types based on overrides
R=jmesserly@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/145247013
2015-02-13 16:53:58 -08:00
Sigmund Cherem c08003a36e Add options and move the multi-package options to normal flags
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/149487013
2015-02-13 13:04:16 -08:00
John Messerly 591834b748 improve cascades
* better code for the case we already supported
* support the general case

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/154757013
2015-02-09 13:04:55 -08:00
John Messerly 73adf003e6 use cli_utils to get SDK dir
also a small cleanup to make it easier to construct TypeResolver (fixes a TODO) and fix a couple of typos

R=leafp@google.com

Review URL: https://chromereviews.googleplex.com/145437014
2015-02-09 11:25:17 -08:00
Leaf Petersen 3b3f101787 This CL rolls up a number of changes to the dart code generation.
Import/export directives are preserved, and new ones are generated using package syntax using Vijay's logic.  This is not yet robust for relative URIs, but is sufficient for our purposes.

Wrapper hoisting is disabled, and various wrapper generation bugs are fixed.

Type name qualification is done more selectively, and more correctly.

Casting is disabled in const contexts, with a severe warning.

Coercions and wrappers now both call into the dart logging runtime, and pass various useful information (currently mostly ignored).

This also adds some preliminary dart codegen tests, and hence includes a number of expected output files in the test/dart_codegen/expect directory.

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

Review URL: https://chromereviews.googleplex.com/141427014
2015-02-03 16:42:13 -08:00
John Messerly 3438d26f5f check in SDK dart:core snapshot for tests
also tweaks the formatter to ignore it for ease of diffing

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/145337013
2015-01-28 16:41:34 -08:00
John Messerly c64afcf15a add SDK baseline
lots of things wrong with this generated code, but it's a start
(this builds on https://chromereviews.googleplex.com/148007013/)

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/147147014
2015-01-28 13:11:08 -08:00
Sigmund Cherem 763e61f4d3 Compile library-by-library. This is a step closer to our incremental compile.
As part of this change I made codegen synchronous. Technically is not necessary,
but I think it reduces complexity a lot. For example, keeping it async would
have required more changes to the testing infrastructure. Let me know if you
want to keep that change separate though.

With this change, I'm removing one more use of element.node, which is necessary
to achileve our goal. There is only one more use of this API, for which John has
a CL out.

BUG=
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/145167013
2015-01-27 09:49:26 -08:00
Leaf Petersen b0a7024e5d Formatter run
Run the formatter on the repository

BUG=
R=jacobr@google.com

Review URL: https://chromereviews.googleplex.com/138207013
2015-01-12 13:16:35 -08:00
Sigmund Cherem c95d72647a Run latest formatter
Review URL: https://chromereviews.googleplex.com/131387013
2014-12-29 13:01:35 -08:00
Sigmund Cherem 4448f18cea Add a reporter, remove caching of source files and recording of info (in progress)
R=leafp@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/132767014
2014-12-19 15:10:38 -08:00
Kevin Moore fc9f071638 Removed unused members, fixed type on infoTypes
R=jmesserly@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/126507013
2014-12-12 19:00:11 -08:00
Sigmund Cherem 1c6787f47c Run the latest formatter on all files.
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/130817013
2014-12-11 16:33:01 -08:00
Sigmund Cherem 02a4650a24 Refactor: move code around a bit
- bin/
    devc.dart

- lib/
    devc.dart

    src/
       info.dart # static info we compute, used by checker & backends
       checker/  # implementation details for the checker
          checker.dart  # checking algorithm
          rules.dart    # type checking rules
          resolver.dart # same as today, type resolution via analyzer
       emitter/
          ...
- test/
     checker/    # unit tests for the checker internals
     codegen/    # left as is - maybe should rename to emitter?
     samples/    # stand alone samples that we run in the end_to_end tests.
     ...

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/128957013
2014-12-11 15:13:54 -08:00
John Messerly c3fdc6e570 Introduce SemanticNode type in place of List<StaticInfo>
R=sigmund@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/122327013
2014-12-10 12:57:17 -08:00
John Messerly 3124c7ec89 add the ability to easily test codegen by diffing against expected output
this makes changes easy to spot

some of this code was taken from old polymer.dart test scripts :)

R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/121567013
2014-12-09 16:52:05 -08:00