regis@google.com
6c92ec5439
Simplify VM internal representation of a mixin application clause (MixinAppType
...
object) by removing some redundant field and type arguments.
Tolerate mixins with wrong number of type arguments and update tests.
Note: this is a first cleanup step in preparation of more mixin bug fixes.
R=hausner@google.com
Review URL: https://codereview.chromium.org//23619026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27363 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 00:41:07 +00:00
iposva@google.com
74b2a34d5b
- Base JSON stream printing on stack objects.
...
- Simplify creation of a JSONStream.
- Add experimental coverage output to the VM.
R=asiva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//23875015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27344 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:21:59 +00:00
hausner@google.com
fd57843900
Update handling of ambiguous name references
...
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.
Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.
Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.
Fixes 12915, 12913, 12724.
R=regis@google.com
Review URL: https://codereview.chromium.org//23484020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
johnmccutchan@google.com
e571ecdf87
Tests for GuardField length check along with bug fixes
...
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22915008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27279 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-08 21:44:42 +00:00
srdjan@google.com
e3ce299913
Traverse inlined frames lazily when printing the stacktrace. No need to carry separate function and code array, since function can always be extracted from code.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23964003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27209 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 20:25:00 +00:00
regis@google.com
765aac1496
Keep track of the application of a mixin type to a mixin application class,
...
which includes setting up its type parameters (fix issue 12871).
R=asiva@google.com
Review URL: https://codereview.chromium.org//23453024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27157 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 22:21:36 +00:00
srdjan@google.com
cfb81a40aa
Last round of cleanups in exception handler, before going to the next stage.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23531008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26941 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 20:47:02 +00:00
iposva@google.com
da4806e40c
- Reapply change r26880.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23494014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26933 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 18:01:18 +00:00
kmillikin@google.com
ea5dfcd2e4
Revert "Compress memory usage. Imprive speed of finding exception handle..."
...
This reverts svn revision 26880. That change has broken stack traces for
exceptions, making it impossible to use them for debugging Dart code.
BUG=https://code.google.com/p/dart/issues/detail?id=12940
Review URL: https://codereview.chromium.org//23512004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26909 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 11:19:22 +00:00
hausner@google.com
f82de66060
Evaluation of expression in context of library top-level
...
Third and final part of expression evaluation in the context
of an (object|class|library).
R=iposva@google.com
Review URL: https://codereview.chromium.org//23514020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26898 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 23:24:23 +00:00
srdjan@google.com
e8117fea14
Compress memory usage. Imprive speed of finding exception handlers: if a code does not have any handlers, do not reaverse the PC descriptors.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23691008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26880 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 16:47:49 +00:00
rmacnak@google.com
ac705b02a7
More reflection of mixin applications in the VM.
...
*Provide ClassMirror.mixin
*Hide extra class on the inheritance chain introduced in mixin typedefs
*Give mixin applications a simpleName that matches the source language syntax
*Update mixin_test to distinguish between members and constructors
*Update mixin_test for the mixin application naming scheme
BUG=http://dartbug.com/12464
R=ahe@google.com , asiva@google.com
Review URL: https://codereview.chromium.org//23190003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26824 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:55:53 +00:00
srdjan@google.com
e06ea63b60
Mark exception handlers if they have a stacktrace specified. Do not build a stacktrace if the handler has no stacktrace.
...
R=asiva@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//23445012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26823 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:42:21 +00:00
kmillikin@google.com
4f80ef09df
Change Bool::Get to return a handle instead of a pointer to a raw object.
...
Replace occurrences of 'expr ? Bool::True() : Bool::False()' with simply
'Bool::Get(expr)' and analogously for its negation. The pointer to the raw
object can still be extracted with 'Bool::Get(expr).raw()'.
R=iposva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23480005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26770 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:38:56 +00:00
regis@google.com
93059fe3cf
More cleanup related to malformed and malbounded types.
...
Remove support for warnings in parser and related flags.
Rename flag --error-on-malformed-type to --error-on-bad-type, since it covers
both malformed and malbounded types (also closer to --error-on-bad-override).
R=hausner@google.com
Review URL: https://codereview.chromium.org//23465004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26677 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 23:24:01 +00:00
regis@google.com
81bcb1f18a
Distinguish between malformed and malbounded types (fix issues 12552 and 12554).
...
Add test.
Update status files.
Explanation of change: A malbounded type argument should not be mapped to
dynamic, as is a malformed type argument.
This change also adds a bunch of TODOs related to the encounter of malbounded
types in unexpected places.
A follow-up change will address these TODOs, add more tests, and may simplify
code that is still handling malformed types where they cannot occur anymore
after the spec simplified their handling.
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23190035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26665 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:56:02 +00:00
hausner@google.com
2642b1e522
Evaluate expression in the context of a class
...
Allows debugger to evaluate an expression in the context of a
static method of a class.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23102019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26617 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 22:42:41 +00:00
asiva@google.com
848291cea7
- Setup a peer for read only strings that are not externalized in
...
Dart_MakeExternalString so that it is not necessary to create
a new reference for it everytime it is accessed in native code.
- Removed unused function Dart_ExternalStringGetPeer
R=iposva@google.com
Review URL: https://codereview.chromium.org//22980022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26538 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 17:10:37 +00:00
johnmccutchan@google.com
c8b370ab50
Initial support for length guards on final fields.
...
R=regis@google.com , srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//22851003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26433 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 15:32:45 +00:00
hausner@google.com
d62ea57f8e
Evaluate expression in context of an object
...
This is the core functionality needed for the debugger.
Review URL: https://codereview.chromium.org//23067006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26328 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 22:17:09 +00:00
regis@google.com
f9df206e2e
Report compile-time errors for conflicting overrides as specified by latest
...
language spec (fix issue 12342).
Add override conflict tests.
Update status files.
Add support for 'ok' status in multi-tests.
R=hausner@google.com
Review URL: https://codereview.chromium.org//22999022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26302 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 23:39:41 +00:00
iposva@google.com
34b4dfac1e
- Avoid double iteration when accessing anonymous classes.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23072013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26131 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 17:54:18 +00:00
srdjan@google.com
1f31dcc424
Fix for running with --throw_on_javascript_int_overflow: recognize pattern (a << b) & mask and test for overflow only after the mask.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//22640019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26122 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 15:12:39 +00:00
fschneider@google.com
0b94e4c329
Clean up VM class DartFunction.
...
DartFunction was the VM-internal class associated with
the Dart class "Function". It does not have any functionality
on it and therefore we don't need a VM-internal class for it.
R=iposva@google.com
Review URL: https://codereview.chromium.org//23026004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26063 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 17:05:46 +00:00
asiva@google.com
4b2c10ae32
Added following dart API changes to enable more efficient access based
...
on the dartium usage pattern:
- Dart_GetNativeStringArgument (gets a String object, peer etc. directly from
the native arguments)
- Dart_SetWeakHandleReturnValue (allows a weak handle to be passed to the
return value, this ensures a new local handle does not have to be created
from a weak handle just to return a value)
- Dart_StringGetProperties (gets some common properties of a string, avoids
multiple API calls to set up a native string)
R=srdjan@google.com , vsm@google.com
Review URL: https://codereview.chromium.org//22632010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26046 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 01:19:25 +00:00
rmacnak@google.com
1edde1e0bf
Ensure the classes void and dynamic have empty arrays for fields, functions, etc. Move their Types to the VM isolate, and as a side-effect they are now canonicalized.
...
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12246
R=asiva@google.com , iposva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//22902002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26043 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 00:11:42 +00:00
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
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
ecd28e626a
Fix Issue 12322: the analysis requires stored guarded_cid to be returned when requested; only when computing result of LoadField instruction should we not trust guarded_cid for externalizable cids.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//22335005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25938 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 18:31:53 +00:00
cbracken@google.com
b93ed6b1e6
Cleanup: Use array syntax instead of pointer arithmetic
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//22381002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25929 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 16:40:45 +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
srdjan@google.com
0cabd24ae6
Do not use guarded cid on externalizable cid-s (one and two byte strings). An externalizable object can change its type on the fly and therefore we cannot rely on the information obntained while storing into the field.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//22314017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25893 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 18:56:48 +00:00
cbracken@google.com
43fae66ebf
Fixes to get Dart VM compiling on Ubuntu 13.04, Debian Wheezy.
...
* Convince gcc 4.7.x that len is initialized before use in callers of ReadFileFully()
* Cast RawObject* to intptr_t to avoid strict-aliasing error on gcc 4.7.x
* Replace two calls to strerror_r() with strerror() on Linux. When _GNU_SOURCE is
defined to be non-zero (as it is on Dart Linux builds), strerror_r() is
defined to return a char*, which is the correct error string to use. When
_GNU_SOURCE is zero, the XSI-compliant definition is used and the error
message is returned in the char* param. Surrounding error logging uses
strerror() which solves the problem.
* Replace int literals with char literals in test string definition.
* co19 math/tan_A01_t01 passes on Ubuntu 13.04.
Original issues:
https://code.google.com/p/dart/issues/detail?id=12085
https://code.google.com/p/dart/issues/detail?id=8807
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//22381002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25890 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 17:28:04 +00:00
srdjan@google.com
c891612920
Adapt Random class to be able to run in javascript integer compatibility mode.
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//21966003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25753 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 23:07:55 +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
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
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
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
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
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