kmillikin@google.com
67021511ca
Make some static helpers into member functions.
...
Four helper functions that moved from lib/integers.cc to vm/object.cc so
they could be used during constant folding are more properly member
functions than static functions.
R=srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//10937030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12620 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 08:38:33 +00:00
ager@google.com
e676e88f81
Introduce a VM-only dart:scalarlist library for byte arrays.
...
Include it in the SDK so users can use it. Create a dummy
implementation and patch file for the library for dart2js so it can be
documented. Johnni, can you think of a nicer way of making
documentation generation work for a VM only library? Also, it seems that
patching kills the documentation comments and they do not show up in
the generated docs.
R=iposva@google.com ,johnniwinther@google.com
BUG=
Review URL: https://codereview.chromium.org//10919267
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12616 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 07:08:10 +00:00
ahe@google.com
3f1932a563
Handle backslashes and newlines when escaping strings.
...
Review URL: https://codereview.chromium.org//10943027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12568 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 15:43:41 +00:00
ager@google.com
576532edcc
Bug cleanup: unify on allowing radices from 2 to 36 in
...
num.toRadixString. Add test and documentation.
R=lrn@google.com ,floitsch@google.com
BUG=dartbug.com/461
Review URL: https://codereview.chromium.org//10937011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12562 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 14:15:39 +00:00
kmillikin@google.com
be0492a8a8
Reapply "Initial implementation of sparse conditional constant propagation."
...
With a fix for compilation on Mac. GrowableArray is DISALLOW_COPY_AND_ASSIGN,
so we can't create a temporary one to be ignored and have to pass one in to be
ignored.
R=fschneider@google.com ,zerny@google.com
BUG=
Review URL: https://codereview.chromium.org//10949020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12561 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 14:10:14 +00:00
kmillikin@google.com
5e449aea52
Revert "Initial implementation of sparse conditional constant propagation."
...
Revert due to compilation failures on Mac.
TBR=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//10946027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12552 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 11:04:36 +00:00
kmillikin@google.com
ae9efbfab0
Initial implementation of sparse conditional constant propagation.
...
Use the results of SCC to eliminate unreachable code.
BUG=
Review URL: https://codereview.chromium.org//10943007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12549 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 10:34:14 +00:00
ahe@google.com
d0f3e48063
Work around for bug 4995 to unbreak VM build.
...
Review URL: https://codereview.chromium.org//10947026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12541 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 09:00:38 +00:00
ahe@google.com
34c503ae73
Don't invoke user-defined code in NoSuchMethodError.toString.
...
Review URL: https://codereview.chromium.org//10939020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12533 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 07:55:50 +00:00
iposva@google.com
820d2b33d5
- Fix the implementation of Random.nextBool() and add test.
...
Review URL: https://codereview.chromium.org//10919323
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12458 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 21:33:39 +00:00
lrn@google.com
26fab5183a
Move parseInt parseDouble to int/double classes as a static method.
...
Remove math dependency from core/coreimpl in dart2js.
The existing Math.parseInt and Math.parseDouble are kept *for now*, but
simply redirect to the static methods.
They will be removed in time (when library code is ready for it).
Review URL: https://codereview.chromium.org//10913271
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12417 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 07:25:38 +00:00
cshapiro@google.com
ffa3604282
Eliminate the const constructor from the Expando class.
...
Review URL: https://codereview.chromium.org//10909209
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12354 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 21:26:01 +00:00
turnidge@google.com
a28d475ff3
Implement more of the mirrors library, primarily stuff to do with types.
...
Highlights:
- Implement FunctionClassMirror, used to reflect on the class of
function objects.
- Implement TypeVariableMirror, used to reflect on type variables.
- Implement TypedefMirror, used to reflect on typedefs.
- Implement returnType for MethodMirror
- Implement type for VariableMirror/ParameterMirror
- Added supporting functions to the dart embedding api:
- Dart_ClassIsTypedef
- Dart_ClassGetTypedefReferent
- Dart_ClassIsFunctionClass
- Dart_ClassGetFunctionClassSignature
- Dart_FunctionReturnType
- Dart_FunctionParameterType
- Dart_VariableType
- Dart_GetTypeVariableNames
- Dart_LookupTypeVariable
- Dart_IsTypeVariable
- Dart_TypeVariableOwner
- Dart_TypeVariableUpperBound
Other stuff:
- Fixed bug in Function::NumberOfImplicitParameters for signature
functions.
- Chnaged the default upper bound for type variables to Object from
Dynamic. Discussed this with Gilad and Regis.
- Fixed some smaller problems in mirrors_impl.dart.
Review URL: https://chromiumcodereview.appspot.com//10916252
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12342 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 17:47:25 +00:00
iposva@google.com
2f455ce6a4
- Move double and int implementations into dart:core and make them private.
...
Review URL: https://codereview.chromium.org//10918213
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12330 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 14:13:55 +00:00
kasperl@google.com
1b994e881f
Change RegExp constructor to insist on proper named optional parameters.
...
R=bak@google.com ,lrn@google.com
BUG=
Review URL: https://codereview.chromium.org//10910253
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12329 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 14:00:32 +00:00
ager@google.com
665aaf939f
Patch print directly in corelib instead of going through coreimpl.
...
R=ajohnsen@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10928145
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12316 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 11:50:19 +00:00
kasperl@google.com
997e534c28
Change Duration to take proper named optional parameters.
...
R=bak@google.com ,lrn@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10905255
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12314 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 11:17:31 +00:00
asiva@google.com
a0a2e9e155
Remove weak_property.dart and weakproperty.cc from lib_impl_sources.gypi
...
as they are duplicated both here and in lib_sources.gypi
Review URL: https://chromiumcodereview.appspot.com//10913236
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12301 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 05:50:40 +00:00
regis@google.com
e860f819a0
Limit the maximum number of formal parameters (32K fixed and 32K optional)
...
in order to save space in function objects.
Naming cleanup.
Review URL: https://codereview.chromium.org//10928160
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12288 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 23:35:05 +00:00
ager@google.com
7144395982
Move VM specific library files to the runtime/lib directory so they do
...
not become part of the SDK.
We should get rid of these files and use the real library file that
sources the rest of the implementation. That work is tracked in
dartbug.com/5099.
R=iposva@google.com
BUG=dartbug.com/5069
Review URL: https://chromiumcodereview.appspot.com//10913214
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12240 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 07:35:34 +00:00
kasperl@google.com
55140fd125
Remove support for operator negate and replace occurrences with unary
...
operator -.
In the VM, I have disabled the operator negate support in the parser but I
have not removed the keyword because the token is used in quite a few other
places.
R=ahe@google.com ,iposva@google.com ,hausner@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10911206
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12233 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 05:29:03 +00:00
srdjan@google.com
3051c69910
Improve moves of Smi and null objects. Add result cid to List constructor calls. Add tracing of inline cache misses in optimized code (a big no-no).
...
Review URL: https://chromiumcodereview.appspot.com//10933019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12208 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:41:34 +00:00
ager@google.com
2e49065159
Reapply changes to Expando patching.
...
R=ajohnsen@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10911201
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12181 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 11:03:50 +00:00
ager@google.com
1adc0b35a2
Revert Expando changes. There are checked-mode errors that I need
...
to sort out.
Revert "Patch expando directly in corelib instead of going through coreimpl."
Revert "Fix merge error."
R=ajohnsen@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10918163
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12158 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 05:39:05 +00:00
ager@google.com
e3f4f6696e
Patch expando directly in corelib instead of going through coreimpl.
...
R=ajohnsen@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10908173
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12156 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 05:27:31 +00:00
asiva@google.com
87a504bf0a
Fix for issue 4808 (The vm crashes when parseInt is called with string containing a $).
...
Review URL: https://chromiumcodereview.appspot.com//10909152
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12145 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 18:55:29 +00:00
kasperl@google.com
023546faf8
Remove more () from getters.
...
This makes it possible to run all standard tests except co19
without ever using a getter that's defined with ().
R=iposva@google.com ,hausner@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10928051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12028 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:56:21 +00:00
kasperl@google.com
9beb871852
Get rid of a lot of () for getters.
...
R=bak@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10919146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12017 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 11:50:07 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
ager@google.com
156e6a71b5
First corelib cleanup patch after unification.
...
Do not go through coreimpl for object implementation. Instead, use patching
in core directly.
This leads to error message issues in dart2js which I have patched up
the best way I could find.
R=ajohnsen@google.com ,johnniwinther@google.com ,lrn@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10918047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11784 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 07:26:02 +00:00
floitsch@google.com
3e3c34a0a5
Don't throw on 1 ~/ 0.0.
...
A IntegerDivisionByZeroException is only allowed when both operands are integers.
Review URL: https://chromiumcodereview.appspot.com//10912066
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11762 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-03 12:34:20 +00:00
turnidge@google.com
5c87f7ed8c
Fix some typos in mirrors_impl.dart.
...
Review URL: https://chromiumcodereview.appspot.com//10919017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11716 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 19:46:21 +00:00
hausner@google.com
35d7793891
Throw AbstractClassInstantiationError if an abstract class is instantiated
...
This is the second try to my previous attempt to implement the
new abstract class handling. Instead of a compile-time error,
the VM now throws an AbstractClassInstantiationError at runtime
if an abstract class is instantiated. Added the new error class
to the core library.
For now I'm still using the rule that a class is abstract if it is explicitly
marked as abstract, or if it defines a new abstract method.
Review URL: https://chromiumcodereview.appspot.com//10916039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11708 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 18:06:42 +00:00
regis@google.com
9e00bd8ccb
Implement argument definition test in the vm.
...
Add tests.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10915022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11664 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 22:46:44 +00:00
turnidge@google.com
14f614da12
Use the return value of vm native methods to set the return value,
...
based on Siva's earlier suggestion (he actually suggested putting it
in the generated stub, which I haven't done).
Added SetReturnUnsafe and use it exactly one place so far.
Review URL: https://chromiumcodereview.appspot.com//10874072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11633 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:41:19 +00:00
ager@google.com
178100ded4
Move print to corelib.
...
Allow embedder customization in the VM through a static field that can
be set by the embedder.
Mark failing test that is unrelated to this change. The VM does not
like when you import dart:core explicitly and tells you there both
'dart:core' and 'dart:core' define 'print'.
R=ajohnsen@google.com ,iposva@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10887024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11603 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 11:31:30 +00:00
srdjan@google.com
7f400ac01e
Some code cleanups in arrays, fix rangeCheck (issue 2899).
...
Review URL: https://chromiumcodereview.appspot.com//10905010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11572 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 00:47:24 +00:00
dominich@google.com
494e5b228e
Updated VM and JS versions of Date to allow underflow and overflow.
...
Added many tests to check everything is working as expected.
BUG=2771
Committed: https://code.google.com/p/dart/source/detail?r=11453
Review URL: https://chromiumcodereview.appspot.com//10832166
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11522 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 15:09:14 +00:00
kasperl@google.com
72e668595d
Use new try-catch syntax in runtime/, tools/, and utils/.
...
R=ngeoffray@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10887023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11514 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 11:58:58 +00:00
ajohnsen@google.com
3a6daefd99
Expose remaining 'errors' in an unified dart:core.
...
This is a follow-up on my previous move of AssertionError.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10896007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11513 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 11:57:37 +00:00
dominich@google.com
6d70844f1b
Revert "Updated VM and JS versions of Date to allow underflow and overflow."
...
This reverts commit r11453.
TBR=floitsch@google.com
Review URL: https://chromiumcodereview.appspot.com//10894009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11456 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 15:48:29 +00:00
dominich@google.com
957192e887
Updated VM and JS versions of Date to allow underflow and overflow.
...
Added many tests to check everything is working as expected.
BUG=2771
Review URL: https://chromiumcodereview.appspot.com//10832166
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11453 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 15:31:43 +00:00
ajohnsen@google.com
a04ecc7678
Unify AssertionError.
...
BUG=
Review URL: https://chromiumcodereview.appspot.com//10882056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11448 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 14:39:50 +00:00
whesse@google.com
4789857341
Remove List.copyFrom from VM and from tests. It was removed from the List interface in r941.
...
BUG=dart:1953
Review URL: https://chromiumcodereview.appspot.com//10898003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11437 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 12:06:45 +00:00
iposva@google.com
327ff5d70e
- Change "static final" to "static const" in the runtime/ directory.
...
- Fixed parsing of top-level static const.
Review URL: https://chromiumcodereview.appspot.com//10883071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11425 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 23:51:37 +00:00
dgrove@google.com
4f083c41da
Remove weak_property from lib_sources.gypi, since it's
...
already in lib_impl_sources.gypi
Review URL: https://chromiumcodereview.appspot.com//10870111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11419 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 21:20:59 +00:00
hausner@google.com
c7f5bcd0ca
Eliminate interface bool
...
Replace with concrete class bool instead, and getting rid of class Bool in core_impl library.
Review URL: https://chromiumcodereview.appspot.com//10874071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 21:09:23 +00:00
turnidge@google.com
bd995a345e
Avoid trusting the length encoded in the Snapshot if there is an
...
external length available. We now pass a length with all messages in
the vm and verify that there is no mismatch with the length from the
Snapshot.
Fixed a bug in the use of ApiMessageReader. We were always manually
adding Snapshot::kHeaderSize to the data, but neglecting to subtract
kHeaderSize from the message length.
Added FullSnapshotWriter and MessageWriter classes.
Review URL: https://chromiumcodereview.appspot.com//10829444
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 20:25:44 +00:00
ajohnsen@google.com
660f03288e
Unify list.
...
I've added a TODO that we'll have to address asap. This patch will
currently limit the checks being performed with List.from(other).
BUG=
Review URL: https://chromiumcodereview.appspot.com//10878077
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11384 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 14:06:03 +00:00
ajohnsen@google.com
99eac67675
Fix string unifizationf for dartc.
...
We don't have to expose string.dart anymore so merge it with
string_patch.dart.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10868105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11381 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 13:15:24 +00:00