Commit Graph

150 Commits

Author SHA1 Message Date
johnmccutchan@google.com a80d328371 Call exit instead of returning from main
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30672 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 18:13:51 +00:00
iposva@google.com 070d3dedf7 - Add a per-isolate pseudo random number generator to the
VM internals. This PRNG is not used to generate random
  numbers in Dart code.
- Use the PRNG to generate JIT cookies for large constants
  if needed during assembly.
- Add the possibility to set an external entropy source
  for the PRNG through the C API.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29950 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 00:59:46 +00:00
srdjan@google.com 2b9fad92c7 In preparation of inlining remainder and modulo binary Smi operations:
- Add REM token
- Fix checking of function fingerprints.
- Remove unused intrinsic for remainder (the function gets inlined and intrinsic is not generated)

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29929 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 19:27:46 +00:00
ajohnsen@google.com b71e57617e Always mark stdout and stderr as blocking on exit.
This is required by some shell systems, such as Emacs.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29895 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 11:57:52 +00:00
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
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
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
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
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
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
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
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
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
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
regis@google.com 61ddf78204 Fix VM exit code in some cases.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27926 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-26 01:10:48 +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
ajohnsen@google.com 3dfe7c97e2 Always initialize the EventHandler in the standalone.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26517 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 12:03:59 +00:00
whesse@google.com 9de122a462 Add Platform.packageRoot and Platform.executableArguments to dart:io.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26432 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 15:21:55 +00:00
johnmccutchan@google.com 33d528a787 Remove race(s) in vmservice tests.
BUG=https://code.google.com/p/dart/issues/detail?id=12294
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25927 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 15:44:21 +00:00
sgjesse@google.com a1158d6c50 Make the values of Platform.executable and Platform.script available to all isolates
BUG=http://dartbug.com/12258

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25913 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 07:19:21 +00:00
johnmccutchan@google.com ea3a5cfb93 VM Service isolate listing
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25279 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 15:39:03 +00:00
ajohnsen@google.com 1e2289e275 One event ahndler for all isolates
BUG=
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25082 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-17 07:26:05 +00:00
johnmccutchan@google.com 42f5a3938a Command line parameter check
VM Service isolate startup and shutdown

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25076 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 22:17:52 +00:00
regis@google.com 5b06af5b76 Return a different exit code from the vm after compilation errors (issue 5525).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25034 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 23:33:24 +00:00
johnmccutchan@google.com 057463d942 Remove VM Stats
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25011 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 16:57:48 +00:00
sgjesse@google.com 887c8e7596 Move getters from Options to Platform
The getters for executable, script and version are now statics on
Platform. I kept them on Options for now, but updated most tests to
use Platform.

R=ajohnsen@google.com, floitsch@google.com, iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24401 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 12:56:23 +00:00
asiva@google.com 45445820da Replace uses of Dart_GetClass with Dart_GetType and Dart_InstanceGetClass with Dart_InstanceGetType (The idea is to deprecate Dart_GetClass and Dart_InstanceGetClass from the API)
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24244 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 18:11:47 +00:00
ajohnsen@google.com 8bd584804b Require exact match of vm arguments.
This will make sure e.g. '--verbose-gc' won't trigger '--verbose'.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23845 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 11:55:43 +00:00
asiva@google.com a12382dc22 Fix for issue 11112 align flags to formats used by other tools.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23831 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-10 21:57:49 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.

* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization

R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +00:00
hausner@google.com 6a206d3af8 Let debug target pick the debugger port
Invoking the dart executable with --debug:0 lets the debuggee pick a free port number. It prints the port number to stdout if --verbose_debug is specified on the command line.

Adapt debugger tests to use this scheme for selecting an available port number.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23086 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 17:41:50 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00
smok@google.com ebbc2020a2 Put everything in runtime/bin into '::dart::bin' namespace.
Review URL: https://codereview.chromium.org//14341015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22032 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:22:30 +00:00
srdjan@google.com 9b53a42536 Add flag --check-function-fingerprints, it checks all function fingerprints of the intrinsifier and method recognizer. Added flag to a test so that the fingerprints will be tested during a regular test.
Review URL: https://codereview.chromium.org//14247005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21711 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 23:18:13 +00:00
tball@google.com da16078500 Added ctrl-\ support in dart binary to dump isolate stacks.
Review URL: https://codereview.chromium.org//14313002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21599 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-17 05:24:07 +00:00
tball@google.com 40337a5ae6 Rolled back due to missing Windows signal definition.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21590 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 23:15:19 +00:00
tball@google.com e47bfb54b2 Added ctrl-\ command that dumps isolate stacks to dart binary.
Review URL: https://codereview.chromium.org//13603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21589 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 23:11:36 +00:00
asiva@google.com b2ee18c4f3 Fix the help message printed by standalone dart
- remove use-script-snapshot (not supported anymore)
- changed --print-source to --print-script

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21559 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 17:19:34 +00:00
hausner@google.com 8b71446903 Remove legacy debugger API stuff. The removed functions do not appear to be used in Dartium.
Review URL: https://codereview.chromium.org//14029016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21305 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 19:26:25 +00:00
iposva@google.com 0d0fcbe7e1 Changelist to land https://codereview.chromium.org/13452007/ for Siva.
Review URL: https://codereview.chromium.org//13813018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21160 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 17:51:24 +00:00
tball@google.com b3cae06ace Synced basic_debugger_test start on new "debugger initialized" message.
Review URL: https://codereview.chromium.org//13597004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20997 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 20:55:10 +00:00
asiva@google.com 5858afd74a Write the magic number 0xf5f5dcdc into a script snapshot file and use this to distinguish whether a script snapshot or a regular script file is being passed on the command line (removed the --use-script-snapshot option).
Review URL: https://codereview.chromium.org//12438033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20339 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 18:47:49 +00:00
asiva@google.com e723d17796 Fix source generation for strings that have \$ in them.
Review URL: https://codereview.chromium.org//12605009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20025 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 14:12:36 +00:00
asiva@google.com 6b8987e55b Add a command line option to generate source code for a script
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00
floitsch@google.com 482b2f34e8 Move Options to dart:io.
Review URL: https://codereview.chromium.org//12794002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19927 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 13:12:00 +00:00
tball@google.com 9cf8937ec8 Don't execute VmStats::Stop() unless port is specified.
Review URL: https://codereview.chromium.org//12310158

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19105 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 01:09:36 +00:00