Commit Graph

26 Commits

Author SHA1 Message Date
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 df4e0d5ac6 ARM/ARM64: Fix smashed CODE_REG in intrinsics with InvokeMathCFunctionInstrs.
X64: Fix smashed ARGS_DESC_REG.

IA32: Remove unnecessary preservation of ICREG.

BUG=http://dartbug.com/26516
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2003403003 .
2016-05-25 10:02:21 -07: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 43d93de2eb ARM64: Move THR to R26 so special registers are contiguous.
R=regis@google.com

Review URL: https://codereview.chromium.org/1575583002 .
2016-01-11 10:11:15 -08: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 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
Regis Crelier b5f4e95433 Simplify constant pool usage in arm64 code generator (by removing extra argument
to all code emitting routines that may access the pool).
Improve code loading immediates on arm64 (do not read from the pool if 1 or 2
immediate instructions will do).

R=zra@google.com

Review URL: https://codereview.chromium.org//1264543002 .
2015-07-29 15:21:20 -07: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
zra@google.com e3f564fb6c Changes for running tests on arm64 hardware.
R=regis@google.com

Review URL: https://codereview.chromium.org//311413002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37046 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 18:43:55 +00:00
zra@google.com 436a06a381 Fixes to run "Hello, world!" on arm64 hardware.
Primarily, in Dart code, instead of using R31 as our
stack pointer, on entry we copy it into a second
register (R18) and use that as our stack pointer after
moving R31 to the Dart stack limit. On calling back
into C++ from Dart code, R31 is restored, and R18 is
cached in the callee-saved register R26.

R=regis@google.com

Review URL: https://codereview.chromium.org//311903004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36930 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 18:38:28 +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
zra@google.com eb11b8a7a0 Adds far-branches to arm64.
Also fixes bugs and enables tests.

R=regis@google.com

Review URL: https://codereview.chromium.org//283513002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36051 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 18:43:08 +00:00
zra@google.com 164e4bc38b Removes loads from PP from stubs on arm64.
Also fixes a bug in loads and stores.

R=regis@google.com

Review URL: https://codereview.chromium.org//251083007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35537 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 19:08:06 +00:00
zra@google.com fde6c7a829 Adds Runtime call stub and Dart entry stub to ARM64.
R=regis@google.com

Review URL: https://codereview.chromium.org//243773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35190 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 23:43:15 +00:00
zra@google.com 2fe51715e5 Begins work on ARM64, first assembler test.
Most new code is in constants_arm64.h and
{assembler,disassembler,simulator}_arm64.{h,cc}

The rest of the CL just #def's out tests, modifies status files,
and adds UNIMPLEMENTED functions, etc.

R=regis@google.com

Review URL: https://codereview.chromium.org//221133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34654 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:39:32 +00:00