Commit Graph

2159 Commits

Author SHA1 Message Date
meh@google.com 5d390fdf6c Revert "Implement a native identical function in the VM."
This reverts commit b6265dc1f0711711bcd26413826155f338c49c6d.

Merge remote-tracking branch 'git-svn' into revert-identical

Revert "Implement a native identical function in the VM."

This reverts commit b6265dc1f0711711bcd26413826155f338c49c6d.

Merge remote-tracking branch 'git-svn' into identical

Merge remote-tracking branch 'git-svn' into identical

stage for submission

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16402 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 21:49:54 +00:00
meh@google.com d59b5937a6 Implement a native identical function in the VM.
Takes two objects and returns a boolean.
If the objects are SMIs, then returns true if the values are identical.
If the objects are not SMIs, then returns true if the references are identical.

BUG=7378

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16400 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 21:35:38 +00:00
ager@google.com 08b1e44502 Reapply "Optimize the message queue for many active ports with few messages."
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16394 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 20:03:07 +00:00
ager@google.com c3c47bbc98 Revert "Optimize the message queue for many active ports with few messages."
No failures locally. I'll investigate tomorrow.

R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16392 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 19:40:29 +00:00
ager@google.com 6e945a2578 Optimize the message queue for many active ports with few messages.
The current message queue implementation is very inefficient if you are using
many active ports with few messages. This happens when you use 'call' a lot
on ports which is currently done in dart:io.

This patch does not remove messages from the queue when closing a port. Instead
it drops messages for closed ports when it processes them. This dramatically
speeds up dart:io benchmarks that enqueue tons of writes on a file output
stream.

R=iposva@google.com
BUG=http://dartbug.com/6911

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16388 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 19:20:44 +00:00
fschneider@google.com 3546cf0b35 Cache resolution of two static functions frequently used in I/O.
Review URL: https://codereview.chromium.org//11636017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16360 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 12:42:11 +00:00
bak@google.com 6c398a3a25 Fixed Issue 7508: Many StringBuffer methods return StringBuffer, but should be void.
- Methods in StringBuffer have now been changed so they do not return this.
- This forces the programmer to use cascaded calls instead of flaky chaining of calls.
Review URL: https://codereview.chromium.org//11645019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16358 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 11:13:27 +00:00
regis@google.com 9cdeb399d1 Simplify method invocation runtime entries.
Review URL: https://codereview.chromium.org//11636025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16343 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 21:26:29 +00:00
johnniwinther@google.com e0a4980031 Mirrors implemented via patches. 2nd try.
Review URL: https://codereview.chromium.org//11624011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16317 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 12:45:46 +00:00
fschneider@google.com 3a1ab92a21 Make getter for capacity in _GrowableObjectArray private.
Review URL: https://codereview.chromium.org//11606023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16314 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 11:48:30 +00:00
asiva@google.com 8af296c9c8 Cleanup the exceptions create code to use Arrays instead GrowableArrays so
that it is consistent with the DartEntry invoke code that it calls finally.
Review URL: https://codereview.chromium.org//11639007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16295 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 23:47:35 +00:00
asiva@google.com 2c6de68680 Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the requirements of the runtime.
Deleted all the code duplication that was added to circumvent the old DartEntry API requirements.
Review URL: https://codereview.chromium.org//11613009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16288 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 21:36:01 +00:00
lrn@google.com e33455dd1f Revert "Switch libraries to using new tags."
Still errs in the editor.

TBR=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16257 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 14:01:28 +00:00
lrn@google.com a9b64329c0 Switch libraries to using new tags.
Committed: https://code.google.com/p/dart/source/detail?r=15499

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16255 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 13:09:57 +00:00
johnniwinther@google.com 672d09149b Revert "Clean up the patch file for the isolate library by introducing a new builtin library: isolate_helper.dart."
This reverts commit r16029.

BUG=http://dartbug.com/7448

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16250 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 10:26:18 +00:00
regis@google.com aef9047742 Invoke noSuchMethod instead of immediately throwing NoSuchMethodError when
invoking a non-closure as a closure (reopened issue 3326).
Address comments of last cl.
Review URL: https://codereview.chromium.org//11612002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16220 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-17 19:35:16 +00:00
johnniwinther@google.com 6cf3513d36 Revert "Mirrors implemented via patches."
This reverts commit r16204, 16206, and r16210.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16211 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-17 14:58:12 +00:00
johnniwinther@google.com b8c038d809 Mirrors implemented via patches.
Review URL: https://codereview.chromium.org//11591015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16204 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-17 13:24:29 +00:00
regis@google.com 3ae792bbf4 Implement InvocationMirror.invokeOn method in the vm (issue 7227).
Review URL: https://codereview.chromium.org//11570042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16187 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 00:28:41 +00:00
tball@google.com 3282ae3f72 Second version of support for specifying an unhandled exception callback
in Dart.  Isolate.spawnFunction optionally takes a callback parameter,
which is not resolved until an unhandled exception occurs.  If a callback
wasn't specified, the VM will then call an "_unhandledExceptionCallback"
function if it is defined in the isolate's source file. If no callback
is provided, the error is logged as the isolate is closed.
Review URL: https://codereview.chromium.org//11558034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16186 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 00:20:07 +00:00
regis@google.com 849585ef7c Implement Function.apply in vm (issue 5670).
Fix a closure parameter count check bug (unveiled by an apply test).
Review URL: https://codereview.chromium.org//11564029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16175 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 19:04:01 +00:00
kasperl@google.com 0486a35522 Revert "Wat if you closure identical?"
Revert "Update comment suggested by Kasper."

This reverts r16112 and r16113.

R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16161 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 13:44:45 +00:00
ngeoffray@google.com c8ee314f0a Wat if you closure identical?
Review URL: https://codereview.chromium.org//11564013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16112 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 14:25:06 +00:00
ngeoffray@google.com 0235ebc4b1 Clean up the patch file for the isolate library by introducing a new builtin library: isolate_helper.dart.
Review URL: https://codereview.chromium.org//11549017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16029 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 11:35:49 +00:00
ager@google.com 81ea12b120 Fix unresolved classes issues in dart:io.
R=sgjesse@google.com
BUG=dartbug.com/7299

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16026 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 09:23:57 +00:00
ngeoffray@google.com 24e64c10f2 Clean up the timer source in the isolate library to be less VM specific.
Review URL: https://codereview.chromium.org//11538007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16024 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 08:32:54 +00:00
tball@google.com 67530c6aa1 Added bool.hashCode patch.
BUG: 7244
Review URL: https://codereview.chromium.org//11557002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16011 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 00:59:05 +00:00
ngeoffray@google.com a71ca795d8 Make identical an external function and make it throw in both runtimes, as they both recognize it.
Review URL: https://codereview.chromium.org//11489011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15956 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 09:22:45 +00:00
regis@google.com 3b1dfe51d1 Pass the proper invocation mirror argument to noSuchMethod.
Review URL: https://codereview.chromium.org//11523002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15939 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 00:31:53 +00:00
asiva@google.com 6eec2410ec Restructure Add and SetAt to not create a Handle.
Review URL: https://codereview.chromium.org//11443024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15926 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 19:28:14 +00:00
regis@google.com dd6a0ec349 Rename GET_NATIVE_ARGUMENT macro to GET_NON_NULL_NATIVE_ARGUMENT.
Introduce new GET_NATIVE_ARGUMENT macro accepting null.
Add test.
Review URL: https://codereview.chromium.org//11468016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15919 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 17:59:40 +00:00
srdjan@google.com a9a187ce7a Fix failures in byte array tests, reenabled test.
Review URL: https://codereview.chromium.org//11471014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15821 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 23:27:01 +00:00
srdjan@google.com 93dd217564 Added Uint8ClampedList. COmpielr optimziations to follow in next CL.
Review URL: https://codereview.chromium.org//11437028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15806 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:53:51 +00:00
lrn@google.com 04769f543c Change List.sort to not have a default parameter value.
The list implementations in the system now default to
Comparable.compare if the compare argument is null.

BUG=http://code.google.com/p/dart/issues/detail?id=7148

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15771 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 08:55:22 +00:00
srdjan@google.com e3863daaba Improve C++ code for string splittig (Dromaeo benchmark).
Review URL: https://codereview.chromium.org//11308337

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15710 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 21:52:02 +00:00
srdjan@google.com d1f54883b8 More cleanups === => identical
Review URL: https://codereview.chromium.org//11308305

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15648 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 19:11:13 +00:00
johnmccutchan@google.com 1120befff4 s/transferrable/transferable
Review URL: https://codereview.chromium.org//11434077

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15636 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 15:25:07 +00:00
srdjan@google.com 5f4ad90c85 Added native to split OneByteString with a char code as pattern.
Review URL: https://codereview.chromium.org//11414273

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15615 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-01 00:22:18 +00:00
johnmccutchan@google.com 5642ee09f1 Expose transferable constructor to Int8List
Review URL: https://codereview.chromium.org//11414211

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15598 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 20:35:22 +00:00
srdjan@google.com f7913777a4 Improve performance of String split (use unchecked substring).
Review URL: https://codereview.chromium.org//11415234

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15596 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 19:39:32 +00:00
cshapiro@google.com 39ee2fdfeb Move various top-level Unicode definitions into classes and methods.
Review URL: https://codereview.chromium.org//11414249

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15568 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 03:33:37 +00:00
regis@google.com 91ad9a0180 Remove support for interfaces.
For now, disable tests using obsolete syntax.
Tests disabled in this cl and in previous ones removing default factory classes
will either be deleted or updated in a later cl.
Review URL: https://codereview.chromium.org//11411271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15562 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 01:26:31 +00:00
asiva@google.com 9d41d29b1a Fix StringBase_createFromCodePoints to correctly accept Latin-1 characters
as one_byte_string.

Rename Dart_NewExternalUTF8String to Dart_NewExternalLatin1String, this reflects
the functionality correctly.
Review URL: https://codereview.chromium.org//11280241

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15554 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 23:43:47 +00:00
srdjan@google.com bf3bac3884 Implement faster splitting with empty string as pattern. Add special native for computing substring of OneByteString (preparation for instrinsic).
Review URL: https://codereview.chromium.org//11416270

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15548 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:55:09 +00:00
aprelev@gmail.com b09632ab95 Fix floating point issues on Windows.
BUG=dartbug.com/5407
TEST=

Review URL: https://chromiumcodereview.appspot.com//11411188

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15546 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:40:12 +00:00
lrn@google.com d681878a6d Revert "Switch libraries to using new tags."
It breaks completion in the editor.

TBR=danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15516 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 13:44:58 +00:00
lrn@google.com abd2cf311a Switch libraries to using new tags.
Review URL: https://codereview.chromium.org//11419032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15499 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 08:54:30 +00:00
regis@google.com 7e9531a1d2 Remove support for default factory classes.
For now, disable tests using obsolete syntax. More will get disabled as support
for interfaces is completely removed. We may then permanently remove some tests,
while updating and reenabling others whose purpose is not related to interfaces.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15480 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 23:39:27 +00:00
srdjan@google.com 44f4011196 Improve performance of String.split for 1 and 0 character results.
Other cleanups/improvements in Random.
Review URL: https://codereview.chromium.org//11419194

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15429 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:17:25 +00:00
regis@google.com 1de3a5c0f7 Enforce rule in vm that factory name must match enclosing class name.
This is a step towards removing support for obsolete default factory classes.
For now, disable tests using obsolete syntax. More will get disabled as support
is completely removed. We may then permanently remove some tests, while updating
and reenabling others whose purpose is not related to default factory classes.
Review URL: https://codereview.chromium.org//11419191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15428 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:11:29 +00:00