Commit Graph

15405 Commits

Author SHA1 Message Date
vegorov@google.com aad59d6edb Reland r6578 without changing the order of pages in the PageSpace::pages_ list.
Linking newly allocated pages into the list's head causes popular pages to move further to the end of the list.  This causes slowdown on the debug VM because method PageSpace::Contains has to do more probes for popular objects.

R=iposva@google.com
BUG=2660

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6940 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 13:37:51 +00:00
sgjesse@google.com 11b6d128f1 Remove the RequestHandler interface from the HTTP library
Having the RequestHandler interface did no add anything, so it has
been removed. The HTTP server function addRequestHandler and setter
defaultRequestHandler now just takes function.

To use an instance of a class with a request handler member function
the Dart auto closurerization works fine.

R=ajohnsen@google.com, ager@google.com

BUG=none
TEST=tests/standalone/src/io/HttpServerHandlerTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6939 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 13:27:14 +00:00
sgjesse@google.com b2f08560d4 Add handling of the HTTP Date header
R=ajohnsen@google.com

BUG=none
TEST=none

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6930 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 09:16:37 +00:00
kmillikin@google.com 1c7cecee5f Introduce Definition and Use types.
Make Bind and PickTemp into definitions.  Allow values to be uses that
name a definition.  Begin converting all uses of (named) Temp into Use.

R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6928 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 09:13:33 +00:00
asiva@google.com 3107319e40 Simplify representation of stack frames. Remove the special types DartFrame/StubFrame and instead use StackFrame with methods IsDartFrame and IsStubFrame for frames representing Dart or Stub Code. This eliminates all the complexity that was added to ensure that we always see only one stub frame before hitting a dart frame during iteration.
Fixes bug 6380625 which was another case when we had two stub frames before hitting the dart frame.
Review URL: https://chromiumcodereview.appspot.com//10173008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6920 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 01:15:28 +00:00
asiva@google.com 6f4b8bbe78 Move the dart API benchmark to the VM benchmark infrastructure so that it will get run as part of run_vm_tests --benchmarks
Review URL: https://chromiumcodereview.appspot.com//10186008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6918 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 00:35:15 +00:00
regis@google.com efa92f5447 Mark types as instantiated or uninstantiated upon finalization.
Review URL: https://chromiumcodereview.appspot.com//10205006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6894 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 16:15:37 +00:00
vegorov@google.com ccc28fe3a9 Fix target address decoding in ia32 disassembler for CALL_JUMP_INSTR instructions.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6871 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 10:49:25 +00:00
ajohnsen@google.com 46da4845f9 Unregister callbacks from socket, when we return the socket for reuse.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6869 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 06:35:08 +00:00
turnidge@google.com 65e8f477f0 Disable failing test on windows.
Review URL: https://chromiumcodereview.appspot.com//10204004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6865 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 22:41:45 +00:00
turnidge@google.com 353b66038e Rework mirrors implementation.
(Note that the current mirrors implementation is just a heartbeat
implementation of a single method)

Use native code instead of dart code to do the work.

Use JSON instead of Lists/Maps for commands/responses.

Reenable disabled tests.
Review URL: https://chromiumcodereview.appspot.com//10175011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6864 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 22:26:09 +00:00
regis@google.com 0148376aa9 Provide better ToCString description for closures (issue 2680).
Thanks to Ladislav Thon for the suggestion!
Review URL: https://chromiumcodereview.appspot.com//10188004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6861 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 20:15:43 +00:00
turnidge@google.com 460895ce8b Add Dart_New.
Review URL: https://chromiumcodereview.appspot.com//10153002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6851 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 17:36:05 +00:00
ager@google.com f12f701869 Adjust acceptable wake-up delay in Monitor test.
The monitor wake-up delay is occasionally a bit more than 120 ms
on Windows.

Example flake:
http://build.chromium.org/p/client.dart/builders/vm-win32-release/builds/2353/steps/tests/logs/stdio

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6836 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 11:13:05 +00:00
ager@google.com 493a76dd40 Support passing an environment variable map to child processes.
Fix minor type warning in test.

Reapplication after MacOS bug fix.

R=sgjesse@google.com
BUG=dartbug.com/2193
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6827 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 07:54:10 +00:00
asiva@google.com ec9f430cc7 Add infrastructure to create and run benchmarks specific to some VM functionality. This is used to measure performance of specific VM functionality (similar to VM unit tests testing specific VM functionality)
run_vm_tests --benchmarks to run all benchmarks
 or
run_vm_tests CorelibCompileAll
Review URL: https://chromiumcodereview.appspot.com//10069039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6820 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-21 01:36:23 +00:00
ager@google.com c5d347fcbc Revert "Support passing an environment variable map to child processes."
Apparently the code or the test is broken on Mac.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6795 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:53:19 +00:00
ager@google.com ee81b6f0a1 Support passing an environment variable map to child processes.
Fix minor type warning in test.

R=sgjesse@google.com
BUG=dartbug.com/2193
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6794 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:38:57 +00:00
kasperl@google.com 62d7b405c0 Revert "- Free completely empty pages as part of sweep."
This reverts r6578.

TBR'ed (discussed over chat).

R=iposva@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6792 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:14:31 +00:00
srdjan@google.com a78d8f32dc Redo r6764.
Review URL: https://chromiumcodereview.appspot.com//10095037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6778 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 23:32:49 +00:00
regis@google.com ac6cb8cb66 Map malformed function result type and malformed function parameter type to
Dynamic in production mode (fix issue 5532534).
Fix bad negative test and make it positive.
Review URL: https://chromiumcodereview.appspot.com//10143004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6777 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 22:59:58 +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
srdjan@google.com fb4e40b625 Reverting CL 6764.
Review URL: https://chromiumcodereview.appspot.com//10128009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6766 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 20:37:40 +00:00
srdjan@google.com 1a61e098eb Factored out common cases for type tests, used by instance of and assert assigneable. Using inlined type test cache in assert assigneable.
Review URL: https://chromiumcodereview.appspot.com//10025031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6764 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 20:17:44 +00:00
turnidge@google.com 9d72035ce5 Use the ThreadPool for all isolates and native ports. Previously,
each isolate or native port had a dedicated thread.

Refactored the MessageHandler api...

- Added a Run function to allow a MessageHandler to run on a
  ThreadPool.  These functions take a start and end callback to allow for
  isolate initialization and shutdown.

- Made the queue private to the MessageHandler and moved all message
  processing code inside the MessageHandler (got rid of all of the
  different flavors of RunLoop).  This helps remove some code
  duplication and hides the details of how messages are handled.

- Moved all locking and notification out of MessageQueue and moved it
  up to MessageHandler.  Moved OOB support out of MessageQueue and up
  to MessageHandler.  These changes make the MessageQueue much
  simpler.

- Refactored native port and isolate MessageHandlers to share more code.

- Improved --trace_isolates output.

- Added tests for MessageHandler.

Refactored lib/isolate code...

- Use the new MessageHandler::Run api.

- Got rid of the LongJump stuff in RunIsolate.  No longer needed.

- Use the new StartIsolateScope/SwitchIsolateScope to make the code
  less verbose and less error-prone.

- Store top-level isolate errors in the sticky_error.

Added StartIsolateScope/SwitchIsolateScope classes.
Review URL: https://chromiumcodereview.appspot.com//9924015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6762 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 19:47:27 +00:00
regis@google.com f955de9bc0 Throw a type error in production mode when the type of the type test is not
declared (issue 2571).
Add test.
Delete bad negative test now covered by new test.
Update status files of different compilers.
Review URL: https://chromiumcodereview.appspot.com//10035058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6754 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 17:01:28 +00:00
sgjesse@google.com 41cc58affa Fix a number of editor errors and warnings in io tests
R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6731 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 09:17:14 +00:00
asiva@google.com a61ffc6210 Fix a pretty blatant GC bug (was the cause of all the weird crashes on windows).
Review URL: https://chromiumcodereview.appspot.com//10025033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6726 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 05:30:30 +00:00
srdjan@google.com 344aba1e75 Assign ids to incoming arguments (to be used in checked mode).
Review URL: https://chromiumcodereview.appspot.com//10115053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6718 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 00:04:47 +00:00
regis@google.com 75de3a8cc2 Move type check elimination from backend to graph builder in new compiler.
Review URL: https://chromiumcodereview.appspot.com//10021070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6713 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 21:58:46 +00:00
asiva@google.com d807f2a7dd Initialize tags back to 0 before using it.
Review URL: https://chromiumcodereview.appspot.com//10021046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6711 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 21:50:15 +00:00
turnidge@google.com a70b90933a Add a missing arity check for top-level methods in Dart_Invoke.
Add a new EXPECT_ERROR macro to make it easier to verify meaningful
error messages in tests.
Review URL: https://chromiumcodereview.appspot.com//10115034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6705 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 18:11:55 +00:00
hausner@google.com e74cd5fc3a Static members are not visible in subclasses
Fix for issue 1598.

Lexical scope comes before inherited names. Also, Static members
are not inherited and are not visible in subclasses.
Code in the subclass (or any other code for that matter) has to
qualify the names of these members with the class name.

We had a few tests that were wrong and only passed in the VM because
this was not implemented correctly.

Also had to fix code in frog and dartdoc.

I hope I ran enough tests. I built an all.deps tree using tools/build.py from the root directory, which brought up the frog and dartdoc issues.

Tested:
tools/test.py --compiler=dart2js --runtime=drt
tools/test.py -c none -r drt
tools/test.py -c frog -r drt
tools/test.py -r vm

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6698 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 16:09:22 +00:00
srdjan@google.com 953daeaf89 Add more timing information.
Review URL: https://chromiumcodereview.appspot.com//10116012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6697 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 15:53:20 +00:00
iposva@google.com 74201ff9fd Fix issue 2621:
- Properly restore long_jump_base when returning early.
Review URL: https://chromiumcodereview.appspot.com//10083046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6693 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 15:08:59 +00:00
sgjesse@google.com a18d4a2f87 Add HTTP handler registration to the HTTP server
NOTE: This is a breaking change.

The onRequest callback on the HTTP server have been removed in favor
of the ability to register handlers. A handler can be either a
function or an instance of a class which implements a specific
interface. Each handler registration has a regular expression which is
matched against the request path.

There is also a default handler which can be set to handle all
requests which is not matched by any of the registered patterns. If
there is no default handler explicitly set there is a builtin one
which will just return 404 status.

Currently the method is not considered in the matching.

R=ager@google.com, ajohnsen@google.com

BUG=none
TEST=tests/standalone/src/io/HttpServerHandlerTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6683 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 13:03:43 +00:00
ager@google.com 37b82247ac Remove need to instantiate Platform and make methods static.
This will require an update of the stable test binary. I will upload
a new build when done with the review process.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6682 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 11:39:16 +00:00
iposva@google.com cef84bd895 - Update the style of switch statement.
Review URL: https://chromiumcodereview.appspot.com//10083042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6680 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 11:00:33 +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
sgjesse@google.com 9e82bc4246 Add test of the HTTP headers object
Fixed a number of bugs revealed by actually testing.

R=ajohnsen@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6669 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 06:44:58 +00:00
asiva@google.com 17c7958b33 Some minor cleanup.
Review URL: https://chromiumcodereview.appspot.com//10114012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6668 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 00:20:30 +00:00
asiva@google.com 38999bf488 Address review comments.
Review URL: https://chromiumcodereview.appspot.com//10052030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6667 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 23:55:42 +00:00
srdjan@google.com 951c878e49 Fix potential problem with mismatch between ICData inloine cache miss handler in optimizing compiler.
Review URL: https://chromiumcodereview.appspot.com//10114010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6664 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 23:10:05 +00:00
srdjan@google.com 64226e65ac Share intrinsification framework across architectures, started on instrinsification in the new compiler x64.
Review URL: https://chromiumcodereview.appspot.com//10035006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6661 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 22:44:41 +00:00
cshapiro@google.com ff7d78833a Fix an invalid character escape sequence.
Review URL: https://chromiumcodereview.appspot.com//10108025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6659 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 20:53:24 +00:00
regis@google.com 3f6efe251b Relax assert so that the ia32 disassembler does not choke on C-heap allocated
constant strings.
Review URL: https://chromiumcodereview.appspot.com//10114002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6654 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 19:56:29 +00:00
ager@google.com 758943e32a Add read-only environment variable access.
Map<String, String> env = new Platform().environment();

Unfortunately, this is a bit hard to test at this point. I
will move on to implement support for providing an environment
to processes that are started. At that point we can test it
properly.

Another follow-up change will be to remove the instantiation
for Platform. I would like this to be just

Map<String, String> env = Platform.environment();

R=sgjesse@google.com
BUG=dartbug.com/752
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6646 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:20:28 +00:00
hausner@google.com 69d33b8d8d Fix bug 1991, variable resolution in string interpolation
Check to make sure string interpolation expressions cannot
contain type parameter names.
Review URL: https://chromiumcodereview.appspot.com//10108020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6645 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:10:35 +00:00
ahe@google.com 56f34d7514 Move cygwin_dir to shared gypi file.
Review URL: https://chromiumcodereview.appspot.com//9877003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6626 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 11:53:56 +00:00
sgjesse@google.com 20b1747a8a Add missing properties on HttpHeader
R=ajohnsen@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6615 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 07:37:47 +00:00