-----
Often ToCString returns a representation which would be weighty or
unsightly to users. Instance::ToUserCString tries to return a
representation that will be more familiar to end users.
ToUserCString will be used in the vmservice to produce interesting
instance preview strings w/o calling toString. No doubt we will find
other uses for it too.
For example, strings are represented more as they would be in a user
program, with quotes and escapes: ("this\nis\ta\n\ntest") instead of (this
is a
test).
I intend to add better representations for short lists and maps
later, e.g. ([1,2]) instead of (Instance(length:2) of '_GrowableList').
I've added some tests to track current behavior.
Fix a problem where the vm internal names for private classes were
leaking out through ToCString. This is problematic because Dart's
default toString relies on ToCString (which surprised me). This fix
will be user-visible and, darn it, it's the right thing to do. For
example, before toString (in Dart) might yield:
Instance of '_MyPrivateClass@43df89GARBAGE4389'
Now it will yield:
Instance of '_MyPrivateClass'
(as an aside, do those single-quotes around the class name add any
meaning here?)
Massage the output of ToString for GrowableObjectArray to be more
consistent with other instance ToString output. This should not be user
visible, as lists define a reasonable toString.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//100833005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30996 260f80e4-7a28-3924-810f-c04153c831b5
Until now the parser marked native functions as native when parsing.
This may be too late for some functions. E.g. the native typed list
constructor may not be invoked because the intrinsic code is executed
instead (unless for example new-space allocation fails).
This causes missing type information when optimizing functions using
those recognized factory functions like Uint8List._new.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//99373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30846 260f80e4-7a28-3924-810f-c04153c831b5
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
* 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=12085https://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
Prior to this change the initial heap sizes were as follows:
ia32:
Size of isolate snapshot = 1230921
New space (0k of 32768k) Old space (1446k of 1604k)
X64:
Size of isolate snapshot = 1223943
New space (0k of 32768k) Old space (2630k of 2692k)
After this change the initial heap sizes are as follows:
ia32:
Size of isolate snapshot = 686443
New space (0k of 32768k) Old space (677k of 836k)
X64:
Size of isolate snapshot = 684731
New space (0k of 32768k) Old space (1220k of 1412k)
R=hausner@google.com, iposva@google.com, regis@google.com
Review URL: https://codereview.chromium.org//14820028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23115 260f80e4-7a28-3924-810f-c04153c831b5
For historical reasons, the VM is currently too lenient when parsing library parts. Files that get loaded through a 'part' directive must start with a 'part of libraryname;' clause. The VM so far has not reported an error if the clause is missing.
This change enforces the grammar as the Spec mandates it. Library parts that do not start with 'part of' will no longer compile.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14791005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22278 260f80e4-7a28-3924-810f-c04153c831b5
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
Add a line and column offset to scripts so that errors and exceptions
in embedded Dart scripts are reported at the proper location.
New API call Dart_LoadEmbeddedScript() that allows to specify
line and column offsets.
Stumbled on and fixed a bug. Script::kind field was not externalized to snapshot.
Review URL: https://codereview.chromium.org//11824067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16934 260f80e4-7a28-3924-810f-c04153c831b5