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
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
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
jacobr@google.com
605b33c1bc
fix cpp11 compile errors
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23072026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
mlippautz@google.com
2187a8f63f
Move the begin token (token_pos) of explicit functions to the start of the function declaration.
...
This fixes setting the breakpoints when the signature of function declarations is spread across multiple lines.
Example:
int
get
foo
=>
42;
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//22916006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26080 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 20:11:23 +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
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
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
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
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
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
srdjan@google.com
fa7817bf79
Change static calls in unoptimized code to always call via a stub. Using ICData, the call count of static calls is collected as well.
...
TODO: Use call frequency to guide inlining.
R=asiva@google.com , hausner@google.com , zra@google.com
Review URL: https://codereview.chromium.org//17554003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24307 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 23:35:10 +00:00
srdjan@google.com
47de186e76
Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call site (the ones using ICData).
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//17421003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24239 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 16:29:39 +00:00
asiva@google.com
5ce344f18e
Add test to check that IsArray returns true for immutable array objects.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//17099005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24048 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 20:02:57 +00:00
asiva@google.com
d7dd745eaf
Fix build break.
...
Review URL: https://codereview.chromium.org//16815004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23916 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 16:29:14 +00:00
hausner@google.com
0374dc9b12
Reified metadata in the VM
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//16780008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23912 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 15:44:57 +00:00
asiva@google.com
e33c2d4254
Delay Class parsing until the class is actually used.
...
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
2013-05-24 00:13:10 +00:00
srdjan@google.com
142b49316a
Fix issue 5275: The VM must always generate the most compact form of an integer (Smi, Mint or Bigint). Hide methods that can be used to bypass that assumption and require the use of Integer::NewXXX which is guaranteed to return the most compact integer form.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//14962008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22816 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 20:49:06 +00:00
hausner@google.com
8e29370a1b
BREAKING CHANGE: enforce part of directive
...
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
2013-05-01 20:46:48 +00:00
srdjan@google.com
706e79d074
Fix error reporting when calling static methods and closures withh mismatched arguments.
...
Closures BEFORE:
----
Unhandled exception:
Class '(dynamic, dynamic, dynamic) => dynamic' has no instance method 'call'.
NoSuchMethodError : method not found: 'call'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Arguments: [2]
Closures NOW:
----
Closure call with mismatched arguments: function 'A.foo'
NoSuchMethodError: incorrect number of arguments passed to method named 'A.foo'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Tried calling: A.foo(2)
Found: A.foo(a, b, c)
Statics BEFORE:
----
Unhandled exception:
No top-level method 'foo' declared.
NoSuchMethodError : method not found: 'foo'
Receiver: Type: class '::'
Arguments: []
Statics NOW:
----
Unhandled exception:
No top-level method 'foo' with matching arguments declared.
NoSuchMethodError: incorrect number of arguments passed to method named 'foo'
Receiver: top-level
Tried calling: foo(...)
Found: foo(a, b, c)
R=regis@google.com
Review URL: https://codereview.chromium.org//14652008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22209 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 22:05:14 +00:00
zra@google.com
e411541296
Implements exception handler stub on MIPS.
...
Also enables codegen and object tests on MIPS.
Review URL: https://codereview.chromium.org//14273015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21839 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 21:15:54 +00:00
regis@google.com
d79c7c1969
Implement long jump in ARM and MIPS simulators.
...
Implement error and exception handler stubs on ARM.
Hook up simulator for object tests.
Enable codegen and object tests on ARM.
Review URL: https://codereview.chromium.org//14309004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21680 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 16:23:25 +00:00
vegorov@google.com
9f3783186f
Ensure that all goto instructions have deoptimization target.
...
R=kmillikin@google.com
BUG=
Review URL: https://codereview.chromium.org//12457034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21351 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 11:19:34 +00:00
asiva@google.com
29cea159bf
Fix some of the scalarlist tests to use TypedData VM classes.
...
This is in preparation for removing dart:scalarlist support from the VM.
Review URL: https://codereview.chromium.org//12907010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20532 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 18:46:44 +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
c2cafbbe33
- Change the layout of external typed array objects to avoid the extra indirection when accessing elements in the array.
...
- Change the Dart API which create these external arrays to account for this change
Review URL: https://codereview.chromium.org//12093071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17937 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 18:53:21 +00:00
asiva@google.com
8579ac9bb5
Allow externalization of canonical strings also. Only restrict canonical strings
...
in the VM isolate heap.
Review URL: https://codereview.chromium.org//11969029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17437 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 05:57:29 +00:00
hausner@google.com
79f4b5b61b
Simplify exception handler table
...
Sort entries and drop the try_index field. This simplifies lookup
of exception handlers when walking the traces on exceptions.
Review URL: https://codereview.chromium.org//11970024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17179 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 01:10:42 +00:00
asiva@google.com
c8284ad1bb
Fix for 7941
...
- mark unused space in an object whose type has been transformed as
Int8Array instead of Array. This ensure that GC does not traverse
the contents of the unused space.
Review URL: https://codereview.chromium.org//11968020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17165 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 21:45:49 +00:00
hausner@google.com
245c0e2c3e
Collect debugging info for catch clauses
...
Collect info about try-statement nesting, and a list of
handled types in each catch clause. This will be used by
the debugger to determine whether an exception is handled
by any handler on the stack.
Review URL: https://codereview.chromium.org//11883023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17100 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 22:43:00 +00:00
srdjan@google.com
9320b18911
Improve compilation speed on a pathological case > 2x (7 sec -> 2.7 sec) by improving local lookups.
...
Review URL: https://codereview.chromium.org//11893002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17085 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 19:08:55 +00:00
hausner@google.com
7e70aaddf7
Support for embedded Dart scripts
...
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
2013-01-10 21:47:09 +00:00
asiva@google.com
4c069867e4
- Make Boolean 'true' and 'false' singleton VM isolate objects.
...
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +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
asiva@google.com
7ea520f10f
Create read only handles for empty_array and sentinel objects
...
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
iposva@google.com
19a89a947e
- Do not read past the end of the utf32_array.
...
Review URL: https://codereview.chromium.org//11447009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15847 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 17:18:22 +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
asiva@google.com
4d26d87a3a
Issue - 7123
...
Rename
String::New(const uint8_t latin1_array......) to String::FromLatin1
String::New(const uint16_t utf16_array......) to String::FromUTF16
String::New(const int32_t utf32_array.......) to String::FromUTF32
Review URL: https://codereview.chromium.org//11443005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15763 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 23:37:37 +00:00
asiva@google.com
02049c689e
Fix for issue 7089 (Symbols::New was not quite working correctly
...
when there are non ASCII Latin-1 characters in the string).
Review URL: https://codereview.chromium.org//11411341
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15711 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 22:18:12 +00:00
asiva@google.com
76def187f8
Fix bug in Utf8::CodePointCount which was causing some strings with latin1
...
characters to be stored as TwoByteStrings.
Review URL: https://codereview.chromium.org//11419259
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15604 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 21:53:58 +00:00
cshapiro@google.com
392ca92d2d
Use the code point iterator when computing 16-bit string hash codes.
...
Review URL: https://codereview.chromium.org//11412258
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15565 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 02:36:19 +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
asiva@google.com
3535347845
Canonicalize all integer constants that we create by parsing a string.
...
Review URL: https://codereview.chromium.org//11348259
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15427 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 00:23:28 +00:00
srdjan@google.com
21f624d006
Cleanups and added more checks for valid Integer allocation (must be Smi, Mint or Bigint for their corresponding range).
...
Integer boxing in compielr seems to check correctly fro smi/mint. Can you think of any other places where we could create incorrect Mints or Bigints?
Review URL: https://codereview.chromium.org//11421064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15310 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 16:09:50 +00:00
erikcorry@google.com
359736e97a
Fix Unicode issues in dart2js and dart2dart.
...
R=floitsch@google.com
BUG=
Review URL: https://codereview.chromium.org//11418115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15254 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:51:14 +00:00
cshapiro@google.com
979571d3ee
Use a signed 32-bit integer for representing code points.
...
Review URL: https://codereview.chromium.org//11419086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15188 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 00:30:27 +00:00