Commit Graph

397 Commits

Author SHA1 Message Date
hausner@google.com b4527a7465 First stab at mixins in VM compiler
Things not yet supported:
- Type parameters for super class and mixin class
- super call limitation check
Review URL: https://codereview.chromium.org//12210127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18479 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:08:15 +00:00
srdjan@google.com 5694a140e3 Fix allocation of array tables (use store barrier if needed, store values directly instead of via stack).
Review URL: https://codereview.chromium.org//12212050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18464 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 18:44:27 +00:00
srdjan@google.com f0b56ef792 Reduce allocation of ArrayNode-s where a GrowableArray could be used instead.
Review URL: https://codereview.chromium.org//12207137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18412 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:34:12 +00:00
asiva@google.com 97c6554061 Minor cleanup
- added a field parsed_function to the parser
- remove fields expression_temp_ and saved_current_context_
Review URL: https://codereview.chromium.org//12225141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18402 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 21:14:05 +00:00
floitsch@google.com bbbe0c382d Allow ambiguous Expect and ExpectException imports.
This patch temporarily allows Expect to come from core and from any other library without (I wanted to make the CL public reporting an error (or warning).
Once everyone (including co19) has migrated I will revert this CL.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18318 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 17:59:52 +00:00
asiva@google.com 80e281a078 Fix for issues 6080 -
- Read the saved context from the entry frame when straddling across C++ frames while iterating over a stack trace in the debugger. This ensures that the correct context is setup in the ActivationFrame structure in these scenarios (instead of the empty context).

- Read the saved context from the caller's frame when iterating over a stack trace in the debugger. The compiler saves the context in the caller frame before invoking closures, we read this saved context when iterating the stack trace.
Review URL: https://codereview.chromium.org//12179020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18235 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 22:43:16 +00:00
iposva@google.com fe95f789c8 - Add handling of private dart:_ libraries.
- Make dart:collection-dev a private library by renaming it to dart:_collection-dev.
- Predefine the URIs of dart: libraries as VM symbols.
Review URL: https://codereview.chromium.org//12220027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18159 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 00:29:48 +00:00
asiva@google.com cd7b9395b6 Rename the accessor functions saved_context_var and set_saved_context_var to saved_entry_context_var and set_saved_entry_context_var so that it matches the local variable name used. This avoids confusing this with the saved_context_var variable which is used by try statements.
Review URL: https://codereview.chromium.org//12207023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18157 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 20:42:33 +00:00
regis@google.com ca927278dc Resubmit reverted r17962, but, for now, only report error about unfinalized
types if flag --error_on_malformed_type is specified.
Fix one more case of unfinalized signature type.
Review URL: https://codereview.chromium.org//12183014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18033 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 05:51:02 +00:00
antonm@google.com 5a9cc92093 Revert changes 17962-3 which break Dartium Debug build.
TBR=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17977 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 12:45:42 +00:00
regis@google.com 650ae359a4 Fix class patching involving type parameters: type parameters of patched classes
were not finalized.
Simplify and fix function type alias finalization (remove dummy alias owner).
Make sure no unfinalized types or unresolved classes are written to a snapshot.
Verify that all pending classes are finalized before writing a snapshot.
Make snapshot_test more resilient to finalization errors.
Add missing import to snapshot_test.dart.
Fix typo in growable_array.dart.
Review URL: https://codereview.chromium.org//12123002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17962 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 02:40:16 +00:00
regis@google.com 517f653176 Fix argument test for the captured parameter of an outer function (issue 8007).
Review URL: https://codereview.chromium.org//12036088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17592 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 19:14:55 +00:00
asiva@google.com f4fe42c280 Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
hausner@google.com dc3bf6646a Stop supporting map literals with 1 type argument
To be checked in next week Tue (Jan 22)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17410 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 16:48:00 +00:00
kmillikin@google.com 265ff9453d Allow cascades in initializer lists.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17383 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 10:08:57 +00:00
srdjan@google.com 7159a6f103 Some more ^= to |=
Review URL: https://codereview.chromium.org//12017020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17310 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 20:43:33 +00:00
asiva@google.com 069b3dabc4 Use new |= operator instead of ^= where it is possible to do so.
Review URL: https://codereview.chromium.org//11941005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17302 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 18:47:03 +00:00
vegorov@google.com a77fc9701c When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
hausner@google.com 0b01d53bd9 Remove support for old style function literals
Fix issue 6709.

TBR=iposva
Review URL: https://codereview.chromium.org//11996003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17245 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:24:19 +00:00
hausner@google.com eee56248f0 Remove support for legacy abstract declarations
Make keyword 'abstract' illegal in front of class member declarations.
Review URL: https://codereview.chromium.org//12016005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17243 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:01:14 +00:00
srdjan@google.com 37a715bbbf Lookup functions by name that contains the private key, except for dart_api which allows ignoring the private key.
Review URL: https://codereview.chromium.org//11968022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17178 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 00:42:03 +00:00
hausner@google.com cfb3b53aac Check whether exceptions are caught
The debugger can now determine whether an exemption will be caught or not.
Review URL: https://codereview.chromium.org//11946020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17167 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 22:16:09 +00:00
hausner@google.com 245c0e2c3e Collect debugging info for catch clauses
Collect info about try-statement nesting, and a list of
handled types in each catch clause. This will be used by
the debugger to determine whether an exception is handled
by any handler on the stack.
Review URL: https://codereview.chromium.org//11883023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17100 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 22:43:00 +00:00
fschneider@google.com 75c4844bf5 Cleanup uses of X::CheckedHandle where X::Cast or X::Handle is sufficient.
The only places where CheckedHandle is appropiate is with arguments to
runtime functions and values from Dart API functions.

For other places in the VM either normal Handle and ^=, or Cast is sufficient.

T::Cast is used when the value is guaranteed to be of type T (and never Object::null()).
Otherwise, the operator^= is used for casting.

Also fix a style issue where a Raw* should be used as return type.
Review URL: https://codereview.chromium.org//11826024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17013 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-14 09:51:48 +00:00
regis@google.com 34df344e36 Fix context chaining to prevent memory leak (issue 7681).
Review URL: https://codereview.chromium.org//11806003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16757 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 22:24:11 +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
kmillikin@google.com 309fcb1ba3 Fix incorrect desugaring of cascades.
Make use of the attractive and powerful way that the LoadLocal expression is
really a pair of an arbitrary statement and a local variable load.

BUG=dart:7494

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16684 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 10:03:17 +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
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
hausner@google.com a2d682d1d8 Improve line info accuracy in debugging
Review URL: https://codereview.chromium.org//11696005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16550 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-28 18:51:58 +00:00
tball@google.com 18e748d0b3 Implemented class literals in the VM.
Review URL: https://codereview.chromium.org//11633054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16530 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-27 23:45:40 +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
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
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
regis@google.com 6665f3c92c Include super type in interface list for cycle detection (issue 4318).
Report an error if a type appears in both extends clause and implements clause.
Add language test.
Close old pending issue 4905685.
Review URL: https://codereview.chromium.org//11613007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16237 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 00:13:33 +00:00
asiva@google.com 6749a3be79 Add read only handles for the following predefined symbols
"=="
 "[]"
 "[]="
 "this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +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 d5f055b605 - Create frame work for adding read only handles for symbols in the VM isolate
- Make the symbol corresponding to "." use this frame work and change code
  which was creating a handle to use the read only handle instead.
  (Once we agree on this frame work we could create similar read only handles
   for the frequently used symbols)
Review URL: https://codereview.chromium.org//11469036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15920 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 18:24:34 +00:00
kmillikin@google.com 275c8d928f Introduce a class encapsulating arguments descriptor arrays.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15727 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 12:05:57 +00:00
hausner@google.com 859889b9c5 Eliminate old style import from language tests
Also implement multi-part library names.
Review URL: https://codereview.chromium.org//11316283

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15612 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 23:20:01 +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
hausner@google.com fe1b63afbc Eliminate support for old getter syntax
Empty parameter list in a getter declaration is now a compile time error.
Review URL: https://codereview.chromium.org//11416254

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15532 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 18:33:45 +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
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
hausner@google.com 1da3a82fbf Eliminate support of legacy type Dyamic
With this change, Dynamic is no longer implicitly converted
to dynamic.

This change breaks code that still uses Dynamic.
Review URL: https://codereview.chromium.org//11419176

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15404 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 17:33:17 +00:00
ajohnsen@google.com 0f367f8894 Make List an abstract class.
This was the last interface in dart:core.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15240 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:40:52 +00:00
regis@google.com c2b4cccaee Ambiguous type references require a compile time error in some special cases
(fix issue 6741).
Review URL: https://codereview.chromium.org//11348188

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15233 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 00:14:08 +00:00
hausner@google.com 65bf9cbb2a Remove abstract from class members in dart libraries
Add VM flag to produce compile error for explicitly
defined abstract class members.
Review URL: https://codereview.chromium.org//11299121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15210 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 17:23:35 +00:00
regis@google.com d529fe1eea Address review comments of https://codereview.chromium.org/11299020/
Review URL: https://codereview.chromium.org//11418098

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15178 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 19:55:05 +00:00