Commit Graph

4855 Commits

Author SHA1 Message Date
lrn@google.com ee3dfa414f Change the order of bitwise operators and equality/relational operators.
Gives bitwise operators precedence above that of equality/relational operators.

This means that
  a & mask == something
no longer needs parentheses.

Since bitwise operators didn't work on booleans, and there are probably very few custom operator&'s that accept a boolean, this is expected to not break existing code.

BUG= http://dartbug.com/114
R=hausner@google.com, kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27613 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 12:32:47 +00:00
whesse@google.com 4fc5c84809 Recommit add FileSystemEntity.resolveSymbolicLinks
This was reverted in r27481 because of a failure on the debug Windows VM buildbot.

BUG=dartbug.com/1016

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27612 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 12:29:47 +00:00
lrn@google.com 6d49d9f1ac Reapply "Convert HashSet, LinkedHashSet to factory methods and custom implementations."
R=floitsch@google.com, fschneider@google.com, kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27610 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 11:36:25 +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
mlippautz@google.com d20d226204 Catch potential integer overflows in bigint operations.
strlen() returns a size_t which usually is unsigned long. Since we assign it to
intptr_t, we need to check for a potential integer overflow. The (albeit very
unlikely) case is lengths>2G on 32bit platforms.

BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27589 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 01:16:07 +00:00
jacobr@google.com cac607707a Make Dart_ScriptGetTokenInfo account for line_offset() and col_offset()
Cleanup bugs in wrapExpressionAsClosure Fix bug in how setters were handled and filter out 'this' from local variables list.

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27581 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 20:52:22 +00:00
zra@google.com 1fb64d6d95 Cleanup of some comparisons on ARM.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27574 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 16:28:06 +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
rmacnak@google.com 2e07b29fd2 Make Dart_FunctionOwner return handles on Types rather than Classes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27541 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 01:10:45 +00:00
rmacnak@google.com c7460aff0f Add Dart_QualifiedClassName.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27539 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 00:06:28 +00:00
asiva@google.com 2958d5a39a Allocate pending_classes array in new gen.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27536 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-16 21:58:00 +00:00
asiva@google.com 5c8925ea69 Use CHECK_ISOLATE instead of the more heavy DARTSCOPE for
Dart_HandleFromPersistent and DartHandleFromWeakPersistent. These
functions do not allocate any VM handles.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27535 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-16 21:57:46 +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 e155ff8c53 Revert last commit
Review URL: https://codereview.chromium.org//23889034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27507 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 23:36:32 +00:00
zra@google.com a61d0c66b0 Allows build of the standalone VM for ARM adroid.
R=iposva@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27506 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 23:29:14 +00:00
hausner@google.com f3ed73c8da Make hidden initializing formal parameters invisible to the debugger
Fixes issue 13143.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27505 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 21:37:16 +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
iposva@google.com f1583dec18 - More use of pre-allocated read-only handles.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27490 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 16:55:57 +00:00
iposva@google.com 35a8e25648 Fix http://dartbug.com/13297
- Error out early if the current working directory cannot be determined.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27486 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 16:40:36 +00:00
whesse@google.com 31c85401eb Revert "dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks."
This reverts commit r27475.

BUG=dartbug.com/1016

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27481 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 15:00:26 +00:00
whesse@google.com f9ba5f494d dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks.
BUG=dartbug.com/1016
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27475 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 11:15:12 +00:00
kasperl@google.com d6e339eb11 Double the default heap size on 64-bit platforms to account for all pointers taking up twice the amount of memory.
R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27466 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 07:52:11 +00:00
hausner@google.com bbcf74a569 Make "as" a built-in identifier aka pseudo keyword
Fixes issues 12551, 13021

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27461 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 23:45:41 +00:00
hausner@google.com 417e20b15f Detect illegal class member names
Make it a compile time error if a class member has the same name
as the class.

Fixes issue 13236.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27446 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 20:44:34 +00:00
iposva@google.com 2c0acad1e5 - Tighten assertions in the X64 assembler related to object pool usage.
- Adjust code passing objects into the assembler.
- Fix stack smashing bug in test.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27445 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 20:44:26 +00:00
jacobr@google.com d9f7cc5099 Add "function" as an argument to Dart_ActivationFrameInfo
BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27440 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:45:42 +00:00
rmacnak@google.com aa8d63aeea Properly handle exceptions that arise when reflectively invoking a constructor/factory.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27439 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:42:08 +00:00
mlippautz@google.com 214d00f536 Mirrors cleanup. No semantic changes.
BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27438 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:32:13 +00:00
whesse@google.com 27600274c8 Fix error handling when current working directory is deleted.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27433 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 14:30:23 +00:00
fschneider@google.com 0d6bc7ef10 Fix bug with deoptimization of SIMD Uint32x4 values.
The deoptimizer created the wrong kind of value for those.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27425 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 10:42:26 +00:00
johnmccutchan@google.com 28a09f3b80 Do not eliminate GuardFieldInstr when guarding list length.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27420 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 07:29:20 +00:00
mlippautz@google.com cd958c8ca4 Fix reparsing of function parameters that include type parameters.
The parser is now properly initializing parsed_function/current_function to make
internal lookups work (instead of crashing).

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

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

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