hausner@google.com
595271f2c9
Properly handle cascades in top-level functions
...
Fix for bug 8530
Review URL: https://codereview.chromium.org//12647012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20279 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 17:04:28 +00:00
vegorov@google.com
1c9d22d75c
Collect type feedback for fields.
...
BUG=
Review URL: https://codereview.chromium.org//12529008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20235 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 20:15:10 +00:00
hausner@google.com
8e499806e8
Revise duplicate interface check
...
Move check for duplicate interfaces from parser to class finalizer.
The parser only compared interfaces by name, which did not work
properly for qualified (imported) names. Now the check happens in the
class finalizer after types are finalized.
Sadly, our test harness does not appear to know how to handle multitests
that import libraries.
Review URL: https://codereview.chromium.org//12837007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20167 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-18 17:34:16 +00:00
hausner@google.com
ed2e198b99
Mixins with Generics
...
This change adds support for generics to mixins. It's not a particularly elegant
implementation, so I expect to change how it works internally in later checkins.
Also, there is still one aspect of the implementation that is incorrect. In the
case of typedef, the newly introduced name is not yet an alias for the
mixin application. Instead, the MA is a superclass of the typedef name. That
will need to be fixed in a later checkin. I don't want to make this change
bigger.
Review URL: https://codereview.chromium.org//12779008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20084 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 15:59:24 +00:00
regis@google.com
7b5a610084
Make allocation of Dart parameters and local variables architecture independent.
...
Enable a couple more vm tests on ARM.
Fix function usage counter access on ARM.
Review URL: https://codereview.chromium.org//12776006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20048 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 21:33:03 +00:00
regis@google.com
f644ba9791
Complete implementation of bounds checking in the vm, by introducing a vm object
...
BoundedType that represents a type that could not be checked against an upper
bound at compile time. A BoundedType is verified at run time when used,
typically when it (and/or its bound) gets instantiated.
This fixes issues 7075 and 7625.
Added one test.
Review URL: https://codereview.chromium.org//12473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19519 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 22:04:23 +00:00
hausner@google.com
c5634503f7
Fix for loop variable capturing
...
We had a bug in the capturing of for loop variables that only manifested
itself if another variable outside the loop was captured as well.
Fix for issue 8207 and 8698.
Review URL: https://codereview.chromium.org//12381089
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19429 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:28:55 +00:00
hausner@google.com
34cebe18cb
Libraries: update VM to current spec
...
- Exports allowed in script files
- library name is optional
- delete meaningless test, file co19 bugs
Review URL: https://codereview.chromium.org//12382026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19258 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 21:17:47 +00:00
asiva@google.com
3c90369ba6
Add functionality to get full stack trace when exceptions are thrown.
...
This should address the issue raised in 7813.
try {
...
...
} on Object catch(e, s) {
print(s.fullStackTrace); // This should print the full stack trace.
}
Review URL: https://codereview.chromium.org//12316116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19179 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 22:47:06 +00:00
hausner@google.com
f52edb6446
Less confusing names for mixing application classes
...
Use names of super and mixin class rather than types.
Review URL: https://codereview.chromium.org//12317150
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19154 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 17:42:24 +00:00
regis@google.com
7c4eec75ed
Fix bad optimization prematurely marking types as instantiated (issue 8710).
...
Add test.
Review URL: https://codereview.chromium.org//12314132
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19101 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 00:32:31 +00:00
hausner@google.com
ad61d01daa
Progress in generic mixins
...
Handle generic mixin applications in class declarations, but
not yet in type aliases.
Review URL: https://codereview.chromium.org//12340085
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19097 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 23:39:37 +00:00
iposva@google.com
b564104ea5
- Properly load the core libraries as libraries and not as scripts.
...
This will honor their imports and library names.
Review URL: https://codereview.chromium.org//12321082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19017 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:25:29 +00:00
regis@google.com
163db76189
Hook up simulator (if needed) when calling Dart code.
...
Merge identical InvokeDynamic and InvokeStatic to InvokeFunction.
Remove redundant argument from InvokeClosure.
Review URL: https://codereview.chromium.org//12315087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18994 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 19:30:29 +00:00
iposva@google.com
c900112af7
- Improve the message for NoSuchMethodErrors that are
...
determined statically at compile time.
Review URL: https://codereview.chromium.org//12328019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18848 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:53:27 +00:00
hausner@google.com
5eba0b69e4
Fix static name resolution in mixing code
...
In mixin code, static names need to be looked up in the mixin class.
OTOH, in patch classes, we need to resolve static names in the
class into with the code is patched. I'm all for simplicity!
Review URL: https://codereview.chromium.org//12308005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18710 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-19 18:26:55 +00:00
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