regis@google.com
9eb12ad303
Implement updated method overriding rules in the vm (issue 11495).
...
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.
R=asiva@google.com
Review URL: https://codereview.chromium.org//22685007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
rmacnak@google.com
303a29b5ba
Move Null class out of the VM isolate.
...
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12128
BUG=http://dartbug.com/12319
BUG=http://dartbug.com/12337
R=iposva@google.com
Review URL: https://codereview.chromium.org//22638011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25982 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:54:30 +00:00
rmacnak@google.com
0abc24d494
Fix name of libraries without a library declaration to be the empty string.
...
BUG=10580
R=asiva@google.com
Review URL: https://codereview.chromium.org//22642003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25981 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:27:28 +00:00
zra@google.com
5c3c549300
Allows compiler bailout to handle errors of any type.
...
R=asiva@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//22389004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25974 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 19:51:11 +00:00
rmacnak@google.com
fe85bf84bb
Reflection on generics.
...
BUG=
R=ahe@google.com , regis@google.com
Review URL: https://codereview.chromium.org//22292002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25942 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:06:56 +00:00
srdjan@google.com
1b12859a7e
Implement IsNullCheck for CheckClassInstr. If input is nullable expected type, then check for null only.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//22580005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25907 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 23:01:43 +00:00
regis@google.com
09bcdc6d6d
Fix VM implementation of CastError not to extend TypeError (issue 5280).
...
Remove non-compliant fields in various Error classes (issue 10144).
Remove implicit constructor when patching in a constructor (issue 12217).
Patch corelib Error classes instead of declaring subclasses.
Update tests and status files.
R=asiva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//21832003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25782 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 18:35:04 +00:00
zra@google.com
f60d2f6df4
Fixes obo error in javascript int checking.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21876005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25733 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 16:06:45 +00:00
johnmccutchan@google.com
97ef50a1b2
Support stacktrace and objecthistogram service commands
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//19870006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25726 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 00:24:09 +00:00
rmacnak@google.com
6ab88ae6d5
Implement metadata for libraries. Partially addresses issue 10906.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25721 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 20:45:49 +00:00
regis@google.com
4c90984b43
Set local function type as uninstantiated when applicable (fix issue 12127).
...
Add language regression test.
R=zra@google.com
Review URL: https://codereview.chromium.org//21274007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25687 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:26:26 +00:00
zra@google.com
1c4bddf92a
Fix build fail on mac.
...
Review URL: https://codereview.chromium.org//21029008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25677 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 18:16:53 +00:00
zra@google.com
42add423d2
Fixes javascript integer overflow check.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//21301003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25675 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 17:51:23 +00:00
mlippautz@google.com
c5c6df3548
BUG=
...
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//20216002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25651 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 22:57:59 +00:00
srdjan@google.com
14a3cb0cfd
Make sure that ICData always contains valid data (non-null values).
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//20755004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25535 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 20:17:04 +00:00
regis@google.com
b55b249409
Delay resolution of redirecting factory targets in order to avoid class
...
finalization cycles (issue 12041).
Ensure that a super class is finalized before the class extending it.
R=asiva@google.com
Review URL: https://codereview.chromium.org//20503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25532 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 18:18:56 +00:00
mlippautz@google.com
db8354cd4b
Inline CreateParameterMirrorList() functionality.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//19856003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25450 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-24 23:35:15 +00:00
srdjan@google.com
21bc801e6a
Allocate comments in old space.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//20180003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25449 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-24 23:20:26 +00:00
srdjan@google.com
849e8b0385
Make sure that all objects store in the Code object live in old space.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//19990006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25353 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 18:38:03 +00:00
regis@google.com
9581071936
Refactor resolution code in the vm to properly handle ambiguity errors.
...
Add test.
R=asiva@google.com
Review URL: https://codereview.chromium.org//19662003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25324 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 00:19:39 +00:00
rmacnak@google.com
9c4fef756b
Implement VariableMirror creation with non-API code. To break circular initialization, have them find their type lazily.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//19512003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25317 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 23:05:54 +00:00
mlippautz@google.com
b58e38269b
This change introduces nothing new. It only fixes the native entrypoints to use the right macros.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//19500016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25315 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 22:49:08 +00:00
srdjan@google.com
7e313fa96a
Recognize Math's min and max function for doubles and inline the operation.
...
R=regis@google.com , zra@google.com
Review URL: https://codereview.chromium.org//19792007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25287 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 17:27:45 +00:00
mlippautz@google.com
b3cb27a829
Since returnType is represented by a mirror, we make it lazy. We do not use a lazy mirror anymore, but instead create a type mirror upon first access.
...
CreateTypeMirror is already factored out of MethodMirror_return_type since it is needed by others mirrors (future CLs). Also introduces CreateMirror() which will be used in future CLs.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//19780002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25252 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 23:17:47 +00:00
srdjan@google.com
5781d7cc84
Collect both arguments for math's min/max static functions. Later that information will be used to inline the operation if possible.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//19774007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25225 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 16:49:29 +00:00
regis@google.com
fc8308a4f0
Allow the optimizer to canonicalize instantiated function types (issue 11775).
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19260003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25056 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:35:55 +00:00
regis@google.com
191d2673c8
Use proper internal name for implicit static final getters.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//19287003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25053 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:29:59 +00:00
fschneider@google.com
dfd21c06e0
Change resolving of instance methods to check early for name mismatch.
...
The names of actual arguments are checked at resolving time
for a mismatch instead of deferring this check to the function
prologue (emitted as part of the CopyParameters() prologue).
For example:
class A {
foo({a:42}) => null;
}
main() {
var a = new A();
a.foo(b:123); // noSuchMethod: no named parameter named "b".
}
This enables e.g. fast noSuchMethod invocation in the case
of a named argument mismatch.
It also makes the function prologue for instance functions that
use optional parameters shorter by omitting the check for a
name mismatch there.
R=regis@google.com
Review URL: https://codereview.chromium.org//19200002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25041 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 09:38:13 +00:00
rmacnak@google.com
39bf0aca44
Implement the invoke methods (invoke, getField, setField, newInstance, apply) as internal natives.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//18463003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25024 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 21:14:43 +00:00
fschneider@google.com
13b7b7242a
Faster invocation of fields as methods.
...
Until now there was a large discrepancy between
x.f() and
(x.f)()
This CL makes x.f() as fast as (x.f)() by automatically
generating a intermediate dispatcher function that loads
the field and invokes the result as a closure.
The approach resembles the one taken for fast noSuchMethod
invocation and reuses the same per-class cache
of dispatcher functions.
It also fixes a bug in the debugger so that VM-generated
implicit dispatcher functions (like for noSuchMethod, or
field-as-method invocation) don't show up the debuggers
stack trace.
BUG=https://code.google.com/p/dart/issues/detail?id=11041
R=srdjan@google.com
Review URL: https://codereview.chromium.org//18750004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25001 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 11:12:09 +00:00
floitsch@google.com
3c45bbcbe0
Cleanup VM error handling.
...
Unify the way the runtime throws errors. With this patch the VM goes through one location and always invokes the constructor of the errors.
It also makes it easier to rename fields in the error classes.
R=asiva@google.com
Committed: https://code.google.com/p/dart/source/detail?r=24995
Reverted: https://code.google.com/p/dart/source/detail?r=24997
Review URL: https://codereview.chromium.org//18531003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25000 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:32:37 +00:00
floitsch@google.com
f14e6b4975
Revert "Cleanup VM error handling."
...
This reverts commit r24995.
Review URL: https://codereview.chromium.org//19172002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24997 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:18:50 +00:00
floitsch@google.com
ef1afc7f91
Cleanup VM error handling.
...
Unify the way the runtime throws errors. With this patch the VM goes through one location and always invokes the constructor of the errors.
It also makes it easier to rename fields in the error classes.
R=asiva@google.com
Review URL: https://codereview.chromium.org//18531003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24995 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 09:28:28 +00:00
hausner@google.com
4c629b9b50
Implement forwarding constructors for mixins
...
By popular demand, fixes issue dartbug.com/9339
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19023005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24977 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 22:09:18 +00:00
regis@google.com
71f88546cc
Stop resolving classes prematurely in the vm (issue 11023).
...
Add missing class finalization to mirrors tests.
R=hausner@google.com
Review URL: https://codereview.chromium.org//19030004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24965 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 17:59:17 +00:00
srdjan@google.com
46c46f5c62
List class was not initialized properly (it has type parameters). Do not preinitialize it incorrectly, instead let it be loaded and finalized the normal way.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//18737004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24922 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 17:32:16 +00:00
fschneider@google.com
d77d1eac90
Correct handling of named optional parameters with noSuchMethod invocations.
...
This CL fixes a performance bug with noSuchMethod and named parameters. It also
simplifies the platform-specific code by removing special casing for the
noSuchMethod-dispatcher functions in the flow graph compiler.
Before using named optional parameters would still go through the slow
runtime in certain conditions: When running without inlining, or when
the dispatcher function was not inlined because of e.g. inlining size
heuristics, noSuchMethod would be slow if invoked with named parameters.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//18209024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24906 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 10:01:50 +00:00
mlippautz@google.com
77354459bd
Fix closure creation from function.
...
A closure created from a function should also inherit its token end position and
result type.
R=hausner@google.com
Review URL: https://codereview.chromium.org//19021002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24895 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-10 23:08:36 +00:00
fschneider@google.com
f260416fb8
Support fast noSuchMethod dispatch for any number of arguments.
...
Until now, the fast dispatch was only available with getters and
zero argument methods.
This CL generalizes the approach to any number of arguments. The
dispatcher functions that are auto-generated by the compiler
are not attached to the class anymore. Instead the dispatcher
is only stored in the IC data of each call site. Each class
contains a cache of dispatcher function that map
(name, arguments descriptor) => dispatcher.
This also fixes a bug where the VM report a wrong error message
when throwing a NoSuchMethodError.
BUG=https://code.google.com/p/dart/issues/detail?id=11528
BUG=https://code.google.com/p/dart/issues/detail?id=11223
TEST=tests/language/no_such_method_dispatcher_test.dart
R=srdjan@google.com
Review URL: https://codereview.chromium.org//18097004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24876 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-10 10:09:14 +00:00
srdjan@google.com
4ba6275183
FIx HasTypeArguments test.
...
R=asiva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//18627003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24868 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 23:43:46 +00:00
regis@google.com
e8a722870b
Support type parameters and classes as expression in the vm.
...
Turn many compile-time errors into runtime errors per latest spec.
Triage affected tests.
R=hausner@google.com
Review URL: https://codereview.chromium.org//18801007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24861 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 19:35:56 +00:00
johnmccutchan@google.com
0ba453b4b6
JSONStream Print Dart Objects
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//18472009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24841 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 14:07:14 +00:00
floitsch@google.com
898a3d8867
Relax method override restrictions.
...
This implements part of issue 11495.
BUG= http://dartbug.com/11495
R=regis@google.com
Committed: https://code.google.com/p/dart/source/detail?r=24731
Reverted: https://code.google.com/p/dart/source/detail?r=24733
Review URL: https://codereview.chromium.org//18600007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24736 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 18:02:11 +00:00
floitsch@google.com
5e207df6a4
Revert "Relax method override restrictions."
...
Revert "Update status file."
This reverts commit r24731.
This reverts commit r24732.
Review URL: https://codereview.chromium.org//18652002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24733 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 16:39:51 +00:00
floitsch@google.com
77034fe249
Relax method override restrictions.
...
This implements part of issue 11495.
BUG= http://dartbug.com/11495
R=regis@google.com
Review URL: https://codereview.chromium.org//18600007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24731 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 16:20:05 +00:00
iposva@google.com
4e96a9bfef
Fix bug 11637:
...
- Handle repeated private name mangling which can been introduced
with mixins.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//18234006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24712 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 01:37:02 +00:00
rmacnak@google.com
04e9e1fe56
Add a VM defined class VMReference as an opaque pointer for Dart code to VM internal objects.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//18242003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24694 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-02 16:17:25 +00:00
regis@google.com
0c93466054
Hide parent function name in name of closurized function to user (issue 5436).
...
Hide implicit parameter of closure to user.
R=iposva@google.com
Review URL: https://codereview.chromium.org//17904009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24504 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 00:49:49 +00:00
srdjan@google.com
7defd2255c
Use call counts to determine which static calls to inline.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//17646002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24436 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 22:12:49 +00:00
srdjan@google.com
7d945c593a
Remove skip_static_calls_ as it uses an obsolete way to check for uncalled static calls. Will be replaced by ICData tracking.
...
Add two different PCDescriptors to differentiate between optimized and unoptimized static calls (the former loads args. descr, the later loads ICData before calling).
Populate static call's ic_data field when optimizing.
R=asiva@google.com
Review URL: https://codereview.chromium.org//17723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24433 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 21:31:37 +00:00