Commit Graph

2008 Commits

Author SHA1 Message Date
regis@google.com 2f900dab13 Cache number of type arguments in class object instead of recalculating it.
Reduce size of num_native_fields field in class object.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28670 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:31:31 +00:00
srdjan@google.com 2f0a906dbf Cleanups, refactoring in anticipation of new string interpolation nodes. Removed unnecessary code.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 23:21:52 +00:00
rmacnak@google.com 564fbb68dd Add proper API for creating private symbols wrt a library.
BUG=http://dartbug.com/13355
BUG=http://dartbug.com/12358
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 20:56:14 +00:00
regis@google.com fcadf9fdd6 Overlap type arguments of a type with the type arguments of its super type
when possible. Overlapping may be partial.
Add flag --overlap-type-arguments controlling this optimization for debugging
and performance measurement (default is true).

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28539 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:36:25 +00:00
rmacnak@google.com 8a0d62f5f9 Substitution for type variables in mirrors on instantiated generics.
BUG=http://dartbug.com/12282
BUG=http://dartbug.com/13808
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28495 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 01:51:11 +00:00
rmacnak@google.com 6ed9f2c17f Implement constructor kinds in the VM mirrors.
BUG=http://dartbug.com/13798
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28416 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 20:40:11 +00:00
regis@google.com 79b9edbf2a Do not share type arguments of mixin types, but clone them to avoid finalization
errors when cycles are involved (issue 13688).
Add regression test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28107 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 18:26:05 +00:00
srdjan@google.com 30197aab9d Improve performance of string buffer by modifying concatAll native to allow growable array and an interval. Eliminate unnecessary check for String elements in release mode.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28102 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 16:48:12 +00:00
jacobr@google.com 636d137f66 Fix for issue where external one byte strings cannot be escaped. This occured in practice when requesting all library names for a Polymer.dart example The likely reason why the issue occurs in this case but not others is that some of the libraries are generated using data urls. Added some tests for EscapeSpecialCharacters as it did not have any tests.
BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28073 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 00:08:01 +00:00
mlippautz@google.com 1941e151ea Improve code coverage generation.
- Remove function name from output.
- Remove column from output (side effect: We can use fast version of
  GetTokenLocation())
- Insert HANDLESCOPES
- Fold source file entries where easily possible, i.e., fold consecutive entries
  created by functions in the same source file.
- Change format to

  [{
     "source": "...",
     "hits": [<line>,<hitcount>, ...]
   }, ... ]

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28030 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 23:22:49 +00:00
srdjan@google.com db2516d7c2 Add a is_recognized bit to function kind field. Improves performance of method recognizer and thus the compilation speed.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28026 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 21:00:59 +00:00
mlippautz@google.com 19763aae4d Implementation for ClosureMirror.findInContext.
Fixes issue 5897.

BUG=https://code.google.com/p/dart/issues/detail?id=5897
R=asiva@google.com, gbracha@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27982 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 01:28:12 +00:00
rmacnak@google.com 753af9b01b Implement closurization of regular methods in ObjectMirror.getField in the VM.
BUG=http://dartbug.com/13001
BUG=http://dartbug.com/13002
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27916 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 21:42:13 +00:00
regis@google.com 20c36666b8 Address comments of committed change https://codereview.chromium.org/24397002/
Fix typo in Matthias last commit.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27850 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 20:26:12 +00:00
hausner@google.com 3c360399ee Improve NoSuchMethodError error messages
- Don't say there is no constructor with name X if there is one
  that has incompatible parameter list.
- Better error message when mismatched optional parameters are passed.
  (Prviously only the number of parameters was considered, but not
  names of named parameters for example.)

Fixes issue 6189.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27826 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 16:14:28 +00:00
mlippautz@google.com 728c46ca4f Make Script::GetTokenLocation() and Script::TokenRangeAtLine() use token streams
where possible.

BUG=
R=hausner@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27786 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 23:24:59 +00:00
rmacnak@google.com c9eabbcb56 Make Dart_IdentityEqual live up to its sepc and not leak boxing implementation detail. (Reland r27542.)
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27774 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 16:23:06 +00:00
mlippautz@google.com 4fa46b7148 Introduce newline tokens into the token stream.
CL only introduces the tokens into the compressed token stream. We do not
use the newline tokens (yet).

Overhead:
snapshot: 6.4% (860k/808k)
compressed token stream (gen_snapshot): 21% (314312/259907)

BUG=
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27677 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 21:46:50 +00:00
kmillikin@google.com 1255f3ce1c Fix an off-by-one error in deoptimization compression.
When compressing the deoptimization info, suffixes of length one are not
shared (the compression is the same length as the original, but more
indirect).  However, they were grafted onto the trie as if they were shared,
i.e., one level lower than they should be.

Add debug code to verify the compression/decompression round trip.

BUG=dartbug.com/13273
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27602 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 10:16:11 +00:00
ricow@google.com fab06df0eb Revert revision 27542 "Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail."
This is causing checked mode failures on all vm bots.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27545 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 06:29:47 +00:00
rmacnak@google.com 8ed7a0367f Make Dart_IdentityEqual live up to its spec and not leak boxing implementation detail.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27542 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 01:30:30 +00:00
mlippautz@google.com b09bbf706b Add metadata to type parameters. Reflective access is provided by TypeVariableMirror.
Addresses issue 10906.

BUG=https://code.google.com/p/dart/issues/detail?id=10906
R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27523 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-16 16:53:24 +00:00
zra@google.com 6282267aae Fixes slow object pool search on x64.
Issue 13144.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27494 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 18:10:04 +00:00
rmacnak@google.com 07c4d9d0c6 Fill in type arguments when creating an object from the mirrors or embedding API.
BUG=http://dartbug.com/13186
BUG=http://dartbug.com/12921
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27417 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 00:48:16 +00:00
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