Commit Graph

17 Commits

Author SHA1 Message Date
Ryan Macnak e1ffe76a36 [vm] Replace StubEntry with Code handles.
StubEntry was holding raw pointers across safepoints in several places in the compiler.

Bug: https://github.com/dart-lang/sdk/issues/34934
Change-Id: Id17cb7651f4d3508915c8cb90f5cb2353df6dac0
Reviewed-on: https://dart-review.googlesource.com/c/85040
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-11-21 17:45:11 +00: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
John McCutchan e2e7af1229 Remove more feature in product mode
- Remove Timeline.
- Remove more vmservice code.
- Remove AST printing.
- Remove IL printing.
- Remove profiler.
- Remove thread interrupter.
- Remove disassembler.
- Remove Library::CheckFunctionFingerprints.

- Update test status files for product mode.

Size of dart_bootstrap before: 5287631
Size of dart_bootstrap after: 5112783

Reduction in size: 174848 bytes.

Total reduction in size (382734 + 174848): 557582 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1678203002 .
2016-02-09 08:45:32 -08:00
Florian Schneider bac82e2592 VM: New calling convention for generated code.
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.

All non-ia32 platforms:
No entry patching.

ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.

BUG=
R=koda@google.com, rmacnak@google.com

Committed: https://github.com/dart-lang/sdk/commit/1d343e5a7b75168fb6c9f86b64c55173cdbdc9b2

Review URL: https://codereview.chromium.org//1192103004 .
2015-09-19 13:21:09 +02:00
Florian Schneider 7af7a2db87 Revert "VM: New calling convention for generated code."
This reverts commit 1d343e5a7b.

Because of Windows test failures.

BUG=
TBR=whesse@google.com

Review URL: https://codereview.chromium.org//1343373003 .
2015-09-16 13:46:05 +02:00
Florian Schneider 1d343e5a7b VM: New calling convention for generated code.
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.

All non-ia32 platforms:
No entry patching.

ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1192103004 .
2015-09-16 13:05:58 +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 e0621416f8 Remove unused pc descriptor types.
kClosureCall and kOptStaticCall are not needed anymore.
Closure calls are implemented as instance calls - the ClosureCall instruction
 only occurs in the synthetic FunctionImpl.call dispatcher - and does not correspond
to a source location where breakpoints can be set.

kOptStaticCall is not needed because breakpoints can only be set in unoptimized
code. kOther is used instead.

This also removes an unused PC descriptor at closure calls from unoptimized
code.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org//1160063002
2015-05-28 14:27:37 +02:00
Florian Schneider 9191b76fd2 VM: Set breakpoints on x64 and arm64 without patching code.
Instead of changing the generated code, change the target of calls
by changing the corresponding entry in the constant pool. Patchable
call sites can't share constant pool entries for now.
x64 and arm64 already had support for patching call targets in the
constant pool, but the debugger used to change the code instead.

This eliminates the fixed debugger stub entries in every constant pool.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1137313002
2015-05-18 15:03:02 +02:00
fschneider@google.com 7bec3edaef Remove saving/restoring of the context at function entry.
This is not needed anymore after I changed the current context
to always reside in a local variable.

Further simplifications and cleanup in the debugger.

This also fixes a bad memory retention problem with
non-capturing closures.

BUG=dartbug.com/18886
TEST=tests/language/vm/closure_memory_retention_test.dart
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41433 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 07:35:51 +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
srdjan@google.com 2bb77cd8d5 Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression of PcDescriptors).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38032 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:25:45 +00:00
fschneider@google.com 0d82ac5c05 Remove unused pc-descriptor kind kReturn.
This kind is not needed since the only place where it is used
can be just replaced with kRuntimeCall as it behaves the same.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37592 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 10:50:50 +00:00
zra@google.com ea99b1e6f8 Adds debugger patching to arm64.
Also other small fixes.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36003 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 23:20:14 +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