Commit Graph

5189 Commits

Author SHA1 Message Date
lrn@google.com eb9e33e328 Update documentation on .fromEnvironment. Make bool default be false.
I want more text, and examples of usage, alternative usage, etc.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29657 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 09:33:18 +00:00
sgjesse@google.com 36a67fa046 Implement fromEnvironment on bool, int and String
This implements const constructor fromEnvironment on bool, int and
String.

The VM have the added -Dname=value option to define the value for the
properties. All values are provided by using the -D - nothing is read
from the environment.

If the resulting value is null or - in the case of int.fromEnvironment
- not a number an ArgumentError is thrown.

This CL does not have any implementation for dart2js.

This is a continuation of the change
https://chromiumcodereview.appspot.com/24975002 by iposva@
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29642 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 05:46:57 +00:00
johnmccutchan@google.com 8a0fd8ce4d Add Uint32x4List to typed_data
R=asiva@google.com, srdjan@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29639 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 04:57:38 +00:00
johnmccutchan@google.com 184c4439aa Extend Observatory to display libraries, classes, fields, functions and code.
R=sethladd@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29622 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 01:26:15 +00:00
srdjan@google.com cacd63cf7b Improve indexOf for one byte string receiver to work with other string classes.
Optimize access to core class’s class-ids.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29610 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 23:51:42 +00:00
regis@google.com 3fa7a61efc Implement latest spec changes regarding malformed types (see issue 14006):
- a malformed type used in a is, as, or catch type test results in a dynamic
  type error being thrown.
- a malformed type is not mapped to dynamic anymore.

For now, this applies to type tests in checked mode as well, but discussion is
still on-going.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29608 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 23:30:32 +00:00
rmacnak@google.com de5ab09605 Implement ObjectMirror.[] the VM.
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29578 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 19:02:46 +00:00
zra@google.com df1e5247fe Adds support for ARM softfp calling convention.
The cross-compiler with the Android NDK doesn't support
the 'hard' calling convention, so we need both. I've
added a preprocessor define to the gyp file for the
standalone vm indicating support for 'hard' so that I
don't have to modify the Dartium gyp files.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29577 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 18:57:55 +00:00
asiva@google.com 9809b88c4a Fix RawObject::IsVMHeapObject to use Contains instead of relying on the mark bit.
Review URL: https://codereview.chromium.org//51253003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29572 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 17:51:36 +00:00
whesse@google.com 462d0363fe Remove dart:io Options class.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29570 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 17:46:30 +00:00
srdjan@google.com 15d2afdca4 Fix performance degradation in string buffer benchmarks: concat in native instead of in Dart.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29567 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 17:25:23 +00:00
ahe@google.com 36e2df1a1d Mirrors overhaul.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:58:58 +00:00
ajohnsen@google.com 841785cbb3 Add IOSink:flush().
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29550 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:50:22 +00:00
ajohnsen@google.com 60ee24e8d1 Make FileSystemWatcher work on MIPS and make watching on android the same as linux.
BUG=https://code.google.com/p/dart/issues/detail?id=13553
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29548 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:17:29 +00:00
lrn@google.com 41ff075e31 Remove deprecated dart:utf library.
BUG= http://dartbug.com/12843
R=fschneider@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29537 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:25:02 +00:00
ajohnsen@google.com 7f9dfb1890 Fix move-watched-dir for MacOS.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29536 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:24:10 +00:00
lrn@google.com f0a1c922a2 Reapply "Remove @deprecated features."
R=scheglov@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29535 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:09:15 +00:00
kmillikin@google.com de1519525c Reapply "Do not directly load smi constants larger than a 16 bit..."
Reapply "Do not directly load smi constants larger than a 16 bit payload on
ia32" with a bugfix.  The predicate Assembler::IsSafeSmi incorrectly
returned true for non-smis on non-ia32 platforms.

Original summary: Instead of emitting a large smi constant directly as an
immediate, xor the smi with a random 32-bit cookie at compile time, emit
code to move that into a register and then to xor the register with the
cookie.

Original codereview: https://codereview.chromium.org/48743002/

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29533 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 11:38:39 +00:00
ajohnsen@google.com e70ae87df1 Fire event and close the stream when the watched directory is moved.
BUG=https://code.google.com/p/dart/issues/detail?id=14598
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29532 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 11:35:33 +00:00
rmacnak@google.com 0abc881d9e Mirror API removals: async invocations, mirrorSystemOf(port), Mirror.mirrors.
R=ahe@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29492 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 21:14:19 +00:00
turnidge@google.com 229e75a251 Add an option to trace the debug protocol to the dart binary:
--trace_debug_protocol

------------------------
Sample output:

[>>>] Sending message to debug fd 10:
{ "event": "isolate", "params": { "reason": "created", "id": 7114 }}
[>>>] Sending message to debug fd 10:
{ "event": "paused", "params": { "reason": "breakpoint", "isolateId": 7114,"location": { "url":"file:\/\/\/Users\/turnidge\/dart\/DebuggingExample\/bin\/debuggingexample.dart","libraryId":14,"tokenOffset":193}}}
[<<<] Receiving message from debug fd 10:
{"id":1,"command":"getStackTrace","params":{"isolateId":7114}}
[>>>] Sending message to debug fd 10:
{ "id": 1, "result": {"callFrames" : [ {"functionName":"main","location": { "url":"file:\/\/\/Users\/turnidge\/dart\/DebuggingExample\/bin\/debuggingexample.dart","libraryId":14,"tokenOffset":193},"locals":[]}]}}

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29477 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 18:53:15 +00:00
srdjan@google.com a81288c8ca Improve string library performance. String concat and indexOf.
Rename String concatAll to concatRange. Optimize concatRange for OneByteStrings (avoids natives), optimize indexOf for one character onByteStrings.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29472 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 18:18:40 +00:00
zra@google.com 7cf56377dc Disables collection of infrequently used unoptimized code.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29464 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:44:56 +00:00
regis@google.com 65379851a8 Implement stricter rule about self referencing typedefs (fix issue 13675).
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29460 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:04:21 +00:00
whesse@google.com 0729948569 Revert "Do not directly load smi constants larger than a 16 bit payload on ia32."
There is an assertion failure on debug VM tests.

BUG=
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29458 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 16:49:42 +00:00
whesse@google.com 13dad66877 Remove uses of dart:io Options in dart2js and dartdoc.
BUG=
R=ahe@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29456 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 16:36:19 +00:00
ajohnsen@google.com c3a9f33ef8 Fix directory-listing to return a future on cancel.
This also fixes an issue where we would leake FDs/HANDLEs if the listing was interrupted.

Add new pause-resume-cancel test of directory listing.

BUG=https://code.google.com/p/dart/issues/detail?id=10163
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29454 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 15:04:59 +00:00
kmillikin@google.com adf6560e82 Do not directly load smi constants larger than a 16 bit payload on ia32.
Instead of emitting a large smi constant directly as an immediate, xor the
smi with a random 32-bit cookie at compile time, emit code to move that into
a register and then to xor the register with the cookie.

1. In unoptimized code constants are always loaded into a register in
   ConstantInstr::EmitNativeCode.  Change it to load safely.

2. In optimized code constants loaded into a register for use by an
   instruction are loaded by ParallelMoveResolver::EmitMove.  Change it to
   load safely.

3. In optimized code some instructions allow constants as inputs.  These are
   reflected with an input location of Location::RegisterOrConstant (or
   similar) or else Location::Constant.  For the former allocate a register
   if the constant is unsafe, and for the latter check for safety before
   allowing the constant input.

BUG=https://code.google.com/p/dart/issues/detail?id=1742
R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29439 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 12:19:12 +00:00
whesse@google.com 3b54950144 Remove dart:platform library.
This reverts commits r29154, r29244, r29251, r29268, and r29272.
The dart:io Platform class will not be moved to a dart:platform library.

R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29435 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 11:33:34 +00:00
sgjesse@google.com 92a7b26c4e Fix un-initialized variable
TBR=ricow@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29421 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 09:20:31 +00:00
sgjesse@google.com 2f27215203 Remove the reply port form the native isolate handler
The handler function for a native isolate no longer gets an explicit
reply port. Instead the reply port must be sent as part of the message
if required.

The Dart_CObject structure now exposes the send ports in a message to
a native isolate.

R=asiva@google.com, floitsch@google.com, whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29418 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 08:45:32 +00:00
johnmccutchan@google.com 8745ab62b8 Update VM service to new isolate API
R=floitsch@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29415 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 06:12:18 +00:00
iposva@google.com 7b2bcdb1b1 - Add missing header file to the dependencies.
Review URL: https://codereview.chromium.org//50103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29404 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 00:04:59 +00:00
zra@google.com 3701fb48fd Modifies assertion for possibly null code pointer.
A callee function's code pointer may be nulled by a
GC pass during inlining. The code itself is still
around because the inlining function retains a
reference, but a future change will ensure that
the GC pass doesn't null code pointers in inlined
functions.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29400 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 21:58:10 +00:00
hausner@google.com e02652a123 Throw CyclicInitializationError instead of string
For some reason, I had to regenerate the snapshot for test standalone/issue14236_source.dart. The checked-in snapshot crashed with my change. We don't know yet why. Siva is looking at this separately.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29397 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 21:38:57 +00:00
jacobr@google.com 761c1de735 Fix to asiva's code review comments on TBR Cl.
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29390 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:23:19 +00:00
fschneider@google.com be9875fb2b VM: Fix bug in polymorphic inlining of recognized methods.
The inliner has to insert a redefinition of the receiver to
prevent illegal hoisting of instructions that depend on the
receiver class id.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29389 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:20:11 +00:00
turnidge@google.com d24c7e0be7 Don't inline functions if they have an active breakpoint.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29388 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:12:37 +00:00
ajohnsen@google.com 7a1fdfe99a Fix file-system-entity watching on Windows.
This includes disabling a test, as Windows have no way of detecting when the watched directory is deleted.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29379 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:57:22 +00:00
rmacnak@google.com bcb8707fcd Test reflecting on an object that implements Function but has no call method.
BUG=http://dartbug.com/13957
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29374 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:25:47 +00:00
ajohnsen@google.com 2101ba9c12 Add 'isDir' to FileSystemEvent.
BUG=https://code.google.com/p/dart/issues/detail?id=14425
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29371 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:14:43 +00:00
ajohnsen@google.com 93cfb622a7 Only listen to full writes, not incremental file changes, in file system watch.
BUG=https://code.google.com/p/dart/issues/detail?id=14372
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29360 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 13:23:13 +00:00
ajohnsen@google.com 9ffff34ddb Correctly pass errors to the stream, when watching file system entities.
BUG=https://code.google.com/p/dart/issues/detail?id=14470
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29356 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 12:08:49 +00:00
ajohnsen@google.com 483228ef66 If a move has matching target/destination, signal the event as create or delete.
BUG=https://code.google.com/p/dart/issues/detail?id=14424
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29354 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 12:07:46 +00:00
kustermann@google.com 94ebff2225 Bugfix in test.dart, adding of specialized test outcomes for analyzer
This CL will:
 - fix a bug in the legacy AnalyzerCommandOutputImpl class (in certain cases
   we did not report that the analyzer was missing a warning).
 - make the outcome of running the analyzer on a test be one of:
   * CompileTimeError
   * MissingCompileTimeError
   * StaticWarning
   * MissingStaticWarning
 - Make status file updates using the new Expectation markers
 - Remove support for '@static-clean':
     Previously running the analyer on a test could either result in
     'Pass' or in 'Fail'. The '@static-clean' annotation has been used
     as a (poor) mechanism to distinguish between errors and warnings.
     Having the 4 markers mentioned above means we can remove '@static-clean'
 - Remove 100 lines of rotted legacy code in our testing scripts.
 - Make a status file entry for every test that has analyzer errors or warnings

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29350 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 10:39:38 +00:00
iposva@google.com 2ed438e40c Reland https://code.google.com/p/dart/source/detail?r=29315:
- Make sure to keep the main/control port opened until the
  isolate is finished.
- Account for the number of opened control ports to be able
  to determine whether there are live ports.
- Ensure that the spawned isolated is kept alive until the
  initial startup message can be handled.
- Add more isolate tracing output.
- Use the control port for the debugger id.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29323 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-27 14:34:23 +00:00
jacobr@google.com 80f92dc265 Add Dart_LibraryId method unblocking landing 45613003. TBR
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29318 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 22:55:43 +00:00
iposva@google.com eb95d787c3 - Revert parts of r29315 while attempting to reproduce
unexplained buildbot failures locally.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29317 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 21:50:38 +00:00
iposva@google.com b3f3d8bfbd - Make sure to keep the main/control port opened until the
isolate is finished.
- Account for the number of opened control ports to be able
  to determine whether there are live ports.
- Fix imports in snapshotted test.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29315 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 20:50:20 +00:00
regis@google.com e9b01ccf7b Disallow explicit parameter default values in redirecting factory (issue 13662).
Add language test.
Fix usage in core lib.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29298 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 23:02:48 +00:00