Commit Graph

529 Commits

Author SHA1 Message Date
ajohnsen@google.com 32eeecd930 Fix tests for VM in checked mode.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16689 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:59:49 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
regis@google.com 47e08870ca Support Null type in Class::TypeTest and simplify Instance::IsInstanceOf.
Review URL: https://codereview.chromium.org//11785006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16664 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-05 00:45:52 +00:00
asiva@google.com 4c069867e4 - Make Boolean 'true' and 'false' singleton VM isolate objects.
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +00:00
srdjan@google.com 29e06db609 In unoptimized code use call for instanceof instead of inlined checks. This allows us to collect type feedback and to reduce the code size of unoptimized code. Next will be work on type tests as well.
Review URL: https://codereview.chromium.org//11694003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16589 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 22:22:39 +00:00
asiva@google.com 7022b39e35 Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
regis@google.com cb27634842 Remove NoSuchMethodErrorImplementation class and use NoSuchMethodError from core
lib instead.
Review URL: https://codereview.chromium.org//11712002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16583 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 18:52:28 +00:00
tball@google.com 929344a574 Issue 7549: fix for invalid runtimeType.toString() for int, double, and
string constants.
Review URL: https://codereview.chromium.org//11624034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16516 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-27 18:08:16 +00:00
ngeoffray@google.com 7db6e9d3e0 Re-apply "Clean up the patch file for the isolate library by introducing a new buitlin library: isolate_helper.dart". This time load eagerly isolate_helper so that the native handler can see it.
Review URL: https://codereview.chromium.org//11640021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16500 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-26 17:15:02 +00:00
regis@google.com d273efd45f Turn compile time errors related to missing getters and setters into invocation
of noSuchMethod or into throwing of NoSuchMethodError according to spec.
Return result of InvocationMirror.invokeOn to caller.
Fix various tests.
Review URL: https://codereview.chromium.org//11669015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16463 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:40:46 +00:00
meh@google.com 2c7dfbf982 Implement a native identical function in the VM.
Returns true if objects are the same instance.
Adds an identical closure test (disabled for dart2js pending https://chromiumcodereview.appspot.com/11612022/).

BUG=7378

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16461 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:12:35 +00:00
meh@google.com 2e1ecb18fe Revert "Implement a native identical function in the VM."
This reverts commit 88a0845aedeed15106dcfc8c658ebed37e7e85dd.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16460 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 23:58:48 +00:00
meh@google.com 225d9a724b Implement a native identical function in the VM.
Returns true if objects are the same instance.

BUG=7378

Committed: https://code.google.com/p/dart/source/detail?r=16453

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16456 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 22:42:21 +00:00
meh@google.com 51dc889ad7 Revert "Implement a native identical function in the VM."
This reverts commit 93e88749af841a1b381db6351a7196d35edd554e.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16454 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 21:22:43 +00:00
meh@google.com 5e068fec8f Implement a native identical function in the VM.
Returns true if objects are the same instance.

BUG=7378

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16453 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 20:34:42 +00:00
meh@google.com a1bb3a9e51 Revert "Implement a native identical function in the VM."
This reverts commit c876c29bf4caa810bfc03c8b8908588168d634fe.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16451 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 20:08:59 +00:00
meh@google.com 55596818ac Implement a native identical function in the VM.
Returns true if objects are the same instance.

BUG=7378

Committed: https://code.google.com/p/dart/source/detail?r=16400

Committed: https://code.google.com/p/dart/source/detail?r=16412

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16450 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 19:07:55 +00:00
asiva@google.com 7ea520f10f Create read only handles for empty_array and sentinel objects
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
meh@google.com 38aa3e1dee Revert "Implement a native identical function in the VM."
This reverts commit 0f29c63d64de37beb5f1b927a492687fde6de58a.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16414 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 01:50:27 +00:00
meh@google.com 585e671819 Implement a native identical function in the VM.
Returns true if objects are the same instance.

BUG=7378

Committed: https://code.google.com/p/dart/source/detail?r=16400

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16412 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 01:14:32 +00:00
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