Commit Graph

13143 Commits

Author SHA1 Message Date
srdjan@google.com 8d69118676 More strict non-equal cleanups in library code
Review URL: http://codereview.chromium.org//8413018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@892 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 15:21:42 +00:00
regis@google.com d104e34a9f Add support for 'Dynamic' type in the VM.
Add a test and disable if for dartc.
Review URL: http://codereview.chromium.org//8403005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@862 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 00:00:31 +00:00
srdjan@google.com 959f4b519d Use strict equality when comparing with null, especially when null is a default value.
Review URL: http://codereview.chromium.org//8400038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@859 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 22:11:16 +00:00
srdjan@google.com 8966841501 bool != int (Windows has the best C compiler).
Review URL: http://codereview.chromium.org//8400030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@845 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 18:06:17 +00:00
srdjan@google.com e3d3c552bb Fix excessive reoptimization (guard test lost somehow). Fixes problems in Dart.
Review URL: http://codereview.chromium.org//8412004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@844 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 17:43:04 +00:00
srdjan@google.com 5acfab56ba Restructure instance calls in optimizing compiler with the goal of eliminating all remaining inline cache calls in optimized code.
Review URL: http://codereview.chromium.org//8404009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@835 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 15:19:27 +00:00
turnidge@google.com 9ba5441c54 Handle spurious wakeups properly.
Review URL: http://codereview.chromium.org//8392044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@781 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 21:06:18 +00:00
regis@google.com 1df8ca858e Rename the VM internal 'var' type to 'Dynamic' type.
This change does not implement support for the built-in identifier 'Dynamic'.
Review URL: http://codereview.chromium.org//8403003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@779 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 20:58:34 +00:00
turnidge@google.com e756497a78 Refactor the dart api a bit:
- Dart_Result is gone.  Dart_Handle mostly replaces it.
- Name/signature changes
  - IsValidResult -> IsValid
  - GetErrorCString -> GetError
  - many more...
- Make details of persistent handle freelist private.
- Add persistent "True" handle to api state.

Things I am not doing in this changelist:

- Documentation updates
Review URL: http://codereview.chromium.org//8380020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@778 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 20:38:41 +00:00
regis@google.com ee7aca7f5b Fix type tests involving an implicit closure of a non-parameterized class
extending a parameterized class.
Add corresponding test.
Disable new test for dartc (filed new issue 5516001).
Review URL: http://codereview.chromium.org//8393033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@771 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 19:03:29 +00:00
srdjan@google.com ffaec5255d Store IC data instead of array of classes in AST node, so that we can easier access targets and future multi-check IC data.
Review URL: http://codereview.chromium.org//8394061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@770 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 18:47:17 +00:00
regis@google.com 57cf4c0e46 Fix issue 235.
Add test.
Disable new test for dartc.
Review URL: http://codereview.chromium.org//8394057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@766 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 17:59:55 +00:00
regis@google.com 0b98430a58 Cleanups.
Review URL: http://codereview.chromium.org//8390021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@726 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 23:16:16 +00:00
regis@google.com d03b6815fe Complete generic closure type checking.
Disable a bad test in co19 (issue 5512850).
Replace workaround by permanent fix for issue 5474672.
Review URL: http://codereview.chromium.org//8391007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@713 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 20:21:22 +00:00
srdjan@google.com 693ffc9b01 Fix crash on Linux,
Review URL: http://codereview.chromium.org//8391013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@712 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 19:27:24 +00:00
srdjan@google.com 5f43c05de7 Implement new inline cache. Delete a lot of unused code (most of change).
Review URL: http://codereview.chromium.org//8379013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@706 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 18:35:49 +00:00
ager@google.com 86284155b9 Improve error handling in the process library.
Verify that the arguments have the types expected by the
implementation. Require a List instance containing builtin
Strings as the arguments. Require a builtin String path.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8383037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@690 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 12:16:04 +00:00
benl@google.com e68ae4243d Fix tests broken by proxy changes.
TBR=ager
Review URL: http://codereview.chromium.org//8351032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@689 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 12:07:26 +00:00
turnidge@google.com 0caed71c26 Add Dart_GetNativeArgumentCount() and a test.
Review URL: http://codereview.chromium.org//8382017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@667 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 23:44:29 +00:00
srdjan@google.com 2ebcaea966 Code patching support and tests for new inline caches.
Review URL: http://codereview.chromium.org//8351019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@666 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 23:42:47 +00:00
hausner@google.com 48304ec6d7 Implicitly move super constructor call
Implicitly move super constructor call to the end of the initializer
list. Some code failed after r412.
Review URL: http://codereview.chromium.org//8380023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@663 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 23:06:01 +00:00
regis@google.com d2e9c47e77 Fix wrong detection of duplicate definition of function types (issue 187).
Duplicate import of a function type alias must be detected, but duplicate
import of a compiler generated canonical function type is necessary for proper
class resolution and is permitted.
Add tests.
Review URL: http://codereview.chromium.org//8375033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@658 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 22:31:30 +00:00
antonm@google.com 97c197e0dc Proper string comparison.
Review URL: http://codereview.chromium.org//8360027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@646 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 19:33:02 +00:00
srdjan@google.com 1f3084892e Fix broken build on non-ia32 architectures.
Review URL: http://codereview.chromium.org//8382009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@638 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 17:45:34 +00:00
srdjan@google.com a120ff3caa Transitioning to new IC structure: change IC data to include function name; pass IC data instead of function name when calling instance function.
New IC doc: http://goo.gl/fS2Hk
Review URL: http://codereview.chromium.org//8357034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@636 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-24 17:04:12 +00:00
cshapiro@google.com 357018c164 Declare the index as an intptr_t when the count is also an intptr_t.
Review URL: http://codereview.chromium.org//8369022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@623 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-22 00:18:29 +00:00
iposva@google.com d04263d0c6 Revert https://code.google.com/p/dart/source/detail?r=597
Review URL: http://codereview.chromium.org//8370016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@622 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 23:22:18 +00:00
cshapiro@google.com 246c862749 Deserialize string data directly into a newly allocated object.
BUG=5283593

Review URL: http://codereview.chromium.org//8359023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@619 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 22:05:49 +00:00
cshapiro@google.com f52039f03c Implement case mapping using the Unicode default case mapping algorithm.
BUG=5425968

Review URL: http://codereview.chromium.org//8333001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@616 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 20:33:29 +00:00
regis@google.com a019951eb9 Fix member overriding rules in VM according to latest spec.
Fix tests accordingly.
Review URL: http://codereview.chromium.org//8360022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@607 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 17:44:04 +00:00
antonm@google.com e0066aa4ea Igonre closure classes when looking for duplication.
Review URL: http://codereview.chromium.org//8363027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@598 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 12:46:34 +00:00
jrgfogh@google.com 3b3bef16e2 Fixed a problem with spurious wakeups.
Review URL: http://codereview.chromium.org//8362026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@597 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 12:30:48 +00:00
srdjan@google.com 584a6f81b4 Some performance improvements to make raytracer faster (e.g, support intensified operation in mixed double/smi, constant folding).
Review URL: http://codereview.chromium.org//8355041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@596 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 07:03:17 +00:00
asiva@google.com 61a641bdcf Add an imported into list for libraries so that it is possible to lookup
the local scope at the imported site in order to check if a variable is already
defined.

Added a check for duplicate definitions during class finialization which
checks for duplicate definitions.
Review URL: http://codereview.chromium.org//8342046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@593 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-20 23:29:06 +00:00
asiva@google.com cdb8faeaf0 Fix intermittent simarm build breakage on macos.
cc1plus: warnings being treated as errors
./vm/object.h: In static member function 'static dart::RawString* dart::ClassFinalizer::FinalizeTypeWhileParsing(const dart::Type&)':
./vm/object.h:274: warning: variable 'this' might be clobbered by 'longjmp' or 'vfork'
Review URL: http://codereview.chromium.org//8361017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@591 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-20 23:03:43 +00:00
turnidge@google.com 966fb86442 Minimal change to get win32 build working again.
Review URL: http://codereview.chromium.org//8352014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@568 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-19 19:13:55 +00:00
turnidge@google.com 368f37895f Use the distinguished class, ApiFailure, to signal when a Dart_Result is
invalid.

We eventually plan to drop the Dart_Result type entirely, but this change allows us to try out the functionality before we munge the user-visible api.
Review URL: http://codereview.chromium.org//8334009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@566 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-19 18:41:33 +00:00
antonm@google.com 9b8e11cb61 Setup necessary zones.
Review URL: http://codereview.chromium.org//8342039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@558 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-19 16:40:50 +00:00
iposva@google.com 4906ccd1db - Remove the remaining Array interface.
Review URL: http://codereview.chromium.org//8348025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@556 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-19 15:44:55 +00:00
srdjan@google.com bb6a85d69c Wrong condition caused repeated deoptimizations and performance degradation especially on Meteor.
Review URL: http://codereview.chromium.org//8343024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@546 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-19 08:27:39 +00:00
cshapiro@google.com aa427ff3dd Use the narrowest character width possible for substrings.
Review URL: http://codereview.chromium.org//8346014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@540 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 22:36:16 +00:00
turnidge@google.com 4271315779 Fix more races in MessageQueue_WaitNotify. My notifies could show up
before my waits, and I would timeout.
Review URL: http://codereview.chromium.org//8347013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@536 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 21:41:43 +00:00
turnidge@google.com 804becb850 Deleting the wrong message in FlushAll...
Review URL: http://codereview.chromium.org//8347010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@535 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 21:23:06 +00:00
turnidge@google.com 002eacd251 Fix race.
Review URL: http://codereview.chromium.org//8344017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@534 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 21:19:27 +00:00
regis@google.com 715f9a9700 Address review comments of previously submitted cl 8329005.
Review URL: http://codereview.chromium.org//8347008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@531 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 21:07:44 +00:00
turnidge@google.com c20b9d4183 Add a sleep at the end of MessageQueue_WaitNotify to give the spawned
thread time to properly exit.
Review URL: http://codereview.chromium.org//8345013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@526 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 20:38:36 +00:00
turnidge@google.com 0e98d4ae64 Allow embedders to provide custom message delivery for an isolate.
==============

Added Dart_SetPostMessageCallback and Dart_SetClosePortCallback.
These allow the embedder to provide custom message/port behavior
for their application. The vm provides standard implementations
that work with the standard run loop.

Added Dart_HandleMessage, which processes one message on the
current isolate. Embedders can use this to write their own
message processing loops. Rewrote code to use this internally.

Added Isolate::StandardRunLoop() to share code between
Dart_RunLoop and lib/isolate.cc

Changed the interface to PortMap::PostMessage. PostMessage is
now agnostic to message delivery mechanism. Note that PortMap is
now out of the "ReceiveMessage" business entirely. Moved
MessageQueue and friends out to message_queue.cc/h.

Moved the monitor from the Isolate into the MessageQueue. No
need for outsiders to mess. Added MessageQueue::Wait. Moved
monitor locking from PortMap into MessageQueue itself, which was
easier for me to reason about. Wrote some tests.

Removed PortMessage::Handle. The code turned into Dart_HandleMessage.

Regularized the nomenclature around ports. Type is now always
Dart_Port instead of intptr_t. Variables end in _port instead of
_id. Use the term "dest" instead of "target" or "send".

Added a family of new tests to port_test.

Added EXPECT_NE to the test framework.
Review URL: http://codereview.chromium.org//8297004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@516 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 17:54:07 +00:00
regis@google.com 14b2f4f150 Temporary workaround for issue 5474672.
Review URL: http://codereview.chromium.org//8341007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@504 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 04:32:01 +00:00
regis@google.com ee3fdf27e4 Replace calls to Class::IsParameterized() by either
Class::NumTypeParameters() > 0
or by
  Class::NumTypeArguments() > 0.
Review URL: http://codereview.chromium.org//8329005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@503 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 00:59:54 +00:00
hausner@google.com ab37c41e1d Interpolated strings are never considered compile time const
Review URL: http://codereview.chromium.org//8318031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@500 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-17 23:51:28 +00:00