Commit graph

63 commits

Author SHA1 Message Date
Ryan Macnak 3e7212e194 Reapply "Precompilation/x64: Load float vector constants via Thread."
Fix unbalanced Enter/LeaveTestFrame in TestObjectCompare. Crashed on release + clang with the original change, and was failing on ASAN before that.

BUG=http://dartbug.com/24450
BUG=http://dartbug.com/25002
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1499763002 .
2015-12-04 09:46:21 -08:00
Ryan Macnak 7dfb517618 Revert "Precompilation/x64: Load float vector constants via Thread."
This reverts commit 9cf30c9697.

Review URL: https://codereview.chromium.org/1494323002 .
2015-12-03 14:19:21 -08:00
Ryan Macnak 9cf30c9697 Precompilation/x64: Load float vector constants via Thread.
Cannot put these in the object pool because some of these instructions
are used in intrinsics.

BUG=http://dartbug.com/24450
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1488403002 .
2015-12-03 13:35:31 -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: 1d343e5a7b

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
Todd Turnidge b0ca0789be Fix a variety of service protocol bugs.
Add documentation for breakpoint.

Fix Instance.pattern documentation.

Fix Instance.bytes documentation.

Add class field for null instances.

Fix documentation of Context and closureContext.

Make getObject return Collected for deleted breakpoints.

Closes #24247
Closes #24249
Closes #24309
Closes #24325
Closes #24326
Closes #24327

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1341473002 .
2015-09-11 12:29:21 -07:00
Ivan Posva 4bd7cdc75c - Ensure that HandleScope is initialized with a thread. (Remove
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the   unit test.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1310463005 .
2015-09-01 17:18:55 -07:00
Srdjan Mitrovic 304dc3486f Make default_parameter_values a ZoneGrowableArray instead of an array in new space
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1307943008 .
2015-08-24 17:22:44 -07:00
Florian Schneider 25966d228d VM: Refactor assembler test that rely on the constant pool.
This makes the test code independent of the way we call Dart code and
makes it easier to change the calling convention.

The code for calling test code is now encapsulated in unit_test.h instead
of being spread over many different files.

I only changed the tests that need a constant pool set up, but the same strategy
could be used for all other assembler tests to avoid unnecessary duplicated
boilerplate code.

BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org//1283733003 .
2015-08-18 11:36:05 +02:00
Daniel Andersson bc149bf2f5 Migrate most uses of StackZone(Isolate*) to Thread*.
Also migrate some HANDLESCOPE uses.
This prepares for concurrent compilation.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1285293004 .
2015-08-13 13:11:30 -07:00
Ivan Posva f5e3f94019 Fix http://dartbug.com/23578:
- Complete revamp of isolate-specific flags.
- Associate flags with the isolate on creation.
- Dart_CreateIsolate and associate callback do take an
  extra flags argument.
- Make sure to clear IC data array when clearing code.

BUG=23578

Review URL: https://codereview.chromium.org//1162033005
2015-06-07 17:57:34 +02:00
John McCutchan 51d8bae199 Revert "Hide Isolate pointer from embedder"
This reverts commit 014e694ba7.

Revert "Fix fall out from hide isolate pointer change"

This reverts commit 966aafbc81.

Revert "Fix build"

This reverts commit d7b03ba7b0.

BUG=

Review URL: https://codereview.chromium.org//1140263005
2015-05-19 11:41:42 -07:00
John McCutchan 014e694ba7 Hide Isolate pointer from embedder
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1130753006
2015-05-18 14:06:10 -07:00
asiva@google.com 87c8a6ee76 First step towards splitting a full snapshot into a vm isolate snapshot and a
regular isolate snapsot.
- change gen_snapshot to split a full snapshot into a vm isolate snapshot
  and an isolate snapshot
- change the build process and scripts to account for splitting the full
  snapshot

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44814 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-31 18:46:19 +00:00
johnmccutchan@google.com 172baa03ff Service isolate rework take 2
Review URL: https://codereview.chromium.org//889443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
johnmccutchan@google.com db271b0477 Revert r43217, r43215, r43208, r43207, and r43202.
Reverting because of some isolate spawn issues (on Windows, and pub bots).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com 66aa470fc6 * Create vm-service isolate at Dart_Initialize time.
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.

performance changes:

no service isolate:

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | -    0]

always start service isolate (as a thread pool task):

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | -    0]

service does I/O (calls to Dart_LoadScript block until service is running):

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | -    0]

$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | -    0]

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
vegorov@google.com aa48bd4759 Range feedback for arithmetic operations.
In addition to tracking input and output ranges in the IC-stubs with a Smi fastpath (SmiAdd and SmiSub, currently) this CL also introduces two IC stubs that have no fast-path by still track ranges and update the range feedback.

We are able to distinguish between the following ranges (encoding of the lattice is shown in the parens):

- u-smi  (0000)
- smi    (0001)
- uint31 (0010)
- int32  (0011)
- uint32 (0100)
- int64  (1xxx) and (x1x1)

BUG=
R=fschneider@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42370 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 18:48:15 +00:00
fschneider@google.com 876193b31a Make CTX allocatable by the register allocator.
This change makes CTX available by not caching the current
context while in Dart code. Instead the current context
is held in a local variable (:saved_current_context_var) and
is passed as argument in CTX at calls.

This also simplifies a lot of code in the debugger: As a result,
Isolate::top_context is not needed anymore since the current context
can always be extracted from a Dart frame.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41422 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 15:42:38 +00:00
regis@google.com 0220e41d72 New bigint implementation in the vm.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
asiva@google.com 97b903c665 Fix for issue 19817
- do not try to finalize classes on every Dart API call which could
  potentially result in calls to dart code
- Invoke Dart_FinalizeLoading after all loads are done to ensure that
  classes are finalized

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38471 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 20:08:15 +00:00
zra@google.com 9c73009ff9 Prepares for arm64 cross-build.
With this change, the cross-build succeeds with the Linaro arm64 toolchain.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36698 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 18:05:20 +00:00
koda@google.com da7bf22b7f * Rename misleading Instance::Equals to CanonicalizeEquals and document it.
* Keep 'Equals' alias for String and Integer.
* Add Instance::OperatorEquals that calls or mimics Object.operator==.

This is partly in preparation for internalizing HashMap/Set.

R=hausner@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36066 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 20:53:23 +00:00
hausner@google.com 12c56b29c7 Eliminate unused url mapping parameter in dartutils
Change the LibraryTagHandler used in unit tests to match
the real tag handler better, eliminating special treatment
of url canonicalization. This required changing the library
url of tests so tests don’t get loaded using dart scheme urls,
since builtin.dart doesn’t handle dart: urls.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35987 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 18:25:41 +00:00
zra@google.com 5be8150a3a Begins work on arm64 floating point instructions.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35661 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 21:50:17 +00:00
zra@google.com dcc2284689 Adds subract, move wide immediate instructions to ARM64.
Also adds tests for move, add shift, add extended.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34715 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 18:26:11 +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
fschneider@google.com 16857e0b13 Revert r32930 (Add more timing information in the VM to track time...)
It caused severe performance regressions that should be addressed.

TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
asiva@google.com 6d313d3797 Add more timing information in the VM to track time spent is dart code Vs native code.
R=johnmccutchan@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
zra@google.com 8edda78ccc Enables more tests for SIMMIPS.
. Fixes register allocation bugs
. Implements float <-> double conversion in assembler and simulator.
. Fixes floating point argument passing for simarm and simmips,
  and floating point return for simarm, and adjusts tests to match.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24365 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 20:16:16 +00:00
zra@google.com 488b20bd7e Fixes buggy FPU tests for MIPS hardware.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24152 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 16:47:43 +00:00
asiva@google.com 9041d156a0 Create test isolates using a snapshot, this ensures that we do not depend
on the location of core libraries which can be a problem when we copy
the run_vm_tests executable to a different machine.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23030 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 17:25:25 +00:00
regis@google.com b37703989f Implement write barrier on ARM.
Enable StoreIntoObject and DartEntry vm tests.
Review URL: https://codereview.chromium.org//13638019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21083 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 16:44:39 +00:00
tball@google.com 34c2a002fc Added EXPECT_TRUE macro, updated debugger unit tests to use it for
API calls that return True.
Review URL: https://codereview.chromium.org//13009004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20450 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 16:21:58 +00:00
iposva@google.com f507e542de - Add a skeleton MIPS assembler, disassembler and simulator.
- Remove unused fields and methods from ARM simulator.
- Remove unused 5th parameter from Simulator::Call.
Review URL: https://codereview.chromium.org//12541003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19606 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 11:04:27 +00:00
regis@google.com 163db76189 Hook up simulator (if needed) when calling Dart code.
Merge identical InvokeDynamic and InvokeStatic to InvokeFunction.
Remove redundant argument from InvokeClosure.
Review URL: https://codereview.chromium.org//12315087

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18994 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 19:30:29 +00:00
regis@google.com 8c44be4313 Add support for object pool that will be used on ARM and MIPS architectures.
Modify code patching infrastructure to accept code object, which is necessary to
get to the object pool containing patchable target addresses.
Modify assembler test infrastructure to provide associated code object.
Review URL: https://codereview.chromium.org//12260026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18604 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 23:55:31 +00:00
regis@google.com 5675b85979 Generate first ARM assembler test and execute (simulate) it.
RFC: First draft showing how generated ARM code accesses GC'ed objects and
accesses patched call targets.
Review URL: https://codereview.chromium.org//12224024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18200 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:55:47 +00:00
asiva@google.com 7ea520f10f Create read only handles for empty_array and sentinel objects
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
asiva@google.com 2c6de68680 Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the requirements of the runtime.
Deleted all the code duplication that was added to circumvent the old DartEntry API requirements.
Review URL: https://codereview.chromium.org//11613009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16288 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 21:36:01 +00:00
asiva@google.com ebbb7c4134 - Represent strings internally in UTF-16 format, this makes it
compatible with webkit and will allow for easy externalization of
  strings. One byte strings are retained for pure ASCII strings.
  (The language specification was changed recently to reflect this as
   follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
  consistent and better describe the underlying functionality
  Dart_NewString => Dart_NewStringFromCString
  Dart_NewString8 => Dart_NewStringFromUTF8
  Dart_NewString16 => Dart_NewStringFromUTF16
  Dart_NewString32 => Dart_NewStringFromUTF32
  Dart_NewExternalString8 => Dart_NewExternalUTF8String
  Dart_NewExternalString16 => Dart_NewExternalUTF16String
  Dart_NewExternalString32 => Dart_NewExternalUTF32String
  Dart_StringGet8 => Dart_StringToUTF8
  Dart_StringGet16 => Dart_StringToUTF16
  Dart_StringToCString => Dart_StringToCString
  Dart_IsString8 => Removed
  Dart_IsString16 -> Removed
  Dart_StringToBytes -> Removed
  Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +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
asiva@google.com 9ed2e66130 Get rid of support for string interpolation in #import strings.
Review URL: https://chromiumcodereview.appspot.com//10911025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11698 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 16:55:03 +00:00
iposva@google.com d4bd618e75 - Fix the x64 store-barrier.
- Allow assembler test drivers to be shared across architectures.
- Add a shared StoreIntoObject assembler test.
Review URL: https://chromiumcodereview.appspot.com//10636017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9050 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 23:48:51 +00:00
turnidge@google.com 05b5d44b0e spawnUri. Take two. This time I'll wait for Anton before committing :-).
See original change 7756 for description.
Review URL: https://chromiumcodereview.appspot.com//10407042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7917 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 18:32:51 +00:00
turnidge@google.com 76d4586dea Revert my last change.
Review URL: https://chromiumcodereview.appspot.com//10332257

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7757 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:35:04 +00:00
turnidge@google.com 6a8c82db83 Implement spawnUri from dart:isolate. This function allows us to
launch an isolate running a different script.  Finally.

Reviewers: This isn't as hard to review as it looks.  Dive right in!

Siggi: Take a look at my test status file changes and make sure I'm
excluding the right stuff.

Much of the churn in the CL comes from moving ownership of the
import_map.  It used to be set per-library and is now set per-isolate.
This caused a lot of superficial diffs.

DART EMBEDDING API CHANGES:

- Dart_IsolateCreateCallback now takes a script_uri and main argument
  instead of a name_prefix argument.  The script_uri argument allows
  the callback to launch different scripts.  The main argument is used
  in creating the isolate debug name.

- Dart_CreateIsolate now takes script_uri and main arguments.  These
  are used to build the isolate's debug name.

- Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no
  longer take an import_map.

- Added Dart_SetImportMap.

- Added Dart_RootLibrary to provide access to the root library for the
  current isolate.

OTHER STUFF

Add a couple of tests for spawnUri -- the existing tests assume that
scripts end in a .js suffix which isn't going to work out for us.

Changed how the debug name for isolates get built a bit.

Refactored bin/main.cc a bit.  Fixed some problems with error handling
while creating isolates.

Minor refactoring in builtin.dart to always pass is_windows rather
than relying on it being squirreled away.
Review URL: https://chromiumcodereview.appspot.com//10386107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7756 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:22:10 +00:00
srdjan@google.com 54f73f0365 Remove TuckTemp, PickTemp, use temporary locals instead.
Review URL: https://chromiumcodereview.appspot.com//10310132

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7624 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 20:01:35 +00:00
asiva@google.com cdc9b0cc60 Set up a variable so that the compiler script can be imported using an import map.
Review URL: https://chromiumcodereview.appspot.com//10280003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7208 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 22:15:26 +00:00