Commit Graph

3601 Commits

Author SHA1 Message Date
iposva@google.com 3dced243b3 Fix http://dartbug.com/14763
- Find main in the exported names of the root library.
- Unify how the main function is called from spawnUri
  and the initial isolate.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29865 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 00:55:41 +00:00
hausner@google.com 1b87d7e2bd Compile time error on forward references to functions
Like variables, names of functions must not be referenced
before they are declared.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29835 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 18:53:58 +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 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
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
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
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
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
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
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
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
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
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
floitsch@google.com 6a72655d1b Very simple version of Isolates.
R=ajohnsen@google.com, iposva@google.com, kasperl@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29271 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:23:00 +00:00
whesse@google.com 251e56f299 dart:platform | Remove isWindows, isLinux, isAndroid, isMacOS from dart:platform.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29268 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 18:25:56 +00:00
whesse@google.com 265c25a4a2 Add fields to platform library, implement them on runtime dart.
BUG=
R=ahe@google.com, ajohnsen@google.com, floitsch@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29244 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 11:48:28 +00:00
asiva@google.com a294e0a82f Fix for issue 14236:
Retain script path of parent isolate when spawnFunction is called so that
it works when using script snapshots.

The test case issue14236_test.dart is a script snapshot whose original source
file path is issue14236_source.dart

R=iposva@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29178 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 16:41:22 +00:00
ajohnsen@google.com e02b5a3fa4 Make FileSystemEntity.watch return a broadcast stream.
BUG=https://code.google.com/p/dart/issues/detail?id=14378
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29170 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:30:20 +00:00
ajohnsen@google.com 103eac574c Remove FileException, DirectoryException and LinkException from dart:io and use FileSystemException instaed.
BUG=https://code.google.com/p/dart/issues/detail?id=12461
R=nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29168 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:17:20 +00:00
ajohnsen@google.com 4894d4548c Fix issue where we would double unwatch the path.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29164 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 10:26:00 +00:00
ajohnsen@google.com 33daee971b Use while(condition) around monitor wait, in file_system_watcher_macos.
This fixes a potential threading-issue, where the wacther could be used before it was fully initialized, if 'wait' woke up before notify.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29163 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 10:24:08 +00:00
ajohnsen@google.com b4be8b8080 Stop watching when removing watched path, for Mac OS X as well.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29161 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 08:42:07 +00:00
ajohnsen@google.com fdea26c768 Close file watcher when target is deleted.
BUG=http://code.google.com/p/dart/issues/detail?id=14374
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29159 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 08:12:16 +00:00
whesse@google.com c9e4b7f7cd dart:io | Fix File.rename on Windows to overwrite an existing target.
BUG=dartbug.com/14164
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28933 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 14:57:35 +00:00
fschneider@google.com 8779bc8d7f Optimize identical-comparisons based on propagated type information.
If the propagated type allows, eliminate the check for numbers at
identical operations in optimized code.

The previous optimizaton was done before full type propagation was run
and was therefore not very effective.

* Made flow-graph printing having no side-effects: calling Type() lazily
initializes the type_ and reaching_type_ fields of Value and Definition.
Access fields directly when printing instead.

Also, fixed two random spelling mistakes.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28851 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 11:13:59 +00:00
iposva@google.com 736d03406e - Add the ability to pass the command line options as an argument to main.
R=asiva@google.com, floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28829 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 21:59:46 +00:00
asiva@google.com 1a2f236fab Fix issue 13942 - Dart_Error function invokes OS::VSNPrint with the "format" string containing data derived from the string
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28809 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 17:49:45 +00:00
johnmccutchan@google.com cb7711eaa3 Reorganize VM Service client.
This CL is largely a move/rename of the sources so they are laid out in the standard directory layout (the other layout is no longer necessary with the single html and js file deployed output). Buried inside the rename is the out/ directory which contains the observatory deployed as a single js file + html/img assets.

bootstrap_css DEPS have been updated already.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28740 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 17:49:33 +00:00
hausner@google.com 6a0fb0d924 Handle recursive list structures in debugger
Issue 14108

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28677 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 19:58:10 +00:00
floitsch@google.com 10e9a799d1 Make print interceptable.
BUG= http://dartbug.com/3486
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28650 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 16:02:07 +00:00
pquitslund@google.com e9e3dd9606 Formatter library entry-point for the masses (w/ gypi update).
(Note the manual change in resource_sources.gypi.  I verified that this works locally.)

R=jmesserly@google.com, johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28613 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 21:46:06 +00:00
floitsch@google.com 0f7a0bd7b1 Rename runAsync to scheduleMicrotask.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28569 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 15:52:17 +00:00
floitsch@google.com 4be547c705 Adapt streams for additional stackTrace argument.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28511 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 12:02:20 +00:00
johnmccutchan@google.com 2786add1ea Initial GUI for VM service
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28462 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 16:36:03 +00:00
johnmccutchan@google.com 7fec0190f5 Revert 28422
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28426 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 22:24:21 +00:00
johnmccutchan@google.com 209d858d4d Initial GUI for VM service
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28422 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 21:57:33 +00:00
srdjan@google.com 3a8252f90d Cleanups: int -> intptr_t for "array" lengths, memory sizes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28324 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 20:19:37 +00:00
asiva@google.com 1cd2ad79ec Fix for 12312 (Dartium crash when reloading after running tests).
Add framework for Dart_Cleanup which will cleanup stuff on exit.
Ideally the VM isolate should be shutdown in Dart_Terminate but we don't
seem to have a clean thread pool shutdown as a result of which there are
racing isolates.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28248 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 22:17:48 +00:00
rmacnak@google.com ecc021337d Better error message when attempting to import dart:html on the stand-alone VM.
BUG=http://dartbug.com/3594
R=asiva@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28230 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 17:36:41 +00:00
whesse@google.com 3c0c99a3b9 Add Directory.systemTemp getter to replace createSystemTemp().
BUG=dartbug.com/12496
R=rnystrom@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28215 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 12:55:30 +00:00
ajohnsen@google.com b568dd8e4a Call correct FATAL macro in EventHandler.
BUG=

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

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