dart-sdk/runtime
Jens Johansen 308a1af6ab [kernel] Add more random access; don't read procedure bodies up front
This adds more indexes to the kernel format so we know where classes
and procedures starts and stops. This allows for more random access.
E.g. one could now read the program index and jump directly to
library $i_1$, then read the library index and jump directly to class $i_2$,
read the class index and jump directly to procedure $i_3$.

The utilization (in this CL) is to not (always) read the procedure body
up front when loading kernel code on the dart side (ast_from_binary).
The observation is that - when running through the VM - almost none
of the bodies from the platform file are actually used.

This lowers the start-up cost which is noticeable for small programs
(e.g. hello world, or tests).
In this CL this is only done on the dart side and not on the C++ side,
that's for another CL.

Startup time:
dart2js: -1.84253% +/- 1.22157%
hello world: -11.1188% +/- 5.57892%

Running "time python tools/test.py -m release -cdartk language -j6":
real: -11.72% +/- 0.35%
user: -14.59% +/- 0.24%
sys: -12.71% +/- 0.61%

File size change (compiling with fasta to dill file incl. platform):
hello world: 0.88% (35,934 bytes).
dart2js: 0.97% (200,967 bytes).

Change-Id: I1f0ec121bc75bb17f11d3fade03da9815037d0bb
Reviewed-on: https://dart-review.googlesource.com/5262
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-09-26 08:14:17 +00:00
..
bin Fix various warnings found in runtime patches. 2017-09-22 13:12:48 +00:00
include Revert "1. Remove unused dart debugger API entrypoints which are not used anymore" 2017-09-26 02:20:55 +00:00
lib Fix various warnings found in runtime patches. 2017-09-22 13:12:48 +00:00
observatory Revert "[reload] Add facility to check for program elements changed in the last reload but not executed." 2017-09-21 22:56:39 +00:00
platform [VM] Restore disassembler in flutter/profile (dart/release) mode 2017-09-21 16:07:02 +00:00
tests/vm [VM] Fix incorrect range assignment for Uint32 ops. 2017-09-25 10:09:32 +00:00
third_party [infra] Begin removing gyp 2017-08-04 22:19:35 -07:00
tools [infra] Remove dependency on gyp 2017-08-18 08:51:40 -07:00
vm [kernel] Add more random access; don't read procedure bodies up front 2017-09-26 08:14:17 +00:00
.gitignore
BUILD.gn Revert "1. Remove unused dart debugger API entrypoints which are not used anymore" 2017-09-26 02:20:55 +00:00
codereview.settings
CPPLINT.cfg
PRESUBMIT.py
runtime_args.gni GN: Change the default meaning of dart_target_arch from current_cpu to target_cpu. 2017-07-13 14:59:35 -07:00