New folder structure (nested under vm/):
- compiler/
- jit/ - JIT specific code
- aot/ - AOT specific code
- backend/ - all middle-end and back-end code (IL, flow graph)
- assembler/ - assemblers and disassemblers
- frontend/ - front ends (AST -> IL, Kernel -> IL)
compiler/README.md would be the documentation root for the compiler
pipeline
Bug: https://github.com/dart-lang/sdk/issues/30575
Change-Id: I2dfd9688793bff737f7632ddc77fca766875ce36
Reviewed-on: https://dart-review.googlesource.com/2940
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
I collected statistics for the sizes and capacities of growable arrays which are promoted to old-space or survive an old-space gc when running dart2js and Fasta. For these applications, the vast majority of arrays stay empty. More than half of the total object size of promoted backing arrays is backing for empty growable arrays.
Furthermore, since the overhead for an array is 3 words (header, type parameters and length), and object sizes are rounded up to an even number of words, we waste one word for all even-sized arrays.
This CL changes the growth strategy so that empty growable arrays are created with a shared, zero-sized array as backing, avoiding the allocation of a backing array if no elements are added. When the array needs to grow, it starts out at 3 and grows to double size plus one each time: 7, 15, 31, ...
A few places in the VM code need to handle these shared, zero-sized arrays specially. In particular, the Array::MakeArray function needs to allocate a new, empty array if its result is to be returned to Dart code.
Benchmarks suggest that the change improves memory usage by a few percent overall and does not significantly affect run time.
BUG=
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2949803002 .
- Ensure the uniqueness of private keys without having to
search the existing key space.
- Pass a thread parameter where useful to library methods.
BUG=
Review URL: https://codereview.chromium.org/1947393003 .
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).
There are some cleanups I plan on doing as a follow up CL:
- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()
R=iposva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1644793002 .
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
- Rework token position address space.
- Use ClassifyingTokenPositions::kMethodExtractor for the token position of a method extractor.
- Plumb token positions through all of Ast Transformer.
- Plumb token positions for temporary expressions, etc in Flow Graph Builder.
- Add token positions for parts of the await machinery.
- Move ClassifyingTokenPositions into token.h.
- Remove default token position of Scanner::kNoSourcePos for many IR instructions.
- A couple of unit tests.
- Use synthetic token positions for synthetic AstNodes.
- Fix SLEB128 encoding / decoding + test
- s/Scanner::kNoSourcePos/Token::kNoSourcePos.
- Remove >= 0 and < 0 checks against token positions and use helpers instead.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1589643002 .
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the unit test.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1310463005 .
If null is not initialized before the VM Isolate's ObjectStore, the
ObjectStore's fields are initialized to kHeapObjectTag, which causes
a crash in VM Isolate shutdown.
There is also a crash when the VM Isolate is signaled with the
shutdown event, so this CL removes adding a Debugger to the
VM Isolate, so that there is no need to shut it down, and send
the signal.
NB: This change does *not* actually enable shutdown. It just fixes
crashes that would happen if it were enabled.
BUG=
R=iposva@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1168933002.
Fix copying breakpoints over to a new location when a latent location is resolved.
Fix bad assumption that BreakpointLocationAtLine always returns non-null result.
Review URL: https://codereview.chromium.org//1149983003
Improve the isolate view and isolate summary.
Details:
- Rig DbgMsgQueueList so it can run even when the debugger hasn't started.
- Add <action-link> element for pause/resume actions.
- Introduce new flex-percentile css classes.
- Add <isolate-run-state>, <isolate-location>, <isolate-shared-summary>, and <isolate-counter-chart> elements. Counters are now displayed as a pie chart instead of as text.
- Reorg <isolate-view> and <isolate-summary> substantially.
- Add shared style sheet to <script-view>.
- Combine pause-on-start/pause-on-exit with other debugger pause events and present a consistent representation for these in the vm service. Reorg how pause events are shown in <isolate-run-state>.
- Give the user a nicer message when an isolate is still loading.
- Move the /resume command to /debug/resume. Implement this with a bool in the Isolate class which is used to smuggle resume requests from the vm service to the dart embedding api.
- Add the /debug/pause command to the vm service
- Break the DebuggerEvent struct out into its own top-level class. Add JSON printing.
etc.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//271153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36366 260f80e4-7a28-3924-810f-c04153c831b5
Remodel the top-level isolate summary page.
Add variables to stack frames in the stack trace.
Stop putting small integers and bools in the object id ring.
Rework how we pass down null references (and null-like references like
uninitialized values).
Collect all isolate timers by default.
Change the lifetime of IsolateSpawnState so that we can refer to it
later to know how an isolate started up. Stop pretending that
IsolateSpawnState is a void*. Clean up vestigial IsolateStartData.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//145323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32128 260f80e4-7a28-3924-810f-c04153c831b5