iposva@google.com
431e8329bb
Fix http://dartbug.com/1133 :
...
- Incrementally concat error messages to avoid hitting
a maximum error message size.
Review URL: https://chromiumcodereview.appspot.com//9334007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4135 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-10 16:59:41 +00:00
srdjan@google.com
1d7d76a43b
Optimizing code generator expects that every AST node is traversed once, i.e., the nodes are not reused. Unfortunately this is not the case in assignment operations with arrays (e.g. a[i] += 3).
...
The proper solution would be to clone array and index nodes but that would require too many changes. Long term we can't / won't use AST nodes for optimization purposes.
Short term fix is here: load array and index and release their CodeGenInfo before value is traversed so that the value computation can set its own CodeGenInfo on the same node.
Review URL: https://chromiumcodereview.appspot.com//9373025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4121 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-10 08:30:53 +00:00
regis@google.com
851682f104
Represent declared type parameters of a class as an array of TypeParameter
...
rather than an array of String and simplify code accordingly.
Rename the field holding type parameter bounds of a class.
Note: I retract my earlier suggestion to Srdjan to represent interfaces of a
class (as well as its canonical types) as a TypeArguments. This would require
more code to check for an empty array and for growing the array. Besides, these
are really arrays and have nothing to do with type arguments. I removed the
corresponding TODO(srdjan).
Review URL: https://chromiumcodereview.appspot.com//9368032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4096 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-09 21:28:53 +00:00
hausner@google.com
b43152a477
Fix issue 1246
...
continue; inside a switch statement jumps to outer loop.
http://code.google.com/p/dart/issues/detail?id=1246
Review URL: https://chromiumcodereview.appspot.com//9347032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4013 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-07 23:27:51 +00:00
regis@google.com
2edb4ae9c7
Add token index position to classes and types for more accurate error reporting.
...
Review URL: https://chromiumcodereview.appspot.com//9325047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3965 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-06 19:52:02 +00:00
srdjan@google.com
be66ab9a1c
Fix for issue 1307: throw runtime exception instead of reporting a compile time error if a static call cannot be resolved.
...
Review URL: https://chromiumcodereview.appspot.com//9316100
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3922 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-03 22:25:16 +00:00
turnidge@google.com
0ddd4c04e9
Dart_PropagateError, take 2.
...
This change hopefully takes care of the non-mac build issues. The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com
ae88492093
Revert Dart_PropagateError until I can track down the problems in
...
checked mode tests.
Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com
26e24ede55
More fixes for non-mac builds.
...
- Don't use NULL in arithmetic in LongJump::IsSafeToJump
- Various functions need to return a faux value on unreachable branches.
Review URL: https://chromiumcodereview.appspot.com//9315041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3819 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:49:36 +00:00
turnidge@google.com
9da62c5fea
Add Dart_PropagateError.
...
This function can be used in native functions to properly pass all
errors up the stack.
Set the long jump base in the Compiler instead of outside of the
compiler. A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values. This includes
all of the DartEntry and DartLibraryCall functions.
In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions. I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
hausner@google.com
0c61be512e
Allow assignment expressions in conditional expressions
...
Fix issue 1243 (http://code.google.com/p/dart/issues/detail?id=1243 )
Also fix issue 1370 (name of internal temporary variables, order of expression evaluation.)
Review URL: https://chromiumcodereview.appspot.com//9310007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3768 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 00:49:47 +00:00
srdjan@google.com
9e77768c91
Fix for bug 1229: Unary operator plus is not allowed ... except for literals.
...
Add tests for incorrect literals, e.g. "+ 5".
Added a temporary token kTIGHTADD that represents an ADD not terminated by a whitespace. It is temporary and eliminated in the parser (code generator ot AST do not see it). It is used to recognize correct literals.
Review URL: https://chromiumcodereview.appspot.com//9264051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3745 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 20:05:24 +00:00
regis@google.com
5efeb28010
Fix build breakage.
...
Review URL: https://chromiumcodereview.appspot.com//9302025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3707 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 03:44:01 +00:00
regis@google.com
980cbf9c74
Store resolved library prefix in unresolved class object in order not to repeat
...
unnecessary library prefix resolution.
Remove redundant Type::NewParameterizedType() helper.
Simplify parsing of qualified identifiers.
Cleanup parsing of factory methods.
Fix resolution of imported types (add tests).
Review URL: https://chromiumcodereview.appspot.com//9233039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3703 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 00:07:07 +00:00
regis@google.com
76a765b72f
Simplify parsing of 'new' operator.
...
Fix checking of default factory type parameters (add new tests).
Start cleanup of class resolution code in parser and finalizer.
Review URL: https://chromiumcodereview.appspot.com//9290065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3632 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-26 23:50:29 +00:00
ngeoffray@google.com
b12ed463bd
Change error message (and not the internal method names) to report 'final field' instead of 'const field'.
...
Review URL: https://chromiumcodereview.appspot.com//9117025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3592 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-25 08:09:47 +00:00
regis@google.com
54bf52428d
Allow the list of type parameters in the default factory clause to be omitted.
...
Review URL: https://chromiumcodereview.appspot.com//9169032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3587 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-25 01:30:14 +00:00
regis@google.com
f9e785eb29
Remove support for obsolete syntax of factory methods and default classes.
...
Review URL: https://chromiumcodereview.appspot.com//9285031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3578 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 22:37:45 +00:00
ager@google.com
4efd1f98fa
Split dart:builtin into dart:builtin and dart:io.
...
- dart:builtin is implicitly imported.
- dart:io has to be explicitly imported.
I will update the macos and windows stable test binaries when we
are happy with the solution.
R=iposva@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9254026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3537 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 07:36:59 +00:00
regis@google.com
ed9d7a399f
Optimize parsing of qualified identifiers.
...
Review URL: https://chromiumcodereview.appspot.com//9271023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3509 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-23 19:56:35 +00:00
asiva@google.com
bf1b2bbeb9
Improve compile times for swarm application startup
...
- Avoid creation of getter/setter symbol when all we need to do is a lookup
- Add LookupGetterFunction/LookupSetterFunction to avoid having to create the getter name/setter name before doing a lookup
Review URL: https://chromiumcodereview.appspot.com//9265021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3453 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-20 00:55:39 +00:00
hausner@google.com
ffa4950202
Fix compiler stats timer code
...
Account for recursive start/stop of timer. This has probably been broken since the beginning, but was only caught now after Siva added an assert in timer code.
Review URL: https://chromiumcodereview.appspot.com//9150040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3443 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 18:52:08 +00:00
regis@google.com
5b1da9fc27
Skip qualified identifiers that are part of ignored types.
...
Review URL: https://chromiumcodereview.appspot.com//9150036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3441 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 18:31:55 +00:00
asiva@google.com
dad0f5c843
Improve compilation times for swarm application startup.
...
- Avoid multiple calls to LookupFunction and LookupField once for static and once for dynamic.
Review URL: https://chromiumcodereview.appspot.com//9252033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3423 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 01:50:32 +00:00
hausner@google.com
aaf01d801a
Fix named parameter function calls
...
Issue 1199
Review URL: https://chromiumcodereview.appspot.com//9252027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3422 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 00:51:39 +00:00
hausner@google.com
3ebdf081ca
Set breakpoint at url, line number
...
Add debugger functionality to set breakpoint at given url and line number.
Review URL: https://chromiumcodereview.appspot.com//9240014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3420 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 23:15:56 +00:00
asiva@google.com
806f6ddc62
Improve function compilation times for swarm application startup.
...
- Add a String::Equals(const String& str) method.
- Pass in isolate parameter if present for some handle creation functions.
Review URL: https://chromiumcodereview.appspot.com//9232017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3413 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 20:10:18 +00:00
regis@google.com
366695d347
Ignore parsed types of local variables in unchecked mode and replace them with
...
the Dynamic type.
Review URL: https://chromiumcodereview.appspot.com//9232016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3404 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 18:08:04 +00:00
hausner@google.com
600c0e4570
Report error on duplicate supertypes
...
Report error if the same type appears more than once in the implements
or extends list.
Review URL: https://chromiumcodereview.appspot.com//9252001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3403 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 17:58:05 +00:00
turnidge@google.com
53ba5c402e
Make the "sticky error" an Error instead of a String.
...
I do this in preparation for using the sticky error to implement
isolate unwinding.
Review URL: https://chromiumcodereview.appspot.com//9186058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3367 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 19:54:02 +00:00
hausner@google.com
6d0e70e334
More parser stuff to handle pseudo keywords as identifiers
...
More pathological cases.
Review URL: http://codereview.chromium.org//9212018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3318 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-14 00:44:10 +00:00
hausner@google.com
197348daa2
Fix frog build
...
Doesn't handle pseudo kw right.
Review URL: http://codereview.chromium.org//9174011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3305 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 19:41:33 +00:00
hausner@google.com
343dff6255
Proper handling of built-in identifiers
...
Allow pseudo-keywords (built-in identifiers) as regular identifiers for anything but class names, interface names, typedef names.
Still todo: Update blacklist of class/interface names, disallow pseudo-keywords as type parameter names.
Review URL: http://codereview.chromium.org//9107070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3303 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 19:24:50 +00:00
iposva@google.com
731616c7d3
- Remove support for ">>>" operator.
...
Review URL: http://codereview.chromium.org//9203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3279 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 09:10:48 +00:00
regis@google.com
5a11b9b3ad
A class/interface cannot implement/extend a type parameter (issues 886 and 887).
...
Added tests.
Review URL: http://codereview.chromium.org//9153006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3122 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 00:01:47 +00:00
hausner@google.com
ee79bc031d
Second try at additional nested block in functions.
...
The last change broke dartium tests because as a side effect, the generated
code size increased by 2 or 3 percent. Fixed this unintended side
effect.
Review URL: http://codereview.chromium.org//9109024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3013 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 21:28:32 +00:00
vsm@google.com
981772b59e
Reverting r2970 to fix Dartium break
...
This should get the Dartium bot green again.
TBR=hausner
TEST=language/HelloDartTest
Review URL: http://codereview.chromium.org//9116002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2980 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 06:31:17 +00:00
hausner@google.com
5796ad3e3a
Fix potential problem with expression evaluation.
...
Review URL: http://codereview.chromium.org//9110001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2976 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 01:47:10 +00:00
hausner@google.com
0a3c9e6577
Put function parameters into their own scope.
...
Local function variables in the outermost scope can shadow function parameters.
Review URL: http://codereview.chromium.org//9088024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2970 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 21:31:23 +00:00
hausner@google.com
3d3ed3720e
Fix issues 968 and 998
...
968: don't crash if no class name given after 'default'
998: eliminate code generator diagnostic output on stdout
Review URL: http://codereview.chromium.org//9072012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2930 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 01:12:04 +00:00
hausner@google.com
503e2219b8
First part of inspecting local variables
...
This change introduces variable descriptors that describe the name, stack slot index, and source code stretch in which a variable is valid.
Activation frames in the stack trace now can enumerate the variables that are active in that frame.
Next step: fetch the value of variables from the stack.
Review URL: http://codereview.chromium.org//8992020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2671 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 21:40:28 +00:00
hausner@google.com
59e6694944
One small step towards sanity
...
Make 'class' a proper keyword, and 'extends' too. Adjusting the VM compiler to the language spec.
Review URL: http://codereview.chromium.org//8968021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2533 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 19:11:39 +00:00
asiva@google.com
77dba39e63
Add Double::NewCanonical and Mint::NewCanonical so that it is possible to
...
canonicalize double and mint constants without having to create an object first.
Review URL: http://codereview.chromium.org//8963001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2496 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 00:31:33 +00:00
regis@google.com
5db4de9756
Implement revised factories in the VM.
...
Emit warnings when obsolete syntax is used.
Review URL: http://codereview.chromium.org//8921033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2394 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-13 19:35:07 +00:00
srdjan@google.com
46748dc6b1
Allocate double temporaries in old space, because they belong there. Canonicalize more double literals.
...
Review URL: http://codereview.chromium.org//8921012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2351 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 18:59:20 +00:00
regis@google.com
809cd5590a
Helper ast node sequences must not wrongly grab ownership of the enclosing
...
scope (fix issue 736).
Add test.
Review URL: http://codereview.chromium.org//8893008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2324 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 21:32:14 +00:00
regis@google.com
dd32effb72
Adjust index of type parameters at finalization time (fix issue 718).
...
Add test.
Review URL: http://codereview.chromium.org//8872037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2286 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:00:55 +00:00
regis@google.com
0ef32f52f4
Fix handling of unresolved upper bounds in factory declarations (issue 721).
...
Review URL: http://codereview.chromium.org//8862002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2208 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 00:16:55 +00:00
srdjan@google.com
f98993384f
Canonicalize TypeArguments.
...
Review URL: http://codereview.chromium.org//8773026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2133 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 17:47:47 +00:00
regis@google.com
777625235f
Support qualified factory names (fix issue 514).
...
Review URL: http://codereview.chromium.org//8804019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2085 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 19:22:27 +00:00