John Messerly
2de38f1bf7
Revert "Reuse test.sh under Travis and fixe failing test"
2015-03-30 12:22:02 -07:00
John Messerly
33aab9c0e0
Merge pull request #114 from chalin/chalin-0327-test-script-refactor
...
Reuse test.sh under Travis and fixe failing test
2015-03-30 12:08:56 -07:00
John Messerly
f0e35ab12c
fix arguments keyword used in our helper method
...
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1048873002
2015-03-30 10:46:13 -07:00
John Messerly
af714fed80
fix for static methods and names banned in strict mode
...
* static methods qualified properly
* static method privacy is now enforced
* avoid static method names banned in strict mode
* avoid variable names banned in strict mode
We might want to relax privacy (for both instance and static), but for now it's nice and consistent with instance methods using ES6 Symbol
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1034273003
2015-03-30 10:09:56 -07:00
Jacob Richman
a6ca53ee49
fix list literal initialization call fix typeof calls for primitive JS types add dart/collection.js to defaultRuntimeFiles list Enclose switch statement case blocks with braces to insure a block scope matching dart semantics
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1042003002
2015-03-30 09:42:29 -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
Sigmund Cherem
c700972067
Update span dependency: this fixes an issue where span context didn't include
...
the text
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1039813002
2015-03-27 16:57:37 -07:00
John Messerly
12b3fa3fec
Merge pull request #111 from dart-lang/travis_build
...
run build_sdk.sh from travis
2015-03-27 10:54:00 -07:00
Jacob Richman
0e0cff2e17
Fix try catch crasher bug due to null else case.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1036333003
2015-03-27 10:53:54 -07:00
John Messerly
75e652bf2b
Merge pull request #112 from dart-lang/coverage
...
fixes #109 , code coverage for SDK generation
2015-03-27 10:34:14 -07:00
Kenneth Endfinger
8de526ea70
Update README.md
2015-03-27 11:33:26 -04: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
John Messerly
b292b10b19
fixes #109 , code coverage for SDK generation
2015-03-27 08:21:07 -07:00
John Messerly
34e2fbabd7
fix temp used in postfix ops
...
Review URL: https://codereview.chromium.org/1039243002
2015-03-27 07:26:57 -07:00
John Messerly
2357e3013b
more care around generated names, fixes #60 #82 and #97
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1030063004
2015-03-26 17:47:31 -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
Sigmund Cherem
3ab4f01149
Pass through context information in error messages
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1023893004
2015-03-26 15:25:24 -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
48e334237b
[js_ast] adds Identifier that merges VariableDeclaration/Use and Parameter
...
Also changes Printer to not walk the tree an extra time unless we are minifiying.
The tree structure appears to be helping VarCollector, by encoding some information into the static AST structure. (although some aspects were unused, such as function names). It's easy enough to encode this behavior in VarCollector itself. Having a unified Identifier benefits our tree transform, since we don't need to worry about generating three different types of things under largely identical circumstances.
I'm planning to build on this later, but this version is purely a refactor.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1029583011
2015-03-25 16:01:02 -07:00
Vijay Menon
67e4bc583a
Rationalize coercions
...
This breaks out casts / coercions into:
Standard (on by default)
- DynamicCasts: dynamic -> T
- AssignmentCasts: T x = expr; // T must be a ground type
Inference (this will go away)
- InferableLiteral
- InferableClosure
- InferableAllocation
Implicit (no flag yet, but i'll add to disable by default)
- DownCastComposite: Any cast to a non-ground type
- DownCastImplicit: Any other implicit downcast not covered above
A flag is also added to enable/disable all wrapping. This is not off by default yet, but that is the intent.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1038583004
2015-03-25 14:51:54 -07:00
John Messerly
5306aa2384
Remove PropertyName from js_ast
...
This was added to our version, while still figuring out js_ast. As it is now, Printer handles property names quite well on its own, so the extra AST node doesn't add anything.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1030243002
2015-03-25 13:28:55 -07:00
Sigmund Cherem
232375de7c
Add missing visit methods
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1033443003
2015-03-23 16:06:59 -07:00
Sigmund Cherem
c24a91895a
Migrate to package:html
...
R=kevmoo@google.com
Review URL: https://codereview.chromium.org/1008533004
2015-03-23 13:28:43 -07:00
Sigmund Cherem
2bf7e0aed8
Transitive inference using SCC
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1028793002
2015-03-23 13:11:33 -07:00
Vijay Menon
1430655b9e
Treat Object and dynamic similarly
...
Note, this makes: T<dynamic> <: T<Object> and T<Object> <: T<dynamic>.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1024073003
2015-03-20 14:06:13 -07:00
Vijay Menon
c831595c88
Allow arity checks on dynamic function types
...
BUG=
R=jacobr@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1021273004
2015-03-20 10:40:43 -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
John Messerly
c587869d1d
bind to localhost instead of all interfaces, and fix closureWrap
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1022923005
2015-03-20 09:19:10 -07:00
Sigmund Cherem
87b7b0e431
Change defaults in server mode
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1007703004
2015-03-19 15:49:38 -07:00
Sigmund Cherem
deec4f2ed4
Allow dev-compiler folder to have a different name, instead check the pubspec
...
file for the package name.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1018043005
2015-03-19 14:10:40 -07:00
John Messerly
b62f4c06ab
sort classes in dependency order, or load lazily if needed, fixes #78
...
this also starts using compiled code in dart_core.js (just copy+paste for Object)
visitClassDeclaration was getting rather long, so it's now refactored to make the flow more clear.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1016003003
2015-03-19 10:03:22 -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
Sigmund Cherem
2ba454d945
Enable inference in the core libs
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1023543002
2015-03-18 16:24:23 -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
1b23c0ecb2
Copy resources refered to in the HTML to the output folder
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1014173002
2015-03-17 18:54:48 -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
Jacob Richman
d624c322d3
Suppress generation of JsGlobal and JsType code and use window as the default value instead of {} for libraries that define JsGlobal fields.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1013653004
2015-03-17 14:42:42 -07:00
Sigmund Cherem
06e73efda4
Turn on infer-from-overrides by default, rename inferStaticFromOtherStatics to
...
inferTransitively.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1015843002
2015-03-17 14:00:48 -07:00
Sigmund Cherem
212e520429
Handle type-inference on fields, consts, and inferable overrides
...
deterministically in library cycles.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1011933002
2015-03-17 13:12:51 -07:00
John Messerly
07feeb3119
js: fix core.Object, output order, static const fields
...
These are a few fixes trying to get the compiled SDK to load
R=vsm@google.com
Review URL: https://codereview.chromium.org/1011153002
2015-03-17 13:11:34 -07:00
John Messerly
7eb0f7e897
make unimplemented statements throw (they'll hit visitNode)
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/977963002
2015-03-17 09:59:57 -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
Sigmund Cherem
95c40873c9
Pin formatter to a specific version
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1011003002
2015-03-17 07:52:00 -07:00
Vijay Menon
e50906c0d3
Fix for conditional expressions
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/997143003
2015-03-16 10:09:25 -07:00
Sigmund Cherem
f9c4d35159
Fix in multi-package-resolver to support files that will be created later (graph
...
assumes the Source class exists, even when the file has not been created, we
consider that by default the file will be created on the location for the first
of the searchPaths)
R=vsm@google.com
Review URL: https://codereview.chromium.org/1001563003
2015-03-12 12:50:46 -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
228a475ed0
Fixes in codegen and test script
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/998043002
2015-03-11 17:16:05 -07:00
John Messerly
212b217506
server: create output directory if needed
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1001503003
2015-03-11 12:22:58 -07:00
Jacob Richman
2ed6fbe9e7
minor code cleanup
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1002443002
2015-03-11 08:36:23 -07:00