John Messerly
d52346c201
fixes #215 , removes special case for length
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1178523004 .
2015-06-10 12:21:49 -07:00
John Messerly
c7b3846d8e
fixes detection of SDK libraries
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1170813008 .
2015-06-10 09:59:18 -07:00
Olivier Chafik
d159b6ee79
Fix dart.equals("10", 10) (issue #210 )
...
See doc on == vs. === : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators
Note that the `== null` tests in the same function are probably preferable to `=== null` if both undefined and null values can be encountered.
2015-06-10 15:31:59 +01:00
Vijay Menon
321be0a426
Generate metadata
...
Fixes #198
BUG=https://github.com/dart-lang/dev_compiler/issues/198
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1177563003 .
2015-06-10 06:28:33 -07:00
Vijay Menon
5ff3864a18
Load on demand
...
This fixes ordering issues.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1171843002
2015-06-09 08:05:26 -07:00
John Messerly
023bfc087d
remove ignoreTypes flag, it doesn't work, see #134
...
If we wanted to bring this back, we should implement it differently, IMO
Instead simply replace all type annotations with `dynamic`
R=vsm@google.com
Review URL: https://codereview.chromium.org/1163393002
2015-06-08 16:57:24 -07:00
John Messerly
20d14a610c
fixes #209 , remove tree mutation from CodeChecker
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1172453002
2015-06-08 16:52:01 -07:00
John Messerly
a5132e6436
remove covariant generics option
...
Thoughts? Seems unlikely we'll go with invariant at this point.
I'd like to see covariant generics go, but it seems we need variance annotations of some sort before that becomes realistic. (e.g. Iterable is used all over the place)
R=leafp@google.com
Review URL: https://codereview.chromium.org/1165303002
2015-06-08 14:35:56 -07:00
John Messerly
73be4cab48
remove ClosureWrap option and related implementation
...
Vijay thought that we don't need this anymore, as we decided not to wrap.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1171713002
2015-06-08 14:32:42 -07:00
John Messerly
92f7129ae3
split analyze and format steps out of test.sh
...
presubmit.sh still runs all of them in the same order
often I'd like to iterate on analyze or rerun format without running all of the tests, and find myself copying analyze or format lines from test.sh
R=leafp@google.com
Review URL: https://codereview.chromium.org/1167233002
2015-06-08 13:48:47 -07:00
John Messerly
d88c36af77
remove unused allowConstCast option
...
this was for the Dart backend?
R=vsm@google.com
Review URL: https://codereview.chromium.org/1166163002
2015-06-08 13:19:06 -07:00
John Messerly
cce21a4991
dead code elimination in reify_coercions
...
with the removal of dart backend, we don't need support for _runtime
R=leafp@google.com
Review URL: https://codereview.chromium.org/1169873002
2015-06-08 13:17:00 -07:00
Vijay Menon
c139653fcb
Check for duplicate library names
...
This bites us on Angular - dart:collection and angular's collection
(facade) lib smash on top of each other, silently causing issues.
We'll need a better naming convention - perhaps we should use the lib
name and require uniqueness.
Fixes #208
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1145243013
2015-06-05 16:34:10 -07:00
John Messerly
a7adab29fa
fixes browser/runtime_test, and a few of extension member fixes
...
* fixes generic List. Because generic arrays have the proto of JSArray, which itself extends Array, we need to make sure we don't override members from Array.
* fixes tear offs, they were not preserving type signatures in some cases. This doesn't change how we store signatures, but perhaps something we could consider, to make this bug less likely.
* the defineExtensionMembers call was not getting emitted unless the type implemented at least one interface.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1156273010
2015-06-05 16:22:37 -07:00
John Messerly
cac786f671
fixes #173 , ability to use native JS indexers
...
dom_experimental could opt-in to use this
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1145833004
2015-06-05 12:14:09 -07:00
John Messerly
89b3d920d6
fixes #206 , add checking for unary ops
...
fixes #207 , checking for boolean conversions
R=leafp@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1147143007
2015-06-05 12:12:27 -07:00
Leaf Petersen
695ae10131
Delete dart2js specific private library code.
...
This trims out a large chunk of the more obviously dart2js specific stuff from js_helper.dart and its dependencies.
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1152333009
2015-06-05 09:52:18 -07:00
John Messerly
6c3cdd707d
fixes #40 , extension methods for primitive types
...
fixes #138 , extension methods for Iterable/List injected as needed, regardless of how the methods started
fixes #142 , extension methods and dynamic dispatch
small change that fixes #139 , recognize that '.length' doesn't need an extension method
Also restores JSArray, moved the methods out of List, which is back to just being an interface.
NOTE: this removes the capability of types that mix native JS members and some Dart extension members, instead it now *hides* all JS members for these native types. We'll want to bring that feature back to support dart:html, so it's just a simplification for now. Should be easy to add that capability when we pull in dart:html for reals.
R=leafp@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1153003003
2015-06-04 14:58:18 -07:00
Vijay Menon
4aaeaf6125
Remove dart backend
...
Fixes #205
R=jmesserly@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1148283010
2015-06-03 14:01:28 -07:00
John Messerly
2722aed77e
fixes #201 , add support for custom URL mapping
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1150143006
2015-06-03 09:40:48 -07:00
John Messerly
85242175d4
fixes #202 , check IndexExpression
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1160673003
2015-06-02 17:10:43 -07:00
John Messerly
8865229d8d
fixes #200 , library prefixes for unknown imports
...
Take 2. The first version passed checker_test but not inferred_type_test. The library prefix staticElement check needs to come first.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1161603009
2015-06-02 17:06:04 -07:00
John Messerly
33eee25590
fixes #43 , remove => workaround
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1169473003
2015-06-02 16:30:23 -07:00
John Messerly
145656318a
Revert "fixes #200 , library prefixes for unknown imports"
...
This reverts commit 026a4921957ee08f011eabf1c3deea6c5e8aa715.
BUG=
Review URL: https://codereview.chromium.org/1159013009
2015-06-02 13:23:26 -07:00
John Messerly
f6a2ec274a
fixes #200 , library prefixes for unknown imports
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1165823002
2015-06-02 13:21:24 -07:00
John Messerly
2b55297c68
remove generated_sdk from checked in code
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1162723007
2015-06-02 12:39:25 -07:00
Vijay Menon
c6ecb1df15
Fix DDC errors on DDC
...
Eating our own dogfood...
Some errors still in upstream packages, but this doesn't count Paul's recent CL.
> dart -c bin/devc.dart -i bin/devc.dart
package AE IMO IRCE STE LOC
analyzer 0 10 0 12 111627
shelf 0 0 1 0 1415
http_parser 0 1 1 0 1473
source_span 2 0 0 0 708
yaml 7 5 0 1 3850
dart_style 2 0 0 0 4577
html 0 14 1 108 12307
csslib 3 0 0 6 10227
utf 0 0 0 2 1516
------------ ----- ----- ----- ----- -------
package AE IMO IRCE STE LOC
total 14 30 3 129 175897
% 0.01 0.02 0.00 0.07 100
Where:
AE: AnalyzerError
IMO: InvalidMethodOverride
IRCE: InvalidRuntimeCheckError
STE: StaticTypeError
LOC: LinesOfCode
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1160223006
2015-06-01 17:02:18 -07:00
John Messerly
9a95d18c13
fixes #182 , avoid injecting a duplicate link rel=stylesheet
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1145893008
2015-06-01 16:54:01 -07:00
John Messerly
e15f53d923
upgrade dependencies, including migration to package:test
...
dart_style becomes a dev_dependency, and remove the ability to auto-run it from dart backend, instead use the test formatter
migrate to package:test, which has a few tricky bits:
* expect can only appear inside a test now (https://github.com/dart-lang/test/issues/132 )
* mirrors is needed to get the test folder (https://github.com/dart-lang/test/issues/110 )
* test `main` can't take arguments. not sure what's up there, but not a big deal for us either.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1166683005
2015-06-01 14:54:13 -07:00
John Messerly
498ecbc7c3
small cleanups to dart_runtime.js
...
these were caught by the webstorm ES6 plugin
biggest one is strict mode doesn't like local functions except at top level, I think becasue the name is not scoped correctly (for historical reasons). Instead `let name = () => ...;` allows correct scoping for `name`.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1152783005
2015-06-01 09:32:40 -07:00
John Messerly
92773980ab
Revert "fixes #173 , ability to use native JS indexers"
...
This reverts commit 8dc1eeeb4dcc4d186f59513abd18f98e67c36339.
Review URL: https://codereview.chromium.org/1160343003
2015-06-01 09:31:01 -07:00
John Messerly
59852b526b
fixes #173 , ability to use native JS indexers
...
dom_experimental could opt-in to use this
Review URL: https://codereview.chromium.org/1145833004
2015-06-01 08:46:26 -07:00
John Messerly
f0dcd30114
tweak build_sdk to display color unified diffs, and move diff to after the build succeeds
...
when debugging js_codegen errors, this makes it a lot easier to see the stack trace.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1153313005
2015-05-29 15:47:50 -07:00
John Messerly
2ae3c13d5d
fix formatting
...
TBR
Review URL: https://codereview.chromium.org/1157093006
2015-05-29 14:55:56 -07:00
John Messerly
81fc365b95
fixes #193 , factory constructors as static methods
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1156993015
2015-05-29 14:52:10 -07:00
Vijay Menon
a73dec2030
Fix checked mode error
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1167543002
2015-05-29 13:17:56 -07:00
Vijay Menon
526ac2e153
Modified sunflower
...
Need to rebase over this pending CL before it's ready for review / landing:
https://codereview.chromium.org/1143953004/
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1147053003
2015-05-29 06:24:48 -07:00
Vijay Menon
224ebe487f
Added Usage instructions
...
Fixes #165
R=jmesserly@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1157093004
2015-05-29 06:04:31 -07:00
Vijay Menon
562313e113
Fixes for sunflower
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1143953004
2015-05-28 09:28:55 -07:00
Vijay Menon
8e118887b0
Check for SDK error regressions on presubmit
...
This is to keep us from inadvertently regressing the SDK. See related bug #103
R=leafp@google.com
Review URL: https://codereview.chromium.org/1154213008
2015-05-28 09:26:18 -07:00
Vijay Menon
9e5896fdae
Use analyzer's sealed type list
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1161613005
2015-05-28 06:03:48 -07:00
Leaf Petersen
aac783cfcf
Allow null args to dynamic invocations
...
Fixes #194 .
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1149243002
2015-05-26 11:28:59 -07:00
Vijay Menon
32e4f401dd
Fixes #196 - Enable resources to be served
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1152573003
2015-05-22 09:35:35 -07:00
Vijay Menon
980c0904b3
Add types to shift operations
...
Not sure why these weren't typed in the first place.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1143273002
2015-05-22 09:08:35 -07:00
Leaf Petersen
e270186901
Fix names in named parameter lists
...
This fixes #195 .
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1150623004
2015-05-21 15:04:22 -07:00
Leaf Petersen
694240c2ea
Add constructors to signatures.
...
This adds the types of constructors onto class signatures and makes them available via an exported function in the dart runtime.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1152583002
2015-05-21 14:49:11 -07:00
Leaf Petersen
99433b7121
No dynamic at runtime.
...
Reify dynamic as bottom or Object as appropriate in the generated code.
For general function types, dynamic parameters become bottom, and all other uses of dynamic become Object.
For concrete function types (the rtti attached to function objects) dynamic parameters also become Object.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1148333003
2015-05-20 16:36:25 -07:00
Leaf Petersen
50e50530ab
Use short array syntax in method signatures.
...
This follows up on a suggestion from jmesserly to use a shorter syntax in methods signatures. Replaces:
dart.functionType(t, [t0,..., tn], extras)
with
[t, [t0, ..., tn], extras]
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1145283002
2015-05-20 16:11:42 -07:00
Leaf Petersen
fcb7dfad95
Use signature inheritance when method types are unchanged
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1144303003
2015-05-20 13:41:48 -07:00
Leaf Petersen
8322940ecd
Use dart.tearoff helper at tearoff sites.
...
When we tear off a method, replace the obj.foo.bind(obj) pattern with dart.tearoff(obj, 'foo'), and the dart.bind(exp, 'foo') pattern with dart.tearoff(exp, 'foo'). This helper does both the bind and attaches rtti.
This CL also stops binding of static methods when they are town off, since I think this is unnecessary.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1142293002
2015-05-20 11:13:36 -07:00