Commit Graph

629 Commits

Author SHA1 Message Date
justinfagnani@google.com 1dfb9473c1 Allow package: imports inside isolates
BUG=http://dartbug/5915

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13752 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 18:14:38 +00:00
fschneider@google.com 5113b2411a Remove support for generating visualizer format file for the flowgraph.
Review URL: https://codereview.chromium.org//11099061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13536 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 12:25:55 +00:00
iposva@google.com bc26800a4f - Generate a version string based on the VERSION file.
- Add a Dart_VersionString to the API.
- Print version string when passing --version to the standalone binary.
Review URL: https://codereview.chromium.org//11086065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13514 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 07:17:09 +00:00
asiva@google.com 5737ead7e3 Add more options to the help message in verbose mode.
Review URL: https://codereview.chromium.org//11094027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13437 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 20:12:32 +00:00
asiva@google.com 27e1b05914 Add isolate event handler setup in order to be able to propagate isolate
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
fschneider@google.com 71767f5218 Add code for CPU feature detection and use it to detect SSE3 and SSE 4.1.
The Dart VM now requires at least SSE3 to build and run.

There is a new flag --use-sse41 (default:true) to disable the use of 
SSE 4.1 features manually. 
Review URL: https://codereview.chromium.org//10990028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12897 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 09:08:21 +00:00
iposva@google.com d3f5b60cd5 - Add support for --help and --verbose to print usage message of the standalone binary.
Review URL: https://codereview.chromium.org//10979006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12814 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 22:26:37 +00:00
asiva@google.com 6a0ea0d428 Simplify functions in Builtin class and get rid of unused code.
Review URL: https://chromiumcodereview.appspot.com//10911135

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12085 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-08 01:00:28 +00:00
asiva@google.com 8aec37055a Rename Builtin::LoadLibrary to Builtin::LoadAndCheckLibrary as the name
LoadLibrary seems to conflict with some windows predefined macros causing
build failures on windows build of dartium.
Review URL: https://chromiumcodereview.appspot.com//10905102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11894 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 18:49:07 +00:00
asiva@google.com 2917199a81 Added option --script-snapshot in gen_snapshot to generate the snapshot of a scipt into the file.
Added option --use-script-snapshot to dart to be able to read a script from a snapshot.

Using this for dart2js produces the following result:

time dart --use-script-snapshot=dart2-js out/ReleaseIA32/dart-sdk/lib/dart2js/lib/compiler/implementation/dart2js.dart tests/language/string_test.dart -oout.js
real    0m1.733s
user    0m1.690s
sys     0m0.030s

without the snapshot the runtimes are:
time out/ReleaseIA32/dart out/ReleaseIA32/dart-sdk/lib/dart2js/lib/compiler/implementation/dart2js.dart tests/language/string_test.dart -oout.js.orig
real    0m2.406s
user    0m2.350s
sys     0m0.040s
Review URL: https://chromiumcodereview.appspot.com//10871092

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11840 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 20:46:30 +00:00
asiva@google.com 9ed2e66130 Get rid of support for string interpolation in #import strings.
Review URL: https://chromiumcodereview.appspot.com//10911025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11698 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 16:55:03 +00:00
ager@google.com 178100ded4 Move print to corelib.
Allow embedder customization in the VM through a static field that can
be set by the embedder.

Mark failing test that is unrelated to this change. The VM does not
like when you import dart:core explicitly and tells you there both
'dart:core' and 'dart:core' define 'print'.

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

Review URL: https://chromiumcodereview.appspot.com//10887024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11603 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 11:31:30 +00:00
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
ager@google.com f791a12b38 Terminate event handler thread on isolate shutdown.
R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10693039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9251 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 14:40:17 +00:00
turnidge@google.com 3f940819a7 Add a callback to inform embedders when an isolate is being shut down.
Review URL: https://chromiumcodereview.appspot.com//10450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:15:17 +00:00
efortuna@google.com f89032cd13 Add dart:web to VM.
Review URL: https://chromiumcodereview.appspot.com//10574037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8993 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 17:11:02 +00:00
iposva@google.com 0fd25118b9 - Move the Timer interface to the dart:isolate library so that it
is accessible from both client and standalone program.
- Enable a way for the embedder to provide the implementation of
  the Timer interface.
- Update tests.
Review URL: https://chromiumcodereview.appspot.com//10532123

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8987 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 16:17:21 +00:00
asiva@google.com c7f58add4c Fix for issue-2837 (allow --print-flags without a script name).
Review URL: https://chromiumcodereview.appspot.com//10548017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8622 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 17:48:47 +00:00
fschneider@google.com 84027c4457 Add flow graph printing into a .cfg file with flag --print-flow-graph-file.
This CL adds a flag --print-flow-graph-file which produces one
.cfg-file per isolate when enabled. Currently it prints the final
flow graph before code generation.

I also added SuccessorAt and SuccessorCount to allow easy iteration
over the successors of a basic block.
Review URL: https://chromiumcodereview.appspot.com//10446116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8322 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 11:09:02 +00:00
asiva@google.com 6ce890f75a 1. Restructure some of the builtin library processing code.
Review URL: https://chromiumcodereview.appspot.com//10388242

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8175 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 21:09:17 +00:00
turnidge@google.com 05b5d44b0e spawnUri. Take two. This time I'll wait for Anton before committing :-).
See original change 7756 for description.
Review URL: https://chromiumcodereview.appspot.com//10407042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7917 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 18:32:51 +00:00
turnidge@google.com 76d4586dea Revert my last change.
Review URL: https://chromiumcodereview.appspot.com//10332257

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7757 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:35:04 +00:00
turnidge@google.com 6a8c82db83 Implement spawnUri from dart:isolate. This function allows us to
launch an isolate running a different script.  Finally.

Reviewers: This isn't as hard to review as it looks.  Dive right in!

Siggi: Take a look at my test status file changes and make sure I'm
excluding the right stuff.

Much of the churn in the CL comes from moving ownership of the
import_map.  It used to be set per-library and is now set per-isolate.
This caused a lot of superficial diffs.

DART EMBEDDING API CHANGES:

- Dart_IsolateCreateCallback now takes a script_uri and main argument
  instead of a name_prefix argument.  The script_uri argument allows
  the callback to launch different scripts.  The main argument is used
  in creating the isolate debug name.

- Dart_CreateIsolate now takes script_uri and main arguments.  These
  are used to build the isolate's debug name.

- Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no
  longer take an import_map.

- Added Dart_SetImportMap.

- Added Dart_RootLibrary to provide access to the root library for the
  current isolate.

OTHER STUFF

Add a couple of tests for spawnUri -- the existing tests assume that
scripts end in a .js suffix which isn't going to work out for us.

Changed how the debug name for isolates get built a bit.

Refactored bin/main.cc a bit.  Fixed some problems with error handling
while creating isolates.

Minor refactoring in builtin.dart to always pass is_windows rather
than relying on it being squirreled away.
Review URL: https://chromiumcodereview.appspot.com//10386107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7756 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:22:10 +00:00
ager@google.com b6e35655cf Make the crypto library an official dart:crypto library.
The library now works on dart2js and on the VM.

Add the library to the API docs and to the sdk.

R=iposva@google.com,dgrove@google.com,kasperl@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10332109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7604 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 11:20:56 +00:00
asiva@google.com 4f105f9d0b Resubmit change 7506.
Review URL: https://chromiumcodereview.appspot.com//10387061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7511 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:37 +00:00
asiva@google.com 6911f88b25 Revert change 7506 to check on build failure.
Review URL: https://chromiumcodereview.appspot.com//10386073

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7508 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:36:06 +00:00
asiva@google.com 3e5d8216c3 Fix issue 2888.
Allow for the library tag handler to be setup for the isolate, instead of
while loading a script. This ensures that we can use #import on the boot strap libraries like builtin, uri etc.

This change results in a dart API change and corresponding modifications are
necessary in dartium and App Engine.
Review URL: https://chromiumcodereview.appspot.com//10302020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7506 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:25:47 +00:00
ager@google.com 8a677917d5 Address review comments on Options.executable change.
R=iposva@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10388024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7401 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 06:41:00 +00:00
ager@google.com 16ee3e9bb3 Add executable to Options interface to get the name of the executable used to execute the script.
This is useful when you want to spawn separate dart processes. We do this from tests and we keep getting bitten by a broken search for the executable. Let's make it available instead.

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

Review URL: https://chromiumcodereview.appspot.com//10380026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7382 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 14:27:05 +00:00
hausner@google.com 95be46105a Beginnings of a debugger wire protocol
The debugger wire handler is implemented similarly to the io event handler.
A dedicated thread monitors the debugger port for incoming connection
requests. When a debugger is connected, the VM sends events messages
over the wire and handles debugger requests.

To start the VM with a debugger connection, use the option
--debug:<portnumber>. The VM pauses at the beginning of main()
and waits for a debugger to connect.

Subsequent changes will implement debugger commands one by one.
With this change, the VM only understands "resume" commands. 
Review URL: https://chromiumcodereview.appspot.com//10357003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7330 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 15:25:49 +00:00
mattsh@google.com cb829918ed added package_root flag to vm
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10134015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7092 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 17:23:00 +00:00
turnidge@google.com 9e2c641658 Remove the deprecated method invocation and field access apis from the
dart embbedding api.  Use the new apis instead.

Fixed a bug where field/function lookup was failing for imported libs.
Added tests.  Had to add a couple of lookup functions to Library.

Fixed a bug in Dart_Invoke -- it wasn't handling a null receiver
correctly.
Review URL: https://chromiumcodereview.appspot.com//10021072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6769 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 21:04:15 +00:00
whesse@google.com 7b9880570d Refactor URI processing of native extensions directive #import("dart-ext:foo").
BUG=
TEST=standalone/io/TestExtensionsTest

Review URL: https://chromiumcodereview.appspot.com//10103031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6674 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 09:58:01 +00:00
ager@google.com 37147fc116 Remove unused thread pool from standalone VM binary.
We are using the thread pool in the VM via native ports.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9875006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5954 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 21:57:58 +00:00
iposva@google.com de4e574ac3 - Make the URI resolution methods used by the tag handler private.
Review URL: https://chromiumcodereview.appspot.com//9845040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5921 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 01:21:04 +00:00
whesse@google.com 3b7099b7e2 Change lookup path for Dart native extensions shared libraries.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9694045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5524 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-15 15:49:57 +00:00
iposva@google.com 92cddd5ba8 - The dart:io library uses Uri from dart:uri.
- Fix the library tag handler to proper import libraries
  when generating snapshots.
Review URL: https://chromiumcodereview.appspot.com//9655015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5238 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-09 16:45:57 +00:00
turnidge@google.com 48de07fb60 Start using Dart_PropagateError in the runtime/bin directory.
Review URL: https://chromiumcodereview.appspot.com//9657001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5197 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 23:06:44 +00:00
iposva@google.com 8e5891cb96 - Fix the dart_no_snapshot binary.
Review URL: https://chromiumcodereview.appspot.com//9639018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5195 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 22:25:29 +00:00
turnidge@google.com c143d26700 Start using Dart_SetField and Dart_GetField in the vm.
Review URL: https://chromiumcodereview.appspot.com//9642003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5185 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 18:36:56 +00:00
dgrove@google.com 98302c85df Unify most of our utf8 implementations. This takes the implementation
from utils/string_encoding and moves it to utils/utf . utils/utf8
goes away.
Review URL: https://chromiumcodereview.appspot.com//9462001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5169 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 13:28:40 +00:00
iposva@google.com e3a8f10c52 - D:\rive\letters
Review URL: https://chromiumcodereview.appspot.com//9608028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5140 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 00:02:17 +00:00
iposva@google.com a37d9578d2 - Fix build: unused vars.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5138 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 23:18:16 +00:00
iposva@google.com 67b02b441d - Proper URI resolution when loading scripts from the standalone binary.
Review URL: https://chromiumcodereview.appspot.com//9614006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5135 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 22:57:57 +00:00
whesse@google.com 0e40002890 Add native extensions to the Dart shell, on the linux platform.
BUG=
TEST=standalone/TestExtensionTest

Review URL: https://chromiumcodereview.appspot.com//9430051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4529 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 13:25:11 +00:00
iposva@google.com 9dc3d0f49d - Add dart:json, dart:uri and dart:utf8 to the known and builtin libraries.
- Unify and simplify the building of the creation of the source file.
Review URL: https://chromiumcodereview.appspot.com//9417012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4336 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-16 19:59:19 +00:00
asiva@google.com d50bbba277 Implement support for specifying string interopolation style variable substitution in the import and source statements.
e.g:
sivamach[runtime]>more /workspace/asiva/expr/test1.dart
#library('test1.dart');
#import('${GOOGLE}$SRC/test2.dart');
#import('$DART/test3.dart');
test1() {
  print("test1");
}
main() {
  test1();
  test2();
  test3();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test2.dart
#library('test2.dart');
#source('$GOOGLE$SRC/test2a.dart');
test2() {
  print("test2");
  test2a();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test2a.dart
test2a() {
  print("test2a");
}
sivamach[runtime]>more /workspace/asiva/expr/src/test3.dart
#library('test3.dart');
#source('test3a.dart');
test3() {
  print("test3");
  test3a();
}
sivamach[runtime]>more /workspace/asiva/expr/src/test3a.dart
test3a() {
  print("test3a");
}

sivamach[runtime]>out/Debug_ia32/dart --import_map=GOOGLE,/workspace/asiva/expr --import_map=SRC,src --import_map=DART,/workspace/asiva/expr/src /workspace/asiva/expr/test1.dart
test1
test2
test2a
test3
test3a
Review URL: https://chromiumcodereview.appspot.com//9359009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4199 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-13 22:50:19 +00:00
ager@google.com ed3338dbae Wait for exit-code thread to terminate before terminating main.
The code is identical on Linux and Mac. Currently unimplemented on
Windows because I had to revert my change to the exit code handling
on Windows. I will revive that change tomorrow and implement this
as part of that change.

R=iposva@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9315037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3801 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 18:16:45 +00:00
ager@google.com 7031be2291 Revert "Changes to the process implementation."
There is a race-condition on Windows and exit handling when a process
has been closed is incorrect.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9307033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3790 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 14:19:25 +00:00
ager@google.com 6b5815328c Changes to the process implementation.
- Make the list of active processes thread safe on Windows.
- Use only one thread on Windows to detect process termination.
- Stop the process termination thread when the standalone VM terminates.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9307003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3780 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 09:09:23 +00:00