Commit Graph

14 Commits

Author SHA1 Message Date
Ryan Macnak b1c09ecd8f [vm] Make naming more consistent when converting between handles, tagged and untagged pointers.
Currently we have things called XPtr which are not what you get from ptr().

Old world:
handle->raw() returns RawObject* (tagged)
raw_obj->ptr() returns RawObject* (untagged)

After 6fe15f6df9:
handle->raw() returns ObjectPtr
obj_ptr->ptr() returns ObjectLayout*

New world:
handle->ptr() returns ObjectPtr
obj_ptr->untag() returns UntaggedObject*

TEST=ci
Change-Id: I6c7f34014cf20737607caaf84979838300d12df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149367
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-15 23:32:02 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
Liam Appelbe d49bf6f25a [vm] Remove misleading usings.
Patchset 1 contains just the usings I deleted (<100 lines). All the
other diffs in the rest of the CL are just fixing all the places that
were broken by this.

Bug: https://github.com/dart-lang/sdk/issues/36839
Change-Id: I3bb4fa62ab4363ded81fd7c2815b857f91886dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108502
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-07-10 22:20:10 +00:00
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
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
Ryan Macnak 6e2c4636cd Bump the C stack pointer when building Dart frames to maintain the ARM64 ABI requirements without guessing the stack limit.
Fixes running with the profiler on ARM64.

Cf. 5d02929fa0.

BUG=http://dartbug.com/26472
R=vegorov@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2014413003 .
2016-05-31 15:36:44 -07:00
Florian Schneider e8eb6c7031 VM: Move calling convention-dependent code out of cc tests.
Use DartEntry::Invoke instead.

Unify LeaveDartFrame and LeaveStubFrame. They are the same.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1277883002 .
2015-08-07 10:54:43 +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
zra@google.com 240afa6afa Expands the use of Immediate and Operand wrappers.
Since Register is an enum type, it is automatically
coerced to integer types when passed as a parameter to
functions expecting an integer argument. This change
expands the use of Immediate and Operand wrappers
for Assembler instructions and macros to avoid this
automatic coercion.

I've also added dummy constructors to Address and
FieldAddress classes to address the same problem,
but in a way that does not increase verbosity,
since Address and FieldAddress are much more
prevalent in the code.

A cleaner solution would involve making Register
no longer coercable to integer types, but this
would likely require many changes to the Assemblers.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40905 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 19:46:24 +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
zra@google.com 321cec1c57 Fix build for ARM64.
Review URL: https://codereview.chromium.org//255543007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35406 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 22:08:20 +00:00
zra@google.com 57abf60fc8 Code patching for ARM64.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35156 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-17 22:00:11 +00:00
zra@google.com d128fb91ae Adds object pool, LoadImmediate, and LoadObject to ARM64.
Also enables many object tests.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35109 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 15:48:33 +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