Commit Graph

5 Commits

Author SHA1 Message Date
asiva c6f55f7478 [VM] Use the incremental compiler to compile sources only when the observatory
server is started.

When the incremental compiler is used it accumulates state that
increases the footprint of the process. This state is needed only
when the 'reload' or 'expression evaluation' functionality is used
in the debugger.

Currently in the VM we do not have a good way of detecting when the
debugger will be used as the vm service observatory functionality
can be turned on dynamically after the program has started.

This CL turns on the incremental compiler only when command line options
are used to start the observatory server. We could run into issues with
'expression evaluation' when the observatory is started dynamically after
the program is loaded.

Change-Id: I18c17698622071bca428018f7fdac1a84b0f195e
Reviewed-on: https://dart-review.googlesource.com/64667
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-07-13 23:28:51 +00:00
Alexander Aprelev f2883d1b4f Fix test error message expectation on Windows.
This fixes buildbot failure:
```
Running "vm" command: set DART_CONFIGURATION=ReleaseX64 & pkg\vm\tool\dart2.bat --sync-async --ignore-unrecognized-flags --packages=C:\b\s\w\ir\.packages C:\b\s\w\ir\out\ReleaseX64\generated_tests\lib_2\mirrors\initializing_formals_test_none.dart
FAILED: dartk-vm release_x64 lib_2/mirrors/dynamic_load_test
Expected: Pass
Actual: RuntimeError
--- Command "vm" (took 03.000953s):
set DART_CONFIGURATION=ReleaseX64 & pkg\vm\tool\dart2.bat --sync-async --ignore-unrecognized-flags --packages=C:\b\s\w\ir\.packages C:\b\s\w\ir\tests\lib_2\mirrors\dynamic_load_test.dart
exit code:
255
stdout:
IsolateMirror on 'dynamic_load_test.dart:main()'
LibraryMirror on 'dynamic_load_success'
InstanceMirror on 1
InstanceMirror on 2
LibraryMirror on 'dynamic_load_success'
InstanceMirror on 3
InstanceMirror on 4
tests/lib_2/mirrors/DOES_NOT_EXIST: Error: The system cannot find the file specified.
stderr:
Unhandled exception:
Expect.isTrue(false) fails.
#0      Expect._fail (package:expect/expect.dart:605:5)
#1      Expect.isTrue (package:expect/expect.dart:133:5)
#2      main (file:///C:/b/s/w/ir/tests/lib_2/mirrors/dynamic_load_test.dart:45:10)
<asynchronous suspension>
#3      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:279:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
--- Re-run this test:
python tools/test.py -m release -c dartk --strong --output-directory C:\b\s\w\iodxgot1 lib_2/mirrors/dynamic_load_test
Done dartk-vm release_x64 lib_2/mirrors/dynamic_load_test: fail
```

Change-Id: Ib042899894ab903bc6c21fc3600a5b5b83916f4d
Reviewed-on: https://dart-review.googlesource.com/58521
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 17:33:29 +00:00
Ryan Macnak c30af41b96 Reapply "[mirrors] Add IsolateMirror.loadUri."
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
 - Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).

Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-29 22:01:01 +00:00
Ryan Macnak de545b4079 Revert "[mirrors] Add IsolateMirror.loadUri."
This reverts commit ad4cfa0260.

Reason for revert: Assertion failures on DBC

Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
> 
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
> 
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com,kmillikin@google.com

Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-24 20:03:40 +00:00
Ryan Macnak ad4cfa0260 [mirrors] Add IsolateMirror.loadUri.
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.

Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-24 17:07:15 +00:00