Commit Graph

34 Commits

Author SHA1 Message Date
Ryan Macnak 04e8382cec VM: Share object pool entries for optimized static calls.
Independently patchable entries are not required for debugging because breakpoints are only added to unoptimized code, nor for deopt because deopt patches the instruction stream and not the object pool.

Future work: Reduce the static call table from (pc offset, function, code) triples to (pc offset, function or allocation stub) pairs.

precompiled dart2js arm 20747140 -> 20674954 (-0.34%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1713853003 .
2016-02-24 13:57:19 -08:00
Ivan Posva 9c0c6cb5c2 Add product mode:
- Add PRODUCT define and build mode to gyp configurations.
- Add product mode to test harness.
- Start to unify list of flags.
- Allow flags to be constant for particular build configurations.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1663863002 .
2016-02-03 21:10:30 -08:00
John McCutchan 768e4ddee7 Add --check-code-pointer flag for debug builds
- Introduce --check-code-pointer which is false by default.
- Sort DECLARE / DEFINE flag macros in assembler*.cc

Fixes #25361

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1574993003 .
2016-01-11 13:20:13 -08:00
Ryan Macnak f1a0056430 Load the native call wrapper via Thread.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//1358773002 .
2015-09-20 13:48:17 -07: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
Ryan Macnak 8ebb9f9b39 Track which entries in the ObjectPool are native entries, and reset them when loading a precompiled snapshot.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//1316673005 .
2015-09-10 15:41:37 -07:00
Ryan Macnak 294c6a47a4 Add ObjectPool tag for external labels. Use LoadExternalLabel for native calls and the predefined symbols table.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//1295693002 .
2015-08-14 10:10:34 -07:00
Florian Schneider f8670e8f84 VM: Hoist handle allocation out of loop when creating the object pool.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1253373002 .
2015-07-28 10:23:33 +02:00
Florian Schneider 81deeaeedc VM: Share some stub code between isolates.
This CL also lifts the restriction that the object pool can't be used
in VM isolate code on x64 and arm64.

Stubs that perform allocation can't be shared yet, because the inline allocation
code is not yet isolate-independent. This will be added in a separate CL.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1229283002 .
2015-07-13 10:00:51 +02:00
Daniel Andersson c089a152ac Migrate most uses of Isolate::current_zone to Thread::zone.
After https://codereview.chromium.org/1204303003/ is submitted, the last remaining uses can go.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1220193009 .
2015-07-08 09:59:32 -07:00
Florian Schneider 265a54411a Object pool with support for untagged entries.
This adds meta-information to object pool entries to allow storing
untagged immediates or code addresses (ExternalLabel) directly.

This eliminates the need to generate extra code to preserve the LSB
when storing immediates as smis (x64, arm64).

BUG=

Review URL: https://codereview.chromium.org//1175523002.
2015-06-10 11:41:22 +02:00
fschneider@google.com 56853c6bc9 Undo unnecessary changes to ARM assembler.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43596 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 16:14:11 +00:00
fschneider@google.com df94b27666 VM: Align implementations of assembler constant pools.
Add Support for adding patchable/non-patchable entries on ARM/MIPS like
already done for x64/ARM64.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43589 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 11:47:36 +00:00
vegorov@google.com 36cddbd749 Use shorter TryAllocate instruction sequence on ARM/ARM64/MIPS.
On these architectures it's preferable to load Scavenger address into the register and then access top/end fields through this register instead of loading addresses of those fields as immediates --- which takes either two instructions or a memory load through a pool pointer.

Cleanup boxing slow-paths in the optimizing compiler. We had tons of duplicated code that was essentially doing the same thing.

BUG=
R=johnmccutchan@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38539 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 12:04:21 +00:00
iposva@google.com 7eea2ecca1 - When requested, always generate code comments. Disassembly
can be delayed, such as when using the VM service.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35769 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 21:40:15 +00:00
iposva@google.com 0d236b7402 - Rationalize the way we use comments.
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35349 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 01:57:47 +00:00
koda@google.com fec858433b Allocate assembler comments in old space.
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35347 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 00:49:46 +00:00
srdjan@google.com b269366d8d Change --code-comments default to true. Code comments activated only if disassembly is activated.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33395 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 21:17:07 +00:00
fschneider@google.com d6178535b2 Landing: Write protect executable pages in the VM.
Change executable pages to be read/execute but not writable by default.

All pages are made temporarily writable just before a full GC, because both
the mark and sweep phases write to the pages. When allocating in a page and
when patching code, the pages are made temporarily writable.

The order of allocation of Code and Instructions objects is changed so that
a GC will not occur after Instructions is allocated. (A full GC would
render the Instructions unwritable.) A scoped object is used to make memory
protection simpler.

Original CL: https://codereview.chromium.org/106593002/

I added a cc test that is expected to crash.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32493 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 12:18:06 +00:00
srdjan@google.com 3a8252f90d Cleanups: int -> intptr_t for "array" lengths, memory sizes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28324 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 20:19:37 +00:00
zra@google.com fa2ad38a31 Enables per-function far-branches for ARM and MIPS.
R=regis@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25723 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 20:51:46 +00:00
zra@google.com 42217dc159 Implements far-branches on ARM.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25617 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 15:33:36 +00:00
regis@google.com 4ac3d21c08 Initial revision of ARM assembler.
Object references and calls, as well as their fixups, are still unimplemented.
Review URL: https://codereview.chromium.org//12090034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17775 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 16:46:10 +00:00
asiva@google.com 6749a3be79 Add read only handles for the following predefined symbols
"=="
 "[]"
 "[]="
 "this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +00:00
tball@google.com 2cd8436c5a Changed StackZone and ApiZone to be containers for Zone.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13707 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 22:05:40 +00:00
tball@google.com 76d7c9b105 Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return what was called the BaseZone instead of its wrapper. The GetBaseZone() methods were not renamed, to help the next CL.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13314 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 19:52:55 +00:00
turnidge@google.com 2803d78dfd Change the zone allocation api.
Instead of passing a size in bytes to the allocation function, we now
have a templatized Alloc function:

  zone->Alloc<Type>(len)

This is better for security, as we can check for integer overflow in
the size computation before performing the allocation.  Before, we
often failed to check this.
Review URL: https://chromiumcodereview.appspot.com//10836061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10254 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 21:51:44 +00:00
cshapiro@google.com e964989681 Ensure objects emitted in code are allocated in old space.
BUG=3866

Review URL: https://chromiumcodereview.appspot.com//10786003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9649 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 23:23:45 +00:00
sgjesse@google.com 65896148c9 Move utils.h and utils.cc from runtime/vm to runtime/platform
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.

R=ager@google.com, iposva@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9209001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00
regis@google.com 603c316b46 Fix win32 build.
Review URL: http://codereview.chromium.org//8853002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2207 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 00:14:07 +00:00
regis@google.com ec7f6331d1 Add 64-bit stubs to call into the runtime and to call native functions.
Fix 64-bit assembler bugs.
Review URL: http://codereview.chromium.org//8818001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2206 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 00:03:08 +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