Commit Graph

855 Commits

Author SHA1 Message Date
lrn@google.com 18362b2cf4 Revert "Convert HashSet, LinkedHashSet to factory methods and custom implementations."
Triggers an error in html tests on dartium.

Review URL: https://codereview.chromium.org//23451045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27392 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:19:45 +00:00
mlippautz@google.com 1cf1806f29 Remove unreachable code in mirrors.
The only case where we do not set the name in the constructor is for anonymous
mixin applications.

BUG=
R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//23531037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27390 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:10:43 +00:00
lrn@google.com c5bb6f7b15 Convert HashSet, LinkedHashSet to factory methods and custom implementations.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23859008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27378 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 12:35:57 +00:00
hausner@google.com fd57843900 Update handling of ambiguous name references
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.

Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.

Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.

Fixes 12915, 12913, 12724.

R=regis@google.com

Review URL: https://codereview.chromium.org//23484020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
lrn@google.com df78198c50 Remove String.concat from implementation classes.
It was removed from the interface a long time ago.

BUG= http://dartbug.com/13128
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23464040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27286 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 11:04:45 +00:00
lrn@google.com 0f1e912d9d Reapply "Make LinkedHashMap also have a factory constructor and be customizable""
The change was reverted due to failing Dartium tests that were not easily handelable on a Friday afternoon.

Review URL: https://codereview.chromium.org//23872008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27284 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:49:32 +00:00
johnmccutchan@google.com 86ffb1f64d Add alignment checks to typed_data views
R=asiva@google.com

Review URL: https://codereview.chromium.org//23686003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27278 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-08 15:18:04 +00:00
mlippautz@google.com 4df2b2b2f1 Remove leftover from CL 23038010.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//23690007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27271 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-07 00:02:29 +00:00
sra@google.com ce4b15c0e9 Esoteric bit operations.
- bit length
- truncate to signed fixed width integer
- truncate to unsigned fixed width integer

This change is motivated by a program that spends 20-30% of its time here:
    // TODO(5828): Replace this with a bit-length method on int when available.
    int n_bitLength = this.n.toRadixString(2).length;

See Also
https://code.google.com/p/dart/issues/detail?id=5828#c3
https://code.google.com/p/dart/issues/detail?id=6486#c2
https://code.google.com/p/dart/issues/detail?id=5798#c5
https://code.google.com/p/dart/issues/detail?id=12008

R=lrn@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//23645003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27269 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 22:22:26 +00:00
lrn@google.com 761f55b1b9 Revert "Make LinkedHashMap also have a factory constructor and be customizable"
Dartium expectations expects "LinkedHashMap" and gets "_LinkedHashMap".

Review URL: https://codereview.chromium.org//23890008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27250 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 14:29:04 +00:00
lrn@google.com 64359158ab Make LinkedHashMap also have a factory constructor and be customizable
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23494027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27246 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:01:54 +00:00
rmacnak@google.com 232cdaae3e VM: Make ParameterMirror.toString say it is a parameter mirror.
VM: Make FunctionTypeMirror.toString use the form (args) -> retval.
dart2js: Fix FunctionTypeMirror.toString's use of separators.

BUG=http://dartbug.com/13079
R=ahe@google.com

Review URL: https://codereview.chromium.org//23601018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27213 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 20:57:22 +00:00
srdjan@google.com e3ce299913 Traverse inlined frames lazily when printing the stacktrace. No need to carry separate function and code array, since function can always be extracted from code.
R=asiva@google.com

Review URL: https://codereview.chromium.org//23964003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27209 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 20:25:00 +00:00
lrn@google.com 5d8f2cad4e Reapply "Add custom equals and hashCode for HashMap implementation."
Review URL: https://codereview.chromium.org//23493017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27179 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 08:29:26 +00:00
asiva@google.com d6aaf0cc94 1. Add flag --trace-api to trace API function invocation
2. Add tracing of external native functions under --trace-natives flag
3. Added a _printCurrentStacktrace() function so that one could get a
   dart stack trace under 'gdb' when in a native or runtime function.

R=regis@google.com

Review URL: https://codereview.chromium.org//23453035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27166 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 23:42:13 +00:00
regis@google.com 765aac1496 Keep track of the application of a mixin type to a mixin application class,
which includes setting up its type parameters (fix issue 12871).

R=asiva@google.com

Review URL: https://codereview.chromium.org//23453024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27157 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 22:21:36 +00:00
srdjan@google.com 8cd4bf5b92 Change inlined stack frame iterator to use code and pc instead of frame.
R=asiva@google.com

Review URL: https://codereview.chromium.org//23494026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27140 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 19:36:20 +00:00
srdjan@google.com 7fb4b62586 Fix build breakage.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//23658019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27135 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 17:46:53 +00:00
rmacnak@google.com d7d3588a55 Support named and optional positional arguments in reflective invocation.
R=ahe@google.com, regis@google.com

Review URL: https://codereview.chromium.org//23604003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27134 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 17:12:28 +00:00
lrn@google.com c288d7c951 Revert "Add custom equals and hashCode for HashMap implementation."
Review URL: https://codereview.chromium.org//23883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27111 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 11:17:15 +00:00
fschneider@google.com 59004e9e54 Fix range check bug for ByteData getters and setters.
BUG=https://code.google.com/p/dart/issues/detail?id=12880
R=asiva@google.com

Review URL: https://codereview.chromium.org//23714005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27107 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 10:04:16 +00:00
lrn@google.com 76c0e79ff6 Add custom equals and hashCode for HashMap implementation.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23893002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27106 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 09:42:21 +00:00
rmacnak@google.com 865ef54309 Implement ParameterMirror.metadata.
BUG=http://dartbug.com/10906
BUG=http://dartbug.com/11418
R=asiva@google.com

Review URL: https://codereview.chromium.org//23224016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27082 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 22:50:15 +00:00
rmacnak@google.com 64fd5a5079 Implement InstanceMirror.== in dart2js and InstanceMirror.hashCode in the VM and dart2js.
BUG=http://dartbug.com/12909
BUG=http://dartbug.com/12919
R=ahe@google.com, asiva@google.com

Review URL: https://codereview.chromium.org//23460013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27075 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 20:11:11 +00:00
lrn@google.com eaf1021a87 Make HashMap constructor a factory.
Add optional parameters that aren't supported yet.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//23513010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27044 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 11:45:12 +00:00
floitsch@google.com 8adad2eeb0 Don't throw when there is an "onError" for int.parse.
Even though the error is caught immediately we don't want "break on exception" developer tools stop at the parseInt case if there is a handler.

BUG= http://dartbug.com/12776
R=lrn@google.com

Review URL: https://codereview.chromium.org//23685004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27005 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-02 09:36:29 +00:00
lrn@google.com 8d66e5d8de Fix error message for NoSuchMethodError to not contain "Symbol".
R=fschneider@google.com

Review URL: https://codereview.chromium.org//23703004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27004 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-02 09:33:37 +00:00
lrn@google.com 53dc9ba034 Change the field and constructor parameter types of NoSuchMethodError to Symbol.
The NSME uses strings for names. It should use symbols.

This change modifies the VM libraries only enough to make the signature change
not crash. It will probably need cleanup to ensure that symbols are passed
to the internal constructor directly, instead of strings that have to be
converted.

(Also fixes a type error in Map.fromIterable that was hit by the code).

BUG= http://dartbug.com/11190
R=ahe@google.com, regis@google.com

Review URL: https://codereview.chromium.org//23486007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26985 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-02 05:57:49 +00:00
rmacnak@google.com 919eae46a1 Ensure class mirrors on non-generic classes always have their runtime type set. Add a test for class mirror equality.
BUG=http://dartbug.com/12800
R=ahe@google.com, asiva@google.com

Review URL: https://codereview.chromium.org//23657002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26951 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 21:51:31 +00:00
lrn@google.com 4ba20d83f6 Small changes to make analyzer happy.
Bool class does not contain abstract method without being abstract.
Type parameter of linked list entry properly bounded, so it's a valid
type parameter for linked list link.
Missing default parameters values added to some StringSink methods.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//23445016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26868 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 12:59:53 +00:00
lrn@google.com 788c569e9c Convert HashMap and LinkedHashMap to closed addressing hash tables.
R=regis@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//23056002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26863 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 12:13:32 +00:00
lrn@google.com 215fa4ab91 Remove last vestiges of removeAll from typed lists.
R=whesse@google.com

Review URL: https://codereview.chromium.org//23543007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26843 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 08:50:56 +00:00
rmacnak@google.com ac705b02a7 More reflection of mixin applications in the VM.
*Provide ClassMirror.mixin
*Hide extra class on the inheritance chain introduced in mixin typedefs
*Give mixin applications a simpleName that matches the source language syntax
*Update mixin_test to distinguish between members and constructors
*Update mixin_test for the mixin application naming scheme

BUG=http://dartbug.com/12464
R=ahe@google.com, asiva@google.com

Review URL: https://codereview.chromium.org//23190003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26824 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:55:53 +00:00
lrn@google.com 3f23ba6d14 Fix implementations of Match too, to use "input", not "str".
Fix accidental rename of str to src.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//23490008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26781 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 11:33:56 +00:00
lrn@google.com 85772691a1 Rename Match.str to input.
Cleanup of Match and RegExp documentation.

BUG= http://dartbug.com/8333
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23566008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26776 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 10:46:42 +00:00
kmillikin@google.com 4f80ef09df Change Bool::Get to return a handle instead of a pointer to a raw object.
Replace occurrences of 'expr ? Bool::True() : Bool::False()' with simply
'Bool::Get(expr)' and analogously for its negation.  The pointer to the raw
object can still be extracted with 'Bool::Get(expr).raw()'.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//23480005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26770 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:38:56 +00:00
lrn@google.com 3408c5bc88 Make the result of JSON.decode be marked by "null" in the reviver.
They are currently marked by "", which can match a property as well.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//23688003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26768 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:25:34 +00:00
lrn@google.com 6764a2462c Made old dart:json library use convert to parse JSON.
Make convert library use "null" as marker for top-level value in reviver calls.
Moved JSON implementation into convert_patch files.
Move error classes into convert library, and reexport from dart:json.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//23554004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26767 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 07:56:12 +00:00
mlippautz@google.com 817a6fff3a Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}.
Fixes issue 12196 and partially addresses issue 12430.

BUG=
R=ahe@google.com, asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//23020025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26730 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:31:09 +00:00
mlippautz@google.com b708a455d1 Fix Function.end_token_pos() and implement MethodMirror.source getter.
Move .source getter from ClosureMirror to MethodMirror (as the TODO already suggested) and provide an implementation.

BUG=
R=asiva@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//23038010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26659 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:14:07 +00:00
lrn@google.com 4582e5218a Make Invocation.positionalArguments and .namedArguments never be null.
In the cases where they were previously null, they are now an empty list
or map.

The list or map should always be unmodifiable, but the non-empty ones
aren't yet.

BUG= http://dartbug.com/6357
R=floitsch@google.com

Review URL: https://codereview.chromium.org//22918025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26635 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:57:33 +00:00
rmacnak@google.com 7ed3644358 Make reflectClass(dynamic) throw an illegal argument exception.
BUG=
R=gbracha@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//22633005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26550 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 20:05:51 +00:00
rmacnak@google.com 2f192be945 Provide a way to get a Type back from a ClassMirror.
BUG= http://dartbug.com/6433
R=asiva@google.com

Review URL: https://codereview.chromium.org//22849015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26407 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 23:05:31 +00:00
johnmccutchan@google.com 6d11a8fa15 Add signMask getter to Float32x4
R=srdjan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//22947006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26394 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 21:35:53 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

Review URL: https://codereview.chromium.org//23072026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
mlippautz@google.com 1c0cff6f62 Implement MethodMirror.isOperator
Fixes issue 11944.

BUG=http://dartbug.com/11944
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//22914017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26369 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 16:39:34 +00:00
johnmccutchan@google.com 7c1e9d8298 Add add and subtract operations to Uint32x4
R=srdjan@google.com

Review URL: https://codereview.chromium.org//23018009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26358 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 14:34:06 +00:00
lrn@google.com 479386335b Make pow fail for non-number arguments.
Previous change removed a check that was expected by a co19 test.

Review URL: https://codereview.chromium.org//23073005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26351 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:57:52 +00:00
lrn@google.com 5343ef8d32 Add documentation to dart:math pow function.
Also add test, and modify implementation to match on the single case where it didn't.

BUG= http://dartdog.com/1952
R=floitsch@google.com

Review URL: https://codereview.chromium.org//22943005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26347 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:23:00 +00:00
lrn@google.com 653ee92bfb Remove int.pow and double.pow from VM library.
BUG= http://dartbug.com/10268
R=regis@google.com

Review URL: https://codereview.chromium.org//23129005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26340 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 08:13:13 +00:00