rmacnak@google.com
6ed9f2c17f
Implement constructor kinds in the VM mirrors.
...
BUG=http://dartbug.com/13798
R=asiva@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//26436004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28416 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 20:40:11 +00:00
rmacnak@google.com
41f0d0e0f1
Correctly report the type of initializing formals declared without an explicit type to be the type of the corresponding field.
...
BUG=http://dartbug.com/11281
R=gbracha@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//26346002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28349 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 01:08:59 +00:00
lrn@google.com
e3713a08d4
Make List.shuffle take an optional Random object to use.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//25931003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28305 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 12:07:30 +00:00
srdjan@google.com
1676113897
Fix runtimeType for strings, integers and double: return their interface type.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//25674017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28286 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 22:08:55 +00:00
rmacnak@google.com
b56528fd99
Make the implementations of InstanceMirror.hashCode use dart:core's identityHashCode.
...
R=ahe@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//25099003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28229 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 16:38:19 +00:00
lrn@google.com
55a8a72ca6
Add List.shuffle().
...
Will add tests too.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//24740003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28206 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 11:09:01 +00:00
iposva@google.com
e7e2e4bf03
- Rename arrays to lists:
...
_ObjectArray -> _List
_GrowableObjectArray -> _GrowableList
_ImmutableArray -> _ImmutableList
R=srdjan@google.com
Review URL: https://codereview.chromium.org//25813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28189 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 00:15:14 +00:00
iposva@google.com
fbec69dca1
- Fix typos and add comments.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//25790004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28180 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 20:52:15 +00:00
srdjan@google.com
b6b3e1f400
Factor out throwing of argument error.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//25566002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28109 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 18:48:37 +00:00
rmacnak@google.com
ab2d2fc25b
Make ClassMirror.newInstance deal with reordered etc type arguments for redirecting factories.
...
BUG=http://dartbug.com/11781
BUG=http://dartbug.com/13365
R=regis@google.com
Review URL: https://codereview.chromium.org//25097005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28106 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 18:23:24 +00:00
srdjan@google.com
30197aab9d
Improve performance of string buffer by modifying concatAll native to allow growable array and an interval. Eliminate unnecessary check for String elements in release mode.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//25087006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28102 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 16:48:12 +00:00
fschneider@google.com
a329b0e6bc
Dart VM: Simplify code generation for equality operators.
...
By inserting the necessary checks for null inside the callee
at the AST level, the code generation of == operations can be
greatly simplified.
This is a performance-neutral change and a step for allowing
generic inlining of arbitrary == methods. So far we could only
inline them for a common set of types in the flow graph
optimizer.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//24203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28084 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 10:10:50 +00:00
lrn@google.com
783c348d0d
Improve speed of toRadixString, and extra much for powers of two.
...
Approx x2 speedup in general, x6 for powers of two (with 16 being probably
the most common radix).
R=srdjan@google.com
Review URL: https://codereview.chromium.org//24497004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27988 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 07:02:56 +00:00
mlippautz@google.com
19763aae4d
Implementation for ClosureMirror.findInContext.
...
Fixes issue 5897.
BUG=https://code.google.com/p/dart/issues/detail?id=5897
R=asiva@google.com , gbracha@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//23633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27982 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 01:28:12 +00:00
srdjan@google.com
37e66b3350
Treat final variables initialized with a literal as constants. Also sneak in a small cleanup.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//24673003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27973 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-26 21:06:56 +00:00
rmacnak@google.com
753af9b01b
Implement closurization of regular methods in ObjectMirror.getField in the VM.
...
BUG=http://dartbug.com/13001
BUG=http://dartbug.com/13002
R=asiva@google.com
Review URL: https://codereview.chromium.org//23441073
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27916 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 21:42:13 +00:00
johnmccutchan@google.com
0e87e5004e
Fix runtime clamp logic to match optimized code
...
BUG=13106
R=zra@google.com
Review URL: https://codereview.chromium.org//23591069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27911 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 20:42:57 +00:00
sgjesse@google.com
cd155c8ce7
Fix checked mode error and update status file
...
TBR=floitsch@google.com
BUG=
Review URL: https://codereview.chromium.org//24588002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27878 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 14:33:04 +00:00
sgjesse@google.com
415d53b557
Add property base to the Uri class
...
Uri.base returns the natural base URI for the current platform.
R=ahe@google.com , floitsch@google.com , iposva@google.com , rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//23686021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27877 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 13:52:15 +00:00
lrn@google.com
cad438b73b
Make VM Expando use identityHashCode instead of object's hashCode.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//24556002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27873 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 10:47:35 +00:00
lrn@google.com
12c9510193
Update implementations to use Object.identityHashCode for identity map/set
...
Update map/set constructors to have an .identity() constructor as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//24267023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27869 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 09:43:43 +00:00
lrn@google.com
c03e58cd99
Add Object.hashCodeOf to get the default hashCode of an object.
...
BUG= http://dartbug.com/13404
R=floitsch@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//24280003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27865 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 08:15:41 +00:00
johnmccutchan@google.com
dcda2adb90
Cleanup bit casting methods between SIMD types
...
R=zra@google.com
Review URL: https://codereview.chromium.org//24240020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27827 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 16:23:46 +00:00
hausner@google.com
3c360399ee
Improve NoSuchMethodError error messages
...
- Don't say there is no constructor with name X if there is one
that has incompatible parameter list.
- Better error message when mismatched optional parameters are passed.
(Prviously only the number of parameters was considered, but not
names of named parameters for example.)
Fixes issue 6189.
R=regis@google.com
Review URL: https://codereview.chromium.org//24395007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27826 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 16:14:28 +00:00
lrn@google.com
610c3e3e61
Make smi.toString() do its work faster using native string helpers.
...
BUG= http://dartbug.com/13450
R=fschneider@google.com
Review URL: https://codereview.chromium.org//24359002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27808 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 11:20:56 +00:00
floitsch@google.com
f10f791439
Adapt private variables with trailing underscores.
...
R=lrn@google.com
Review URL: https://codereview.chromium.org//23619086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27807 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 11:19:53 +00:00
fschneider@google.com
ab3e735f11
Fix range checks for typed data in native code and the optimizer.
...
TEST=tests/standalone/typed_data_test.dart
R=asiva@google.com
Review URL: https://codereview.chromium.org//24239003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27801 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 08:21:48 +00:00
rmacnak@google.com
c9eabbcb56
Make Dart_IdentityEqual live up to its sepc and not leak boxing implementation detail. (Reland r27542.)
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//24254004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27774 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 16:23:06 +00:00
mlippautz@google.com
146a8475e9
Syntax fix.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//24191005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27707 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 15:54:10 +00:00
lrn@google.com
63647b485d
Remove override of runtimeType from HashMap implementations.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//23902051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27702 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:36:18 +00:00
kasperl@google.com
a37950273c
Improve the memory consumption and performance of our string buffer implementation.
...
R=lrn@google.com
BUG=
Review URL: https://codereview.chromium.org//24251012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27698 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:07:39 +00:00
zarah@google.com
3766edd713
Change return type of get typeVariables and typeArguments in ClassMirror.
...
R=ahe@google.com , gbracha@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//23890036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27641 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 07:01:19 +00:00
lrn@google.com
6d49d9f1ac
Reapply "Convert HashSet, LinkedHashSet to factory methods and custom implementations."
...
R=floitsch@google.com , fschneider@google.com , kasperl@google.com
Review URL: https://codereview.chromium.org//24104003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27610 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 11:36:25 +00:00
ricow@google.com
fab06df0eb
Revert revision 27542 "Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail."
...
This is causing checked mode failures on all vm bots.
Review URL: https://codereview.chromium.org//23587024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27545 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 06:29:47 +00:00
rmacnak@google.com
8ed7a0367f
Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23464073
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27542 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 01:30:30 +00:00
mlippautz@google.com
b09bbf706b
Add metadata to type parameters. Reflective access is provided by TypeVariableMirror.
...
Addresses issue 10906.
BUG=https://code.google.com/p/dart/issues/detail?id=10906
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//23872010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27523 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-16 16:53:24 +00:00
iposva@google.com
f1583dec18
- More use of pre-allocated read-only handles.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//23510006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27490 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 16:55:57 +00:00
rmacnak@google.com
aa8d63aeea
Properly handle exceptions that arise when reflectively invoking a constructor/factory.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23994007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27439 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:42:08 +00:00
mlippautz@google.com
214d00f536
Mirrors cleanup. No semantic changes.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//23451052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27438 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:32:13 +00:00
rmacnak@google.com
07c4d9d0c6
Fill in type arguments when creating an object from the mirrors or embedding API.
...
BUG=http://dartbug.com/13186
BUG=http://dartbug.com/12921
R=regis@google.com
Review URL: https://codereview.chromium.org//23983026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27417 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 00:48:16 +00:00
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