hausner@google.com
d3a1050ebc
Minor improvement in mixin application
...
Build list of functions and attach it to mixing application
class on one call. Takes care of a review comment by Siva.
TBR=asiva
Review URL: https://codereview.chromium.org//12261029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18495 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:48:18 +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
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
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
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
regis@google.com
912194a756
Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
...
Review URL: https://codereview.chromium.org//11956004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
asiva@google.com
0a825a9ed7
Cleanup handles more efficiently, ensures we don't have to iterate over them
...
while visiting objects during GC.
- Add handle scopes during class finialization
- Add handle scopes to different stages of the compiler
- Ensure that we iterate only to the top of scoped handles while visiting objects
Review URL: https://codereview.chromium.org//11778013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16683 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 05:44:20 +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
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
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
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
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
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
bfd459b09c
Add flag 'implements' to class, it is set anytime someone implements this class. This is a way to recognize implicit interfaces in order to improve class checks.
...
Review URL: https://codereview.chromium.org//11348283
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15477 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 22:57:26 +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
srdjan@google.com
99ff4cef45
Address Florian's comments: use restricted lazy deoptimization, fix typo.
...
Review URL: https://codereview.chromium.org//11364245
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14938 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 01:36:04 +00:00
srdjan@google.com
fc4f5c093d
Upon script loading deoptimize only functions whose owener has been subclassed, as that is the only CHA optimizations being applied to the code at the moment.
...
Review URL: https://codereview.chromium.org//11365273
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14934 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 00:41:53 +00:00
srdjan@google.com
439110bf48
Move lazy deoptimization of all optimized code from top level parsing to end of class finalization (after installing new classes, and --use_cha, we need to invalidate some optimzied code)
...
Review URL: https://codereview.chromium.org//11370008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14871 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 23:31:07 +00:00
ajohnsen@google.com
970cc5ba68
Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
...
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.
BUG=
Review URL: https://codereview.chromium.org//11365196
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
lrn@google.com
1555c1db26
Convert String to a class.
...
Remove the StringImplementation class.
Review URL: https://codereview.chromium.org//11085003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14779 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 08:16:59 +00:00
regis@google.com
40276f8c30
Fix result type checking of factory constructors of generic classes in VM.
...
Add a language test.
Fix some language tests.
Fix runtime library.
Note: This does not yet fix result checking of redirecting factories.
Review URL: https://codereview.chromium.org//11369168
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14769 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 23:51:06 +00:00
hausner@google.com
99c505e9b3
Fix various inheritance bugs
...
Fields can be overridden by subclasses
A setter does not conflict with a method
Eliminate outdated tests
Fixes issue 6482
Review URL: https://codereview.chromium.org//11312095
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14583 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 17:54:27 +00:00
regis@google.com
2148b51189
Do not copy type parameter bound from declaration to reference, since we are
...
not able to properly finalize it. Revisit later.
This fixes issue 6488. Siva will add a test.
Review URL: https://codereview.chromium.org//11366093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14544 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 21:00:12 +00:00
asiva@google.com
ebbb7c4134
- Represent strings internally in UTF-16 format, this makes it
...
compatible with webkit and will allow for easy externalization of
strings. One byte strings are retained for pure ASCII strings.
(The language specification was changed recently to reflect this as
follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
consistent and better describe the underlying functionality
Dart_NewString => Dart_NewStringFromCString
Dart_NewString8 => Dart_NewStringFromUTF8
Dart_NewString16 => Dart_NewStringFromUTF16
Dart_NewString32 => Dart_NewStringFromUTF32
Dart_NewExternalString8 => Dart_NewExternalUTF8String
Dart_NewExternalString16 => Dart_NewExternalUTF16String
Dart_NewExternalString32 => Dart_NewExternalUTF32String
Dart_StringGet8 => Dart_StringToUTF8
Dart_StringGet16 => Dart_StringToUTF16
Dart_StringToCString => Dart_StringToCString
Dart_IsString8 => Removed
Dart_IsString16 -> Removed
Dart_StringToBytes -> Removed
Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
regis@google.com
d00ed7fbc6
Ambiguous references do not necessarily cause compilation errors (issue 5736).
...
Triage related co19 test failures.
Review URL: https://codereview.chromium.org//11232071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13987 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 22:29:44 +00:00
hausner@google.com
2f93dfb15d
Fix inheritance of certain static members in VM
...
Fixes bug 3778
Review URL: https://codereview.chromium.org//11225033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13901 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 18:54:58 +00:00
hausner@google.com
1811a6b913
Support for type dynamic in VM
...
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.
VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
regis@google.com
3969668ab8
Resolve interfaces before starting finalizing classes (issue 5586).
...
Review URL: https://codereview.chromium.org//11088079
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13563 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 17:28:33 +00:00
regis@google.com
1b8e614d7d
Change compile-time errors into dynamic errors in instance creation expression
...
(issue 3085).
Change compile-time errors into dynamic errors in static getter and setter
calls (issues 3088, 3094).
Fix a crash in flow graph builder for missing static getter (issue 4360).
Add support in VM for NoSuchMethodError.
Remove support in VM for StaticResolutionException.
Add, remove, update related language tests.
Triage related co19 tests.
Review URL: https://codereview.chromium.org//11049038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13208 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:15:38 +00:00
regis@google.com
ccacc62ec6
Change many instance creation errors from compile-time errors to dynamic errors
...
per revised spec (issue 3801).
Add negative tests for factory redirection.
Review URL: https://codereview.chromium.org//10979053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12975 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 17:52:35 +00:00
regis@google.com
656cdf40d4
Fix snapshot reading of canonicalized types.
...
Change some redirecting factory compile-time errors into dynamic errors after
discussion with Gilad (negative tests still missing).
Review URL: https://codereview.chromium.org//10996002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12872 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 19:26:53 +00:00
regis@google.com
61297238fb
Support redirecting factory constructors in the VM (issue 3969).
...
Add test (negative tests still missing).
Some more work is needed regarding when to throw a dynamic error and when to
report a compile-time error. Some questions are not answered by the spec.
Review URL: https://codereview.chromium.org//10964058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12791 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 17:28:37 +00:00
lrn@google.com
292da5cc48
Make int an abstract class.
...
This looks deceptively simple (the only real change is in init, which
just copies the code for double, and the rest are just renaming for
consistency). It seems to work.
Review URL: https://chromiumcodereview.appspot.com//10933039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12304 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 07:17:27 +00:00
regis@google.com
e860f819a0
Limit the maximum number of formal parameters (32K fixed and 32K optional)
...
in order to save space in function objects.
Naming cleanup.
Review URL: https://codereview.chromium.org//10928160
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12288 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 23:35:05 +00:00
hausner@google.com
5692051e4e
Convert double interface into abstract class
...
In a future change, we can implement double in the core
library, eliminating class Double (using the patch class
feature).
Review URL: https://chromiumcodereview.appspot.com//10876100
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11631 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:29:49 +00:00
asiva@google.com
4c24f3f17a
Ensure types are canonicalized when canonicalization is requested and the type is already finalized.
...
(Reduces initial heap size by about 15k)
Review URL: https://chromiumcodereview.appspot.com//10886038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11544 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 20:20:52 +00:00
hausner@google.com
c7f5bcd0ca
Eliminate interface bool
...
Replace with concrete class bool instead, and getting rid of class Bool in core_impl library.
Review URL: https://chromiumcodereview.appspot.com//10874071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 21:09:23 +00:00
hausner@google.com
0300d88b1b
Gentle start with removing explicit interfaces
...
Review URL: https://chromiumcodereview.appspot.com//10832401
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11248 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 18:32:10 +00:00
regis@google.com
9efad2644b
Re-enable checking of native resolvers.
...
Review URL: https://chromiumcodereview.appspot.com//10882007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11206 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 03:26:20 +00:00
regis@google.com
3e6596ba22
Temporarily disable checking of native resolvers to make Dartium build green.
...
A more permanent fix will follow.
Review URL: https://chromiumcodereview.appspot.com//10869024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11200 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 01:01:14 +00:00
regis@google.com
fbd17a4d20
Fix Mac build.
...
Review URL: https://chromiumcodereview.appspot.com//10869022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11199 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:42:43 +00:00
regis@google.com
55c106f812
Make ClassFinalizer indifferent on whether we are generating a snapshot or not.
...
Add flag --error_on_malformed_type.
Remove obsolete flag --verify_implements.
Support snapshotting of LanguageError (for malformed types) and ApiError.
Review URL: https://chromiumcodereview.appspot.com//10871005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11198 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:27:49 +00:00
regis@google.com
fea5f83714
Implement class hierarchy analysis in the VM.
...
Add test.
Review URL: https://chromiumcodereview.appspot.com//10828399
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11006 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 23:38:09 +00:00
hausner@google.com
9dc7ab8e1e
Implement import scope
...
Implement the new scope rule for imports.
- Imported identifiers are in a scope that is shadowed
by the importing library's top-level scope.
- Conflicting names imported from different libraries
are not an error unless the name is referenced.
- Conflicting type names are only an error in checked mode.
In a follow-on change, I'll remove the "imported_into" pointers in libraries. They are no longer needed.
Issue 2945
Review URL: https://chromiumcodereview.appspot.com//10823396
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10923 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 21:06:16 +00:00
cshapiro@google.com
265e2306f5
Add a weak property type to the virtual machine.
...
Weak properties are key-value pairs. The liveness of the key determines
the liveness of the value. If the key is reachable the value is traced.
However, if the key is unreachable, the value is subject to finalization.
At present, the sole finalization action is clearing the key and value
fields. However, it is possible to extend this to invoking callbacks or
other techniques, as well as processing values in topological order.
Review URL: https://chromiumcodereview.appspot.com//10832199
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10867 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 01:17:39 +00:00
iposva@google.com
99d563982c
- Support for patching of class methods and fields.
...
Review URL: https://chromiumcodereview.appspot.com//10827288
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
hausner@google.com
9b47d131bf
Support new getter syntax (no formal parameter list)
...
Support both new and old getter syntax in the VM compiler.
One co19 test becomes invalid, as it expects a compile error
due to missing getter formal parameters.
Review URL: https://chromiumcodereview.appspot.com//10837208
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10541 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 22:53:34 +00:00