Commit Graph

54 Commits

Author SHA1 Message Date
Alexander Markov 7588ed86de Remove bytecode mode from the VM
Change-Id: Ief167b7ffc128105a03cc225ab750234c9a6a7a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169147
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-10-28 17:42:35 +00:00
Alexander Markov 50f1f1459e [vm/nnbd] Support NNBD weak mode in vm/cc tests
Change-Id: Ia49c64bf8461b8acf019c398635e27b11fe6d25e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149666
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-02 20:40:03 +00:00
Ben Konyi c4b7097e97 [ VM ] Migrate VM tests to support null safety and return errors from Dart_GetType and Dart_NewListOf when --null-safety is enabled
These methods return legacy types, which aren't valid with null safety
enabled.

Fixes https://github.com/dart-lang/sdk/issues/41154

Change-Id: I1181f0f3b9a8df156dea4dc4c82fef8afdf97ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148685
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-05-26 22:40:52 +00:00
Martin Kustermann a64b06ec83 [gardening] Migrate most files to be implicit-bool-conversion free
Issue https://dart-review.googlesource.com/c/sdk/+/115701

Change-Id: Ib579f0bbc8d694aec74afd837217316a10baf910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115707
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-09-05 21:41:42 +00:00
Ryan Macnak 7e5bbe3549 [vm, bytecode] More passing vm/cc tests.
- Hook up allocation tracing.
 - Fix off-by-one when mapping bcpcs to token positions.
 - Fix missing class loading for predefined classes in Dart_Invoke type checks.

Change-Id: Id9177001d493725a0545c5948b7f7c6b4693027c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107564
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-06-28 16:44:57 +00:00
Ryan Macnak 91c2c3537b [vm, bytecode] Plumb bytecode mode flags to VM unit tests.
- Make tests using eval fail instead of timing out.
 - Collect allocation stats in the interpreter.
 - And various EnsureDeclarationLoaded.

Change-Id: I17377216cd6dde2615b205f1b28071e12e50e252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107442
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-06-26 23:47:07 +00:00
Ryan Macnak 225516466f [vm, interpreter] noSuchMethod dispatchers as a bytecode.
Change-Id: I0e105a56b733322737b6f22a7641f7c6b8afac79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100283
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-24 22:58:35 +00:00
Ryan Macnak 30b0b9b723 [vm] Code size reductions:
- Remove dead Isolate::IsTopLevelParsing.
 - Remove dead TraceFunctionEntry/Exit.
 - Migrate more tracing flags to flag_list.h to allow code elimination in non-debug modes.
 - Require an explicit Zone parameter for CheckedHandles.
 - Remove side-effects from RuntimeEntry constructor.

out/ProductX64/exe.stripped/dart_precompiled_runtime 4063464 -> 4046952 (-16k)

Change-Id: Iffd3de25a03d2354cdecf2d79aa761c33ab08bd3
Reviewed-on: https://dart-review.googlesource.com/c/83120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-11-08 02:02:39 +00:00
Ryan Macnak 7514ce941e [vm] Assert handles are only allocated when the thread is preventing safepoints.
Threads in the native or blocked states don't prevent safepoints, so they may run concurrently with a safepoint operation like GC. It is not safe for handles to be allocated while the GC is visiting them, so these threads must not allocate handles. Assert only threads in the VM or generated states, which prevent safepoints until they check in, may allocate handles. (Generated code does not allocate handles, but leaf runtime entries remain in the generated state.)

Bug: https://github.com/dart-lang/sdk/issues/34883
Change-Id: I1a211778f7ef96b53a2405f0ee9dde7871b122b6
Reviewed-on: https://dart-review.googlesource.com/c/81540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-31 19:51:52 +00:00
Ryan Macnak 14db718ed5 [vm] Add missing safepoint transitions.
Mostly tests; 1 non-test bug in propagating an error through Dart_SetReturnValue.

This is progress towards asserting thread->excution_state() == kThreadInVM in Object::Allocate.

Change-Id: I6a59549868ab317b3c0d32aa42f3661289cbf456
Reviewed-on: https://dart-review.googlesource.com/71720
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-08-28 16:40:17 +00:00
Ryan Macnak 8da46d35f5 [vm] Move heap-related code to its own subdirectory (cf. compiler).
Remove some dead includes.

Change-Id: I31f3e739e5ee46dcbba5d6a2f091491b46402943
Reviewed-on: https://dart-review.googlesource.com/60146
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-20 00:39:49 +00:00
Ryan Macnak 9b5a931b06 [vm] Replace most runtime/vm uses of OS::Print with OS::PrintErr.
Leave --print-snapshot-sizes on stdout because it is parsed by Flutter benchmarks.

Replace all runtime/bin uses of OS::Print with Log::Print.

Bug: https://github.com/dart-lang/sdk/issues/32134
Change-Id: I74aacfb410cdfa9270d06e7f6ab0534520c7c7ba
Reviewed-on: https://dart-review.googlesource.com/60021
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-13 19:51:40 +00:00
Martin Kustermann 35b17f3730 [VM] Consistently use ValidationPolicy in frame iteration APIs
Previously there were places in the code where an API accepted a
`bool validate_frames` and call sites passed an enum value (which
implicitly got converted to a bool).

By changing the APIs to require an enum, the compiler will tell us if a
caller doesn't pass one.

Change-Id: I29fcd0b018e6cdd7e00b5bb03e83b9636d1345d4
Reviewed-on: https://dart-review.googlesource.com/57823
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-04 14:46:26 +00:00
Siva Chandra 6214cedaf5 Create isolate from the platform kernel when running VM tests under dartk.
This is take 2 with appropriate status files updates or fixes to the
tests.

This reverts commit 4925ed38ac.

Change-Id: I133b9ae307f0feed1b72ec5a0131facdc51ad4e9
Reviewed-on: https://dart-review.googlesource.com/41600
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-20 22:08:25 +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
Ryan Macnak 466385ceb6 [vm, gc] Require a safepoint for heap iteration.
Assert a safepoint operation can only be started from a thread in the VM state. Fix several unit tests missing a native-to-vm transition.

R=asiva@google.com, danunez@google.com

Review-Url: https://codereview.chromium.org/2995543004 .
2017-08-07 17:51:25 -07: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
Martin Kustermann ac8d2056a3 Fix asserts in StackFrameIterator which were effectively disabled
The assertions which tried to assert that we only use
StackFrameIterator to walk frames of the current thread was incorrect.
We already have cases where other threads will walk the stack of the
mutator thread, see below for an example where this can happen.

Thread::VisitObjectPointers was incorrectly passing Thread::Current() to
the StackFrameIterator instead of 'this'.  (Code in thread_registry.cc will
loop over a number of threads and calls VisitObjectPointers on them)

  Mutator thread:

    0  pthread_cond_wait@@GLIBC_2.3.2
    1  dart::Monitor::WaitMicros
    2  dart::Monitor::Wait
    3  dart::MonitorLocker::Wait
    4  dart::ThreadBarrier::Sync
    5  dart::GCMarker::MarkObjects
    6  dart::PageSpace::MarkSweep
    7  dart::Heap::CollectOldSpaceGarbage
    8  dart::Heap::CollectNewSpaceGarbage
    9  dart::Heap::CollectGarbage
    10 dart::DN_HelperObject_<native>
    11 dart::BootstrapNatives::<native>
    <dart frames>

  MarkTask thread:

    1  dart::EntryFrame::VisitObjectPointers
    2  dart::Thread::VisitObjectPointers          <---- Walks mutator thread stack
    3  dart::ThreadRegistry::VisitObjectPointers  <---- Iterates over a number of threads
    4  dart::Isolate::VisitStackPointers
    5  dart::Isolate::VisitObjectPointers
    6  dart::GCMarker::IterateRoots
    7  dart::MarkTask::Run
    8  dart::ThreadPool::Worker::Loop
    9  dart::ThreadPool::Worker::Main
    10 dart::ThreadStart

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2845053003 .
2017-05-03 10:27:01 +02:00
Ben Konyi f2fd150ea0 Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run while the VM is alive. Tests created using the RAW_UNIT_TEST_CASE macro will run after the VM has shutdown to avoid having any worker threads contaminating the test results.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2666133002 .
2017-01-31 15:16:38 -08: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
Ivan Posva b2ac279269 - Use a map to lookup libraries by URL.
- Ensure the uniqueness of private keys without having to
  search the existing key space.
- Pass a thread parameter where useful to library methods.

BUG=

Review URL: https://codereview.chromium.org/1947393003 .
2016-05-05 10:42:28 -07:00
Florian Schneider b870dafa4f VM: Separate precompilation-specific code, make flags const.
Move optimizations for precompilation into separate file.

Remove precompilation-specific code from flow_graph_optimizer.cc.

Add precompilation-flags: They are const in the precompiled runtime. Started moving flags to use the new flag-definition macros.

Add libdart_lib_precompiled target.

Define PRECOMPILED_RUNTIME_MACRO in more places (dart_precompiled_runtime)

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1714743002 .
2016-02-23 08:48:08 -08:00
Siva Annamalai e72c1fb47d Implement safepointing of threads :
- uses thread execution status transition to track when a thread is in a safepoint or needs to block for a safepoint
 - introduces a monitor per Thread object
 - uses a per thread safepoint handshake between the thread requesting a safepoint and the requested thread.

The ThreadRegistry class now contains only the thread list for an isolate and the functionality of scheduling a thread onto an Isolate and unscheduling it from teh isolate. We could fold this functionality into the Isolate class in a different CL.

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

Review URL: https://codereview.chromium.org/1541073002 .
2016-02-01 10:57:34 -08:00
Zachary Anderson 16393ee9c6 Uses SNPRINT macro where possible. Otherwise uses #define for format.
I was able to convert 49 SNPrint(NULL, 0, ...) patterns to use the
macro. I had to use a #define for the format string 5 times due to
uses that didn't fit the macro.

2 occurences of SNPrint(NULL, 0, ...) had >=2 possibilities for the
format string based on runtime values, and I didn't try to convert
them.

Fixed ~10 format strings.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1331623002 .
2015-09-11 00:18:14 -07: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
Ryan Macnak 66194d4fc1 Port "Add flag to disable lazy compilation of invocation dispatchers."
Fix InvokeNoSuchMethodDispatcher to propagate with a rethrow instead of a throw.

Fix unit test checking raw stack frames.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//1191813002.
2015-06-18 10:23:39 -07: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
zra@google.com 7d0b680f95 Adds Simulator Longjmp and enables many tests for arm64.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35603 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 23:07:47 +00:00
fschneider@google.com 9ed4cf1cb6 Simplify and improve handling of IC and megamorphic cache miss handling.
Instead of going back and forth from stub code to C++, perform
only the lookup in C++ and call target functions only from
stub code.

noSuchMethod and implicit closure invocations are now also work with
the megamorphic cache. Before they would go slow-case in the megamorphic case.

This CL eliminates the InstanceFunctionLookup stub that was previously
used to handle noSuchMethod and implicit closure invocations.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34774 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 09:27:43 +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
asiva@google.com a576fec3c0 Allow the native resolver to setup whether it needs the Dart API scope to
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +00:00
asiva@google.com b4d9e0d620 Auto create ApiLocalScope before calling native functions, this ensures that
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.

Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.

R=regis@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
fschneider@google.com f260416fb8 Support fast noSuchMethod dispatch for any number of arguments.
Until now, the fast dispatch was only available with getters and
zero argument methods.

This CL generalizes the approach to any number of arguments. The
dispatcher functions that are auto-generated by the compiler
are not attached to the class anymore. Instead the dispatcher
is only stored in the IC data of each call site. Each class
contains a cache of dispatcher function that map
(name, arguments descriptor) => dispatcher.

This also fixes a bug where the VM report a wrong error message
when throwing a NoSuchMethodError.

BUG=https://code.google.com/p/dart/issues/detail?id=11528
BUG=https://code.google.com/p/dart/issues/detail?id=11223
TEST=tests/language/no_such_method_dispatcher_test.dart
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24876 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-10 10:09:14 +00:00
zra@google.com 4190de5bfc Enables stack frame vm tests on MIPS.
Review URL: https://codereview.chromium.org//14446005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21906 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 21:42:19 +00:00
regis@google.com 7f1bc0d351 Enable stack frame vm tests on ARM.
Review URL: https://codereview.chromium.org//14328026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21748 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 16:06:40 +00:00
ahe@google.com 5b6c0ba820 Rename InvocationMirror to Invocation.
Review URL: https://codereview.chromium.org//14049009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21465 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:42:44 +00:00
hausner@google.com 7eb3efc2ba Fix native argument handling
Native functions need to fetch arguments differently if they are
called through a closure.

fixes issue 6696.
Review URL: https://codereview.chromium.org//11293290

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14937 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 01:14: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
lrn@google.com a8720a6d9c Change signature of noSuchMethod to take an InvocationMirror.
Requires VM and dart2js/dart2dart changes to work.

Committed: https://code.google.com/p/dart/source/detail?r=14198

Committed: https://code.google.com/p/dart/source/detail?r=14254

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14324 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 10:32:54 +00:00
lrn@google.com 895d155ab1 Revert "Change signature of noSuchMethod to take an InvocationMirror."
TBR=ager@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14260 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:47:42 +00:00
lrn@google.com 4a24ddc1d4 Change signature of noSuchMethod to take an InvocationMirror.
Requires VM and dart2js/dart2dart changes to work.

Committed: https://code.google.com/p/dart/source/detail?r=14198

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14254 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:04:12 +00:00
lrn@google.com 778b0dc5e5 Revert "Change signature of noSuchMethod to take an InvocationMirror."
TBR=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14199 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 14:07:10 +00:00
lrn@google.com 0bcd2f4f7b Change signature of noSuchMethod to take an InvocationMirror.
Requires VM and dart2js/dart2dart changes to work.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14198 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 13:34:58 +00:00
srdjan@google.com 1821bce654 Removed incorrect EXPECT that gets triggered with low optimization_counter_threshold.
Review URL: https://chromiumcodereview.appspot.com//10823416

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10993 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 17:59:09 +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
regis@google.com 1e055acce8 Stop passing location argument to run time calls, since it is stored in the pc
descriptor.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10701131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9538 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 23:59:09 +00:00
asiva@google.com 3107319e40 Simplify representation of stack frames. Remove the special types DartFrame/StubFrame and instead use StackFrame with methods IsDartFrame and IsStubFrame for frames representing Dart or Stub Code. This eliminates all the complexity that was added to ensure that we always see only one stub frame before hitting a dart frame during iteration.
Fixes bug 6380625 which was another case when we had two stub frames before hitting the dart frame.
Review URL: https://chromiumcodereview.appspot.com//10173008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6920 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 01:15:28 +00:00
turnidge@google.com 9e2c641658 Remove the deprecated method invocation and field access apis from the
dart embbedding api.  Use the new apis instead.

Fixed a bug where field/function lookup was failing for imported libs.
Added tests.  Had to add a couple of lookup functions to Library.

Fixed a bug in Dart_Invoke -- it wasn't handling a null receiver
correctly.
Review URL: https://chromiumcodereview.appspot.com//10021072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6769 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 21:04:15 +00:00
asiva@google.com 2d3775a1b1 Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions:
Change 6302 description:
- Wire the stack frame iterator to use stack maps for traversing objects if
there are stack maps in the code object. If there are no stack maps it still
does the old style stack frame traversal between fp and sp looking for tagged
pointers.
- Added a mechanism to be able to iterate over the code space and look for a
particular object.
Review URL: https://chromiumcodereview.appspot.com//10030001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6331 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:20:23 +00:00
asiva@google.com c79da818cc Revert change 6302 until the compiler warning is addressed.
Review URL: https://chromiumcodereview.appspot.com//10025003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6304 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 02:04:28 +00:00