zundel@google.com
0fbb7dc611
Remove error message when compile time constants used in +,-,/,* expressions
...
The type of sub expressions was computed to be 'number' for
integer math expressions. This caused an inappropriate
error message 'Not a compile time constant, expected int, got num'
Review URL: https://chromiumcodereview.appspot.com//9875002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5939 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 17:15:07 +00:00
scheglov@google.com
e6ca492a83
Remove AST dumps, useless for Editor
...
R=brianwilkerson@google.com ,zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9692006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5938 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 17:10:33 +00:00
devoncarew@google.com
32cd1b2d24
Fix for a windows path issue.
...
Review URL: https://chromiumcodereview.appspot.com//9844022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5936 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 16:58:11 +00:00
zundel@google.com
e5ca48a7d5
Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries
...
Adds a new cmdline flags
--dart-sdk to point it at a directory where the dart library files are staged
--platform the name of the platform {dartium, vm, frog, dart2js}
to target with the analyzer
Committed: https://code.google.com/p/dart/source/detail?r=5885
Review URL: https://chromiumcodereview.appspot.com//9860009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5930 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 14:20:29 +00:00
zundel@google.com
aa04541e71
Dartc erroneously reported a compile-time error on a const class with a non-final static field
...
Review URL: https://chromiumcodereview.appspot.com//9860051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5913 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 21:34:05 +00:00
zundel@google.com
1486f2602d
Revert "Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries"
...
This reverts commit r5885 which works locally, but not on the builder
Review URL: https://chromiumcodereview.appspot.com//9865025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5886 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 17:04:03 +00:00
zundel@google.com
b838d39acb
Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries
...
Adds a new cmdline flags
--dart-sdk to point it at a directory where the dart library files are staged
--platform the name of the platform {dartium, vm, frog, dart2js}
to target with the analyzer
Review URL: https://chromiumcodereview.appspot.com//9860009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5885 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 16:25:54 +00:00
danrubel@google.com
1dc4683926
Fix tests when AnalysisServer disabled
...
Review URL: https://chromiumcodereview.appspot.com//9865023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5882 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 15:58:07 +00:00
danrubel@google.com
a49c90d738
Address comments on AnalysisServer fixes
...
Review URL: https://chromiumcodereview.appspot.com//9860034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5878 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 14:39:19 +00:00
scheglov@google.com
94c35b872a
Initial implementation of "Rename Local Variable" refactoring.
...
R=messick@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9834028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5875 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 12:43:13 +00:00
zundel@google.com
3d07831594
Some compile time constants were not properly reporting static type warnings
...
http://code.google.com/p/dart/issues/detail?id=1957
Review URL: https://chromiumcodereview.appspot.com//9728006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5654 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-19 19:27:35 +00:00
brianwilkerson@google.com
2bb37f16b7
Close a stream when done
...
Review URL: https://chromiumcodereview.appspot.com//9716005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5595 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-16 21:36:28 +00:00
scheglov@google.com
575055777e
Remove Element.getNode() method
...
1. Use NodeElement in CompletionEngine
2. Don't use Element.getNode() in DartElementLocator
3. New tests for DartElementLocator
4. Clean up DartC tests to use NodeElement
R=brianwilkerson@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9703096
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5586 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-16 19:08:39 +00:00
scheglov@google.com
94dd8e61cf
Use NodeElement in SupertypeResolver
...
Use Element.getNameLocation() in TopLevelElementBuilder
R=zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9699030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5475 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 17:33:41 +00:00
scheglov@google.com
075b34c834
Use NodeElement to access Node in Resolver
...
Note, that such access it type safe, because we return NodeElement from corresponding Node subclasses, return other NodeElements from NodeElement accessors, etc.
R=zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9700019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5471 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 15:22:39 +00:00
scheglov@google.com
2fa3dd49f1
Add ClassNodeElement and allow Analyzer to use cached unimplemented members
...
Several other clean ups in Analyzer.
R=zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9689080
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5464 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 13:31:40 +00:00
zundel@google.com
b2b58c971e
Allow const factory on methods in parser
...
This got left out of an earlier patch.
Review URL: https://chromiumcodereview.appspot.com//9704006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5449 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 00:36:56 +00:00
zundel@google.com
c11ae36c38
Fixes cyclic constructor issue in dartc
...
I moved leg's test into language since the same test replicated the problem.
Review URL: https://chromiumcodereview.appspot.com//9689086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5447 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 00:19:23 +00:00
brianwilkerson@google.com
bd527bcea7
Step 1: Introduce a new method for source objects that will replace the current getUri
...
Review URL: https://chromiumcodereview.appspot.com//9677062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5440 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 21:49:26 +00:00
scheglov@google.com
4d8693d237
Remove unused code in ResolveVisitor
...
R=zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9677055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5429 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 19:25:08 +00:00
zundel@google.com
f9205b7150
Allow "const ... native" constructors and "const factory ... native" constructors in dartc
...
These are used in the VM and frog core library implementations.
Review URL: https://chromiumcodereview.appspot.com//9695057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5428 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 19:20:30 +00:00
scheglov@google.com
b91c22338f
Visit Node in CompileTimeConstantAnalyzer only if Node based
...
...in other case expect that FieldElement will return type from getConstantType().
R=zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9689063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5425 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 18:25:48 +00:00
scheglov@google.com
736155d448
Fixes for previous CL review comments
...
R=zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9695025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5375 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 00:53:51 +00:00
scheglov@google.com
ed2a5d0779
Step back and remove more getNode() invocations
...
In many cases we need Element.getNode() only for producing error.
This CL changes these places and well as other places where we can easily use only Elements without getNode().
R=zundel@google.com ,brianwilkerson@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9692002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5349 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 19:39:34 +00:00
zundel@google.com
f98d82c284
Update analysis to support adjacent string literals
...
http://code.google.com/p/dart/issues/detail?id=2079
Review URL: https://chromiumcodereview.appspot.com//9666015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5255 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 21:44:08 +00:00
scheglov@google.com
b2e15e7451
Make SourceInfo a class, rename its menthods.
...
This is preparation for avoiding calling Element.getNode() during analysis.
R=brianwilkerson@google.com ,zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9651004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5208 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 01:33:34 +00:00
scheglov@google.com
b724c6f5be
Use Element instead of Symbol.
...
Return typed Element where possible.
R=brianwilkerson@google.com ,zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9633009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5178 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 17:01:46 +00:00
danrubel@google.com
2284f69669
Properly resolve relative paths with spaces
...
Review URL: https://chromiumcodereview.appspot.com//9608003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5150 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 03:24:40 +00:00
zundel@google.com
e72ab9487d
Fix NPE in dartc
...
Review URL: https://chromiumcodereview.appspot.com//9639002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5147 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 01:20:09 +00:00
zundel@google.com
7f8a57919b
Specify the types for Element.classes, Element.elements and Node.nodes
...
Previously these lines gave type errors in dartc, but now they pass
without warnings.
b/5392897
Review URL: https://chromiumcodereview.appspot.com//9315061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5136 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 23:02:08 +00:00
zundel@google.com
3e4c6f2eb4
Fixes TypeVariableBoundsTest/01 for dartc
...
A problem that should have been flagged as a static-type warning
was flagged as a compile-time error instead.
http://code.google.com/p/dart/issues/detail?id=1900
Review URL: https://chromiumcodereview.appspot.com//9618029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5092 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 14:19:02 +00:00
zundel@google.com
a7669d35cc
Type assignment errors should be static type warnings, not compile-time errors
...
http://code.google.com/p/dart/issues/detail?id=1939
Review URL: https://chromiumcodereview.appspot.com//9605024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5053 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 20:58:56 +00:00
brianwilkerson@google.com
824be842fc
Fix a bug that caused editor to not get notified when files were compiled if there were errors early enough in the process.
...
Review URL: https://chromiumcodereview.appspot.com//9616031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5051 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 20:46:55 +00:00
scheglov@google.com
4b6c9f54f9
Use NodeList where possible.
...
R=brianwilkerson@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9600049
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5036 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 17:45:10 +00:00
jacobr@google.com
de1d525459
Enable new dart:html wrapperless frog bindings and wrapper dartium bindings.
...
Split unittest.dart into unittest_html and unittest_dom
Bug fixes to the new dart:html bindings to compile with dartc.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9600035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4998 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 00:30:09 +00:00
danrubel@google.com
b06f633867
New analyzeLibraries method
...
Review URL: https://chromiumcodereview.appspot.com//9601005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4970 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 18:53:35 +00:00
danrubel@google.com
7d2e793cba
Update native keyword checking to accommodate frog
...
Review URL: https://chromiumcodereview.appspot.com//9585003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4969 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 18:53:08 +00:00
devoncarew@google.com
ebc6743226
Remove a build and 3-4 compiler warnings from com.google.dart.compiler.js.
...
Review URL: https://chromiumcodereview.appspot.com//9595024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4964 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 17:48:00 +00:00
scheglov@google.com
15cd929a08
Use ASTVisitor as in new AST.
...
I'm going to morph DartC to use new AST step by step.
We need to have new AST, even with old parser, to easily switch later to the resilient parser and also for any other future work on refactoring, quick assists, etc.
R=brianwilkerson@google.com ,zundel@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9598002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4962 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 17:36:40 +00:00
zundel@google.com
0f3ef6185e
Removes unused 'normalized' field in many AST nodes.
...
Review URL: https://chromiumcodereview.appspot.com//9597025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4959 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 16:41:06 +00:00
zundel@google.com
ab603367c0
Update test.dart for detection output of machine formatted errors
...
This change causes the 'dartc' tests to be more sensitive to the difference
between a static type error and a compilation error. Instead of
relying on the return value from the test being 0 or non zero, the
code now turns on '--error_format machine' and checks type
error level 'ERROR' or 'WARNING' and the type of error for
'STATIC_TYPE' if there is a static type error. A new annotation
format adapted from multitests is introduced for standard test cases:
int foo = "hello"; /// static type error
The above annotation means that a static type error is expected.
Currently enforcement is very lenient. There must be at least as
many STATIC_TYPE error messages as there are '/// static type error'
annotations (and no ERROR level messages.)
Review URL: https://chromiumcodereview.appspot.com//9559007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4895 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 18:50:09 +00:00
danrubel@google.com
2e393c4913
Update method used by analyzeLibrary to correctly identify dart:core
...
Review URL: https://chromiumcodereview.appspot.com//9581004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4885 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 17:00:22 +00:00
danrubel@google.com
535e0ce372
Detect core libraries for frog and VM
...
Review URL: https://chromiumcodereview.appspot.com//9583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4883 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 16:46:31 +00:00
scheglov@google.com
c4fa02a635
Issue 1936. Unknown field from Dynamic has type Dynamic.
...
http://code.google.com/p/dart/issues/detail?id=1936
R=zundel@google.com ,brianwilkerson@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9569030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4833 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 22:05:12 +00:00
ager@google.com
6cd0ec3577
Add token to stderr as well as stdout for batch processing.
...
This makes it easy to tell when a test is completed and we have all
the output. stderr and stdout are independent file descriptors so
this is the only reliable way to know that you have flushed both.
Review URL: https://chromiumcodereview.appspot.com//9569003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4782 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 09:13:47 +00:00
scheglov@google.com
c81fcbafde
Remove backends.
...
R=zundel@google.com ,brianwilkerson@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9479013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4771 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 23:50:01 +00:00
sigmund@google.com
ee6a907611
isolates refactor: this change introduces 'dart:isolate' as a library. This is a
...
big global change, so let me explain in more detail. This refactoring CL does
the following:
- moves all the dart code for isolates in a common library (lib/isolate)
- changes frog to understand 'dart:isolate' imoprts by loading the code from the
location above.
- changes the vm to undernstand 'dart:isolate' imports by creating a separate
library that is part of the bootstrap. This follows the same code-structure
that Todd suggested in his CL introducing the mirror library
- changes dartc to use the shared isolate library as the source of truth for
type checking. I left around some of the internal js code in dartc so that the
backend continues to work for apps that don't use isolates.
- changes all tests that use isolates to import the library explicitly (this is a large bulk of the files in this CL)
- changes test status for tests we can't fix in this repo (e.g. co19)
- splits the isolate library code to make it possible to preserve some tests
without exposing internal types (e.g. tests about
serialization/deserialization)
- changes the create_sdk script to copy the isolate library to the sdk
- includes the isolate library in dartdoc
I'll wait for at least one lgtm from each area (dartc, vm, frog, sdk)
There is one important pending thing this CL doesn't do:
- update test_runner.dart: This should be updated next time we upload the new
binaries to tool/testing/bin
- dartium specific changes: Vijay, is there anything I need to do for dartium?
Review URL: https://chromiumcodereview.appspot.com//9422019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4647 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:50:44 +00:00
zundel@google.com
1d6d0fc624
Removes dependency on d8/v8 from dartc
...
Review URL: https://chromiumcodereview.appspot.com//9466041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4616 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 14:32:11 +00:00
zundel@google.com
c8d34435fd
Backout change in test.dart from -batch to --batch.
...
Review URL: https://chromiumcodereview.appspot.com//9447094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4594 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-26 14:20:08 +00:00
zundel@google.com
564d6c5cc1
Incremental build is now off by default
...
Also got rid of some legacy flag settings.
Review URL: https://chromiumcodereview.appspot.com//9447057
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4593 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-26 13:33:02 +00:00