mlippautz@google.com
94502c10ea
Checks CObject lengths in native API.
...
Also converts the API to use intptr_t instead of a mixture of int64_t and int. Internally all variable length objects have lengths and maximum values represented as intptr_t (actually Smi ranges). In order to check for these maximum lengths we need to have a common type for 32 and 64 bit platforms.
Helping constructs like IOBuffer can still use 64bit lengths, but have to check that there values are actually in the domain of intptr_t as soon as internal objects are created.
Addresses issue 4314.
BUG=
R=asiva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//23532048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27395 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:56:12 +00:00
hausner@google.com
43d319c105
Update unresolved name handling with library prefixes
...
Fixes issue 12913
R=iposva@google.com
Review URL: https://codereview.chromium.org//23480064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27393 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:21:25 +00:00
lrn@google.com
18362b2cf4
Revert "Convert HashSet, LinkedHashSet to factory methods and custom implementations."
...
Triggers an error in html tests on dartium.
Review URL: https://codereview.chromium.org//23451045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27392 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:19:45 +00:00
mlippautz@google.com
1cf1806f29
Remove unreachable code in mirrors.
...
The only case where we do not set the name in the constructor is for anonymous
mixin applications.
BUG=
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//23531037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27390 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:10:43 +00:00
ajohnsen@google.com
c6ef82b5c9
Polish the EventHandler cleanup in r26517.
...
BUG=
R=iposva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//22918023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27386 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 15:31:44 +00:00
ajohnsen@google.com
1cd800214f
Always wait for child processes when forked, even if the process failed.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23494048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27384 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 14:29:23 +00:00
ajohnsen@google.com
6949a7bd08
Simplify process exit-code handling on Posix, take 2.
...
As in https://codereview.chromium.org/24024007 , except the monitor->Wait
is now called in a loop with a guard, to ensure we actually do get notified.
Also, now correctly exiting the thread if we have no more child
processes, using the initialize/terminate mutex as guard.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23717038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27380 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 13:05:13 +00:00
lrn@google.com
c5bb6f7b15
Convert HashSet, LinkedHashSet to factory methods and custom implementations.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//23859008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27378 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 12:35:57 +00:00
kmillikin@google.com
94ca56a774
Fix a bug in block reordering/block compaction.
...
The compiler assumes (a) the graph entry is followed in the block order by
its normal entry, and (b) the normal entry block is non-empty. There is not
necessarily true, so stop assuming it.
BUG=https://code.google.com/p/dart/issues/detail?id=13101
R=fschneider@google.com
Review URL: https://codereview.chromium.org//23766021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27377 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 12:32:58 +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
zra@google.com
e65e9e1564
Better handling of zero in compare and branch for MIPS.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//23537030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27362 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 23:46:09 +00:00
iposva@google.com
09a1a3824b
- Add missing AddProperty function, which was lost during reformatting.
...
- Reenable vmservice tests.
Review URL: https://codereview.chromium.org//23781005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27348 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 18:11:29 +00:00
iposva@google.com
52a736ee38
- Disallow copy constructors.
...
Review URL: https://codereview.chromium.org//23903034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27346 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:47:55 +00:00
iposva@google.com
336183cf6b
- Add missing explicit in constructor.
...
Review URL: https://codereview.chromium.org//24088007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27345 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:31:37 +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
fe9e202f8b
Fix debugger expression evaluation for top-level functions
...
The temporary class that holds the expression to be evaluated
must be marked as finalized.
Added Jacob's closure tests.
Fixes issue 13192.
R=jacobr@google.com
Review URL: https://codereview.chromium.org//23825006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27338 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 15:30:52 +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
vsm@google.com
92202c9f5e
Fix compiler warning
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//24075003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27303 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 17:35:27 +00:00
mlippautz@google.com
6b175bbada
"Reverting 27298"
...
BUG=
Review URL: https://codereview.chromium.org//23816010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27302 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 17:26:07 +00:00
zra@google.com
eb28abc920
Updates status file for slow test on x64.
...
Review URL: https://codereview.chromium.org//23654018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27299 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 16:54:03 +00:00
mlippautz@google.com
dc9fca00eb
Add length checks to ApiMessageWriter.
...
Addresses issue 4314.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//23479010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27298 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 16:50:41 +00:00
zra@google.com
df2054dae7
Sets a register aside on x64 for use as a pool-pointer. It is loaded and restored from the code object on Frame entry and exit. All LoadObject calls that can, and many calls and jumps through ExternalLabels now use the pool-pointer. The --compiler-stats flag when running dart2js indicates that code size is reduced ~13%, and more is probably possible.
...
R=fschneider@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22825023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27295 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 15:39:26 +00:00
kmillikin@google.com
1d0cde6f24
Fix the flag --reorder-basic-blocks so it works to disable reordering.
...
Temporarily set the flag to false by default to avoid a bad interaction
between block reordering and empty block compaction (dartbug.com/13101).
BUG=https://code.google.com/p/dart/issues/detail?id=13101
R=fschneider@google.com
Review URL: https://codereview.chromium.org//23523039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27292 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 14:54:45 +00:00
johnmccutchan@google.com
34721f9adc
Add cvtsd2ss into X64 disassembler
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//23653014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27291 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 14:45:59 +00:00
johnmccutchan@google.com
0c0bb73f35
Fix large performance regression in Box2D, MD5, and SHA1 benchmarks caused by https://codereview.chromium.org/22915008/
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//23684036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27288 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 12:39:52 +00:00
lrn@google.com
df78198c50
Remove String.concat from implementation classes.
...
It was removed from the interface a long time ago.
BUG= http://dartbug.com/13128
R=floitsch@google.com
Review URL: https://codereview.chromium.org//23464040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27286 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 11:04:45 +00:00
lrn@google.com
0f1e912d9d
Reapply "Make LinkedHashMap also have a factory constructor and be customizable""
...
The change was reverted due to failing Dartium tests that were not easily handelable on a Friday afternoon.
Review URL: https://codereview.chromium.org//23872008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27284 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:49:32 +00:00
ajohnsen@google.com
8fdf9b8ee6
Use correct output encoding in Process.runSync.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13149
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23528006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27283 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:33:53 +00:00
kmillikin@google.com
e9eec70cad
Change --print-ast output to be more regular.
...
The print-ast output is useful for debugging front end issues. It is a mix
of fully-parenthesized prefix notation (i.e., Lisp S-expressions) with some
infix.
It is not valid S-expressions for various other reasons. Most obviously, it
uses ' (single quote) instead of " (double quote) to delimit strings.
This change makes the print-ast output a valid Scheme S-expression. It can
be pretty printed by copying it, quoting it (by preceding it with a single
quote), and evaluating it at the REPL of a Scheme implementation.
Also, the AST node pretty names are changed to predictably match the class
name. It doesn't seem helpful to have them be arbitrary.
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//23923005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27282 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:20:55 +00:00
johnmccutchan@google.com
57a245c01d
Replace guarded list length field loads with constants
...
R=fschneider@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23584002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27280 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 05:48:01 +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
johnmccutchan@google.com
86ffb1f64d
Add alignment checks to typed_data views
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23686003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27278 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-08 15:18:04 +00:00
mlippautz@google.com
4df2b2b2f1
Remove leftover from CL 23038010.
...
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//23690007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27271 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-07 00:02:29 +00:00
sra@google.com
ce4b15c0e9
Esoteric bit operations.
...
- bit length
- truncate to signed fixed width integer
- truncate to unsigned fixed width integer
This change is motivated by a program that spends 20-30% of its time here:
// TODO(5828): Replace this with a bit-length method on int when available.
int n_bitLength = this.n.toRadixString(2).length;
See Also
https://code.google.com/p/dart/issues/detail?id=5828#c3
https://code.google.com/p/dart/issues/detail?id=6486#c2
https://code.google.com/p/dart/issues/detail?id=5798#c5
https://code.google.com/p/dart/issues/detail?id=12008
R=lrn@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23645003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27269 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 22:22:26 +00:00
srdjan@google.com
aa8b03e7d7
For trigonometric functions call to C-libraries: they are faster than x87 operations (3% on Box2D). This also enables quicker trigonometrics on ARM and MIPS. TODO: Make InvokeMathCFunction more flexible so that it can handle both static and instance calls
...
R=zra@google.com
Review URL: https://codereview.chromium.org//22853009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27256 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 18:14:53 +00:00
jacobr@google.com
3aec267398
Fix bug where Script files that only contained patches were lost from the list of LoadedScripts() This resulted in incorrect stack traces for int.parse Many Script files containing patches also contained non-patch classes or top level members and so they still worked.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//23982002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27254 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 17:54:05 +00:00
ajohnsen@google.com
bce63cccc9
Revert "Simplify process exit-code handling on Posix."
...
This reverts commit f1b1ba410e964b0f787513f245faf8b457c9331a.
BUG=
Review URL: https://codereview.chromium.org//23536032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27251 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 15:02:31 +00:00
lrn@google.com
761f55b1b9
Revert "Make LinkedHashMap also have a factory constructor and be customizable"
...
Dartium expectations expects "LinkedHashMap" and gets "_LinkedHashMap".
Review URL: https://codereview.chromium.org//23890008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27250 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 14:29:04 +00:00
fschneider@google.com
dff262d761
Remove inlining restriction of calls to the == operator.
...
This CL is the first step in enabling full inlining of == calls.
Previously, calls to any function with the name "==" were not considered
for inlining because super-calls were not handled correctly. Instead
of implementing == semantics for super calls in the back-end, the parser
now expands super calls to == into
let t1 = left, t2 = right {
(t1 === null || t2 === null) ? t1 === t2
: static_call(super.==, t1, t2)
}
This change removes a bit of platform-specific assembly. Normal instance calls
to == are still translated as before. Expanding those at the AST level would
incur a too high cost in terms of (unoptimized) code size, and also would be
an obstruction for optimizations of equality. The plan is to expand those
only at optimization time if there is an inlineable instance call to ==.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//23627009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27248 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:55:24 +00:00
ajohnsen@google.com
5e4135c731
Simplify process exit-code handling on Posix.
...
We now only use waitpid and not signals. When we exit, we perform a
small fork-and-exit to interrupt waitpid, so it can exit the thread.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24024007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27247 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:08:34 +00:00
lrn@google.com
64359158ab
Make LinkedHashMap also have a factory constructor and be customizable
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//23494027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27246 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:01:54 +00:00
kmillikin@google.com
2b19ed632d
Disentangle AstNode::Name and AstNode::ShortName.
...
The Name function is used for pretty printing except that for a few
node types we rely on a specific name for implementation correctness.
Overriding the pretty printing function to get out a type name, or a
variable name, or an operator symbol name, is risky.
1. Code that relies on the semantics of the name will break if the
pretty name is changed.
2. Pretty printing is less useful. For instance, LoadLocalNode just
prints the variable name (twice, once as the AST constructor and
once in quotes as the variable name). This is confusing if the
variable happens to have the same name as one of the other pretty
names, e.g., args or seq.
Now, there is a virtual function to get the pretty name but classes do
not change it to communicate other information (type names, variable
names, operator names).
BUG=
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23960003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27244 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 11:54:26 +00:00
hausner@google.com
50f1dc5034
Be consistent with number scanning
...
If 1.e+2 is interpreted as an integer literal followed by other tokens, then
so should 1e be interpreted as an integer literal followed by identifier e.
Review URL: https://codereview.chromium.org//23996003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27218 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 22:27:52 +00:00
hausner@google.com
5c0b92e347
Fix number scanning
...
Removing an old, Dash-era hack that makes 2is a faulty number
literal rather than the number 2 followed by the identifier or
keyword "is".
Also fix number_identifier_test.dart which contains an access
to a non-existent getter "memberName" of class NoSuchMethodError.
Review URL: https://codereview.chromium.org//23711004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27216 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 22:11:50 +00:00
rmacnak@google.com
232cdaae3e
VM: Make ParameterMirror.toString say it is a parameter mirror.
...
VM: Make FunctionTypeMirror.toString use the form (args) -> retval.
dart2js: Fix FunctionTypeMirror.toString's use of separators.
BUG=http://dartbug.com/13079
R=ahe@google.com
Review URL: https://codereview.chromium.org//23601018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27213 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 20:57:22 +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
whesse@google.com
7e7b95c04e
Fix android build of runtime.
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//23978006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27197 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 15:04:59 +00:00
ajohnsen@google.com
47239cb3a2
Move delete/deleteSync up to FileSystemEntity, with a shared documentation.
...
This also means that FileSystemEntity.delete(recursive: true) now will
delete any object on disk, much like 'rm -r', without the need of
wrapping it in a Directory object.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23889008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27196 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 14:54:38 +00:00
whesse@google.com
8923601f5a
Disable all warnings when compiling NSS.
...
Disabling individual warnings when compiling NSS no longer works, because
some warnings that cannot be disabled individually are now generated.
BUG=dartbug.com/13064
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23440018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27190 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 11:09:00 +00:00
fschneider@google.com
9d8049dd4d
Small code cleanup in the assembler/simulator.
...
Review URL: https://codereview.chromium.org//23578013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27189 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 11:07:09 +00:00