Vyacheslav Egorov
8a179fb953
[VM, Compiler] Move compiler to a separate folder.
...
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 >
2017-09-04 15:15:18 +00:00
Aske Simon Christensen
8cb752f73b
Revised "Eliminate dependencies on assemblers and code stubs in precompiled runtime."
...
Explicitly clear unbox_numeric_fields flag in PRODUCT builds. Fixes code bloat introduced by previous CL. New changes in Patch Set 2.
BUG= https://github.com/dart-lang/sdk/issues/30045
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/3006923002 .
2017-09-04 13:13:26 +02:00
Ryan Macnak
9ce7fb5929
Revert "Reapply "Eliminate dependencies on assemblers and code stubs in precompiled runtime.""
...
This reverts commit 8ee4436355 .
This change caused a 63% increase in AOT snapshot size of Flutter Gallery.
Issue #30472
Review-Url: https://codereview.chromium.org/2997993002 .
2017-08-17 13:33:37 -07:00
Aske Simon Christensen
8ee4436355
Reapply "Eliminate dependencies on assemblers and code stubs in precompiled runtime."
...
Also exclude references to disassembler in precompiled mode.
New edits are in patch set #2 .
BUG= https://github.com/dart-lang/sdk/issues/30045
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2994863002 .
2017-08-12 02:15:23 +02:00
Ryan Macnak
3afd223f90
[gardening] Revert "Eliminate dependencies on assemblers and code stubs in precompiled runtime."
...
This reverts commit 46c53882cc .
This changes introduced link errors on Windows.
Review-Url: https://codereview.chromium.org/3001463002 .
2017-08-09 15:49:51 -07:00
Aske Simon Christensen
46c53882cc
Eliminate dependencies on assemblers and code stubs in precompiled runtime.
...
Guard all excluded code behind conditional compilation.
Removed precompiled runtime flag. Only preprocessor flag remains.
BUG= https://github.com/dart-lang/sdk/issues/30045
R=rmacnak@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2976723003 .
2017-08-09 22:21:34 +02:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Ryan Macnak
e386db978e
Invoke CallToRuntime via Thread instead of ObjectPools.
...
Most functions use CallToRuntime for the stack overflow check.
precompiled dart2js arm 20388895 -> 20308640 (-0.39%)
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1778103003 .
2016-03-11 10:03:12 -08:00
Ryan Macnak
dd7250323d
Re-assign registers on ARM so PP and CODE_REG are below R7 (FP on iOS).
...
Also update descriptions of register availability in instrinsics.
1) Mechanical replacement in *arm.* files except the simulator and constants_arm.h (with sed).
R5 -> R9
R6 -> R8
R8 -> R10
R9 -> R5
R10 -> R6
2) Change register aliases.
CTX = R10 -> CTX = R6
PP = R9 -> PP = R5
ICREG = R5 -> ICREG = R9
CODE_REG = R10 -> CODE_REG = R6
THR = R8 -> THR = R10
3) Fixup users of ldrd/strd to have valid register pairs.
bigint_lsh
bigint_absadd
bigint_abssub
bigint_sqradd
TYPED_ARRAY_ALLOCATION
InlineArrayAllocation
AllocateArrayStub
AllocateContextStub
4) Fix PushList in MegamorphicMissStub to keep runtime call arguments in the right order.
BUG=http://dartbug.com/24683
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1419223003 .
2015-10-26 11:05:32 -07:00
Ryan Macnak
9d8dcd1288
Load runtime entries from the Thread instead of the ObjectPool.
...
Removes the need to relocate their ObjectPool entries when loading a precompiled snapshot.
Saves about ~2kB of ObjectPool in hello_world at the cost of ~400B/Thread (64-bit).
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1315893004 .
2015-09-02 14:58:26 -07:00
Florian Schneider
7e082c1082
VM: Use constant pool also for leaf runtime calls on x64, arm, arm64 and mips.
...
Remove unused branch/call macro instructions from the assembler.
Setup a frame and pool pointer when invoking leaf runtime functions (in the
deoptimzation stub and store-buffer update stub).
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1314883002 .
2015-08-28 10:46:02 +02:00
Florian Schneider
63a8e5227d
VM: More abstract interface for generating stub calls.
...
This makes the code in the code generator independent from how stubs
are actually called (i.e. directly embedding the target address, or
indirectly by loading the target address from the code object).
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1270803003 .
2015-08-05 10:18:35 +02:00
Florian Schneider
8d38a58c18
Make array allocation stub shared between isolates.
...
This allows to make the last explicitly named stubs shared between isolates.
When sharing code stubs, we can't do patching at their entry anymore.
Therefore, I had to remove patching support of the array allocation stub.
Is this a functionality we want to keep?
The change is mostly performance-neutral because optimized code has an inlined fast
path for array allocation and only uses the stub for the slow-case.
The only isolate-specific stubs left are object allocation stubs which are
associated with their Class are per-isolate.
Since this CL removes any isolate-specific stubs from StubCode, it becomes AllStatic.
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1247783002 .
2015-07-23 12:56:16 +02:00
Florian Schneider
957af25419
Use object pool for runtime calls.
...
Also, set up a stub frame with object pool loaded in all stubs on those
platforms. This is a preparation step to making code relocatable.
ia32 is not affected because there is no object pool.
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1189573004 .
2015-06-17 10:37:52 +02:00
fschneider@google.com
1dc4e979d9
Remove isolate pointer from context objects.
...
By moving all stubs that do runtime calls into the isolate
we don't need to cache the current isolate in each context
object.
This saves space on each context at the cost of duplicating stubs
in each isolate. Most stubs are already isolate-specific and the total number
of stubs is small enough for this to be a good trade-off.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//668193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41279 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 12:19:20 +00:00
rmacnak@google.com
fbe77f8ab4
Specialize breakpoint stubs by set of live registers of the stubs they are intercepting.
...
Trades space in the constant pool for space at call sites.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//339183010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38205 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:38:11 +00:00
rmacnak@google.com
5afea71262
Setup R10/EDX to be valid Oops before stub calls so when the debug stub saves them to the stack the GC doesn't try to deference out of the heap.
...
BUG=http://dartbug.com/19331
R=asiva@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//335443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37297 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-12 23:50:48 +00:00
iposva@google.com
d36cd610cb
- Use isolate where it is appropriate.
...
- Do not emit an name for ExternalLabel.
R=johnmccutchan@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//306483005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36662 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 10:15:50 +00:00
regis@google.com
8171570100
Fix the previously ineffective assert checking the number of arguments passed to
...
a runtime entry in the VM.
R=asiva@google.com
Review URL: https://codereview.chromium.org//23672011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26826 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 23:07:14 +00:00
regis@google.com
8f62a87598
Switch code generation on ARM from softfp ABI to hardfp ABI.
...
Support leaf float runtime calls in ARM simulator.
Enable previously failing tests.
R=zra@google.com
Review URL: https://codereview.chromium.org//16638012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23868 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 16:47:01 +00:00
regis@google.com
7766ac76d4
Implement leaf runtime call stub on ARM and corresponding call redirection
...
in ARM simulator.
Implement jump patching on ARM.
Add missing ICache flush calls.
Review URL: https://codereview.chromium.org//12439005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19724 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 21:16:46 +00:00
regis@google.com
b95087eb73
Implement native call stub on ARM and native call redirection in ARM simulator.
...
Pass PatchStaticCall test.
Review URL: https://codereview.chromium.org//12629004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19704 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 18:22:14 +00:00
regis@google.com
a879bba2ff
Second codegen test passing on ARM (simulated).
...
This required support on ARM for:
- compilation of static calls
- patching of static calls
- stub to call into runtime
- redirection support for calls from simulator to host runtime
- stack frame iteration
Review URL: https://codereview.chromium.org//12381034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19405 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 18:08:38 +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
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00