Commit Graph

2256 Commits

Author SHA1 Message Date
vsmenon 0bccf25a0d Merge pull request #65 from dart-lang/readme
add README
2015-02-24 09:56:17 -08:00
Dan Grove bdc086d40d Update wording. 2015-02-24 09:01:22 -08:00
John Messerly 7dbb2c44ef Add js_ast package at lib/src/js
This is a clean copy so it will be easier to review my changes for ES6. This is r43816 from SVN pkg/compiler/lib/src/js, with dart2js internal files removed (js.dart, rewrite_async.dart)

As with analyzer, we'll have a fork so we can iterate faster. But we'll upstream the changes.

R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/160777013
2015-02-24 08:41:14 -08:00
Vijay Menon ee887b1ed9 Flag to ignore types during codegen
R=jmesserly@google.com, leafp@google.com

Review URL: https://chromereviews.googleplex.com/161647013
2015-02-20 17:06:01 -08:00
Sigmund Cherem 608906db87 Fixes needed so we work correctly with the latest analyzer
Review URL: https://chromereviews.googleplex.com/157367013
2015-02-20 15:39:28 -08:00
Vijay Menon ddce235e3d Set nonnullable types by flag
R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/156397013
2015-02-20 14:34:44 -08:00
Sigmund Cherem d2834b49a6 Reenable type promotion
R=jmesserly@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/159667013
2015-02-20 13:56:46 -08:00
Sigmund Cherem 1a83c63a08 Small changes to reduce modifications in analyzer
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/160677013
2015-02-20 13:48:14 -08:00
Dan Grove 67eb4858b3 add README 2015-02-20 11:33:51 -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 c1f84cfada Add more flags, fix missing initialization of a couple flags
BUG=
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/150577015
2015-02-19 16:13:21 -08:00
John Messerly 0ddedfb3da fix incorrect DartObject reference
Review URL: https://chromereviews.googleplex.com/156337013
2015-02-19 09:32:21 -08:00
Vijay Menon 7bb76996ea Fix maybe nullable check when no nonnullable types
R=leafp@google.com

Review URL: https://chromereviews.googleplex.com/154527013
2015-02-19 08:57:27 -08:00
Sigmund Cherem d78ecd3241 Infer consts and final fields based on RHS
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/142457013
2015-02-19 08:34:01 -08:00
Sigmund Cherem 34fd717c0a Minor changes to fix up edit_files, which broke when we moved the multi-package
options from -D to flags.

BUG=
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/151567013
2015-02-19 08:28:55 -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
John Messerly 7c1ab1f04d work around issue #51, super restrictions in V8
Adds an explicit "extends dart.Object", which we probably want for other reasons (e.g. toString, runtimeType, hashCode)

Attempts to recover some readability by tweaking the name of the initialize functions. This closes #51, but we should open another tracking bug because there are concerning aspects to this workaround.

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

Review URL: https://chromereviews.googleplex.com/150417015
2015-02-18 16:27:32 -08:00
Vijay Menon 260cfc05d2 Make nonnullability configurable
John: I added code in the JS codegen to query which primitives are non-nullable.

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

Review URL: https://chromereviews.googleplex.com/155407013
2015-02-18 14:20:22 -08:00
Vijay Menon eb3c51e6f3 Check default parameters properly
R=leafp@google.com

Review URL: https://chromereviews.googleplex.com/155367013
2015-02-18 12:13:30 -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
John Messerly 694c93c61f fix #41, named arguments with conversions
R=leafp@google.com

Review URL: https://chromereviews.googleplex.com/150407013
2015-02-17 13:27:37 -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 46dfefcae7 Fix check of functions agasint void.
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/156137013
2015-02-13 16:48:37 -08:00
Sigmund Cherem 0ab8340e79 Minor improvement on dart:mocks mocks, and fix related test.
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/155267013
2015-02-13 16:18:36 -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
Vijay Menon 394bb7fbe7 Fix typename for bottom
R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/151297013
2015-02-13 09:35:24 -08:00
John Messerly f7a5ff4523 workaround for arrow function bind this
I filed https://github.com/dart-lang/dart-dev-compiler/issues/43 to track removal of this workaround

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/154077013
2015-02-12 15:18:22 -08:00
Sigmund Cherem 26061d84eb Get rid of redundant error messages.
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/146637013
2015-02-12 13:23:14 -08:00
John Messerly fe19170e93 better handling of string literals and interpolation
fixes https://github.com/dart-lang/dart-dev-compiler/issues/42
V8 has shipped template strings: https://code.google.com/p/v8/issues/detail?id=3230

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/152127013
2015-02-12 11:45:39 -08:00
John Messerly 267f6fb0a1 exclude test from dartfmt
formatter is currently failing on generated code files

Review URL: https://chromereviews.googleplex.com/150227013
2015-02-12 11:44:00 -08:00
Vijay Menon 266b6df92d Error on uninitialized non-nullables
R=jmesserly@google.com, leafp@google.com

Review URL: https://chromereviews.googleplex.com/157727013
2015-02-12 09:44:41 -08:00
Sigmund Cherem bd5ab4bfb4 Upgrade to use latest ddc_analyzer
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/156657014
2015-02-11 16:57:15 -08:00
John Messerly bf9a2b9015 add test tools, implement generic type constructor
test tools are from https://github.com/webcomponents/webcomponentsjs/tree/master/tests/tools

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/151127013
2015-02-11 16:53:05 -08:00
Sigmund Cherem 0680aea0a7 Change to use dcc_analyzer to make it easier to rev other dependencies on analyzer
BUG=
R=dgrove@google.com, jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/154617014
2015-02-11 15:26:33 -08:00
Vijay Menon 9265d63a32 Fix core libs for primitives
R=jacobr@google.com, jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/155017013
2015-02-11 14:10:27 -08:00
Vijay Menon e64630186d Add non-nullability logic for primitives
Still need to:
- Fix our dart:core errors
- Change DownCastLiteral to error
- Handle "int x;", etc.

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

Review URL: https://chromereviews.googleplex.com/156787013
2015-02-11 12:08:34 -08:00
John Messerly d1cffd61c4 fix indent for generic classes. the previous change intentionally skipped indent for easier diff viewing.
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/157687013
2015-02-11 10:10:57 -08:00
John Messerly 083e4c4889 reified generics baby steps
introduces a memoized function that produces the generic type instance
generic type parameters are closed over, making it easy to get them and ensure they flow correctly through base class/mixins.

also implements the unimplemented features in _typeName.

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

Review URL: https://chromereviews.googleplex.com/157627013
2015-02-11 09:03:03 -08:00
Leaf Petersen aca4469d51 Workaround type name bug
There's a bug in the analyzer (fixed in ToT) that results in screwy names for function types sometimes.  This works around it for now.

BUG=
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/156727013
2015-02-10 17:37:13 -08:00
John Messerly f85c2eb649 fix mixin field init, implicit-this
also slight change to sunflower example

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/144247014
2015-02-09 13:11:26 -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
John Messerly bf682828f8 implement try and switch
R=leafp@google.com

Review URL: https://chromereviews.googleplex.com/144527014
2015-02-06 10:25:13 -08:00
John Messerly 9957696748 improve invoke/as code
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/149937013
2015-02-05 15:46:42 -08:00
Vijay Menon 29718b72e8 Support Function object typing
R=jmesserly@google.com, leafp@google.com

Review URL: https://chromereviews.googleplex.com/147547013
2015-02-05 14:06:09 -08:00
John Messerly 170c06e3d4 partial support for IsExpression
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/148937013
2015-02-05 09:52:33 -08:00
Vijay Menon c2a2fa5a79 Minor dbinary fix
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/148987014
2015-02-05 09:40:20 -08:00
John Messerly 7b60c4140f simplify named ctors
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/150947013
2015-02-05 09:18:50 -08:00
John Messerly 6d41af0fe4 another attempt to pin dart_style to a working version.
we need the fix for https://github.com/dart-lang/dart_style/issues/156
and https://github.com/dart-lang/dart_style/issues/67 is nice too

Review URL: https://chromereviews.googleplex.com/147537013
2015-02-04 16:46:49 -08:00
Vijay Menon add3878570 Pin dart_style to 0.1.3 until we roll analyzer
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/154667013
2015-02-04 16:04:04 -08:00