Commit Graph

59 Commits

Author SHA1 Message Date
asiva@google.com 00dd8aa761 Remove functions_cache_ and it's references as it is not being used anymore.
Review URL: https://chromiumcodereview.appspot.com//10824266

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10542 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 23:33:37 +00:00
asiva@google.com 5fd180cdfc 1. Register canonical names for internal VM classes and get rid of the method GetSingletonClassName
2. Create the empty_array object as a singleton in the VM isolate and remove it from the object store
3. Remove eager population of the functions_cache entry in the class. This results in a pretty impressive reduction of the initial isolate heap size:
    - on IA32 it goes from 1331k to 1071k
    - on X64 it goes from 2431k to 1911k
    - snapshot size also is reduced from 859219 bytes to 789147 bytes.
    (as a follow up change I will consider completely removing functions cache)
Review URL: https://chromiumcodereview.appspot.com//10827249

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10535 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:43:00 +00:00
srdjan@google.com b7f043bc6b Replace deopt stubs location/register shuffling with using deopt-info. Added deopt instruction commands. Also fixes a crash in IA32 with use_ssa where the stack is incorrect after deoptimization. Tested IA32 with and without use-ssa.
Review URL: https://chromiumcodereview.appspot.com//10825236

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10469 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 23:46:38 +00:00
srdjan@google.com 32d5673c05 Move deopt reason into PcDescriptor so the EAX/RAX register is not destroyed. Some cleanups in PC descriptor.
Review URL: https://chromiumcodereview.appspot.com//10832214

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10424 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 22:15:38 +00:00
asiva@google.com d4d781d636 - Unify class ids and snapshot object ids list so that we don't have disparate
and sometimes confusing values.
- Remove instance_kind_ field from RawClass.
- Rename all class id names to have a Cid suffix.
- Remove code from object.h and object_store.h which dealt with object ids
  of predefined classes for snapshots.
Review URL: https://chromiumcodereview.appspot.com//10827209

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 19:46:23 +00:00
srdjan@google.com ac8041f15d First step toward deoptimization using deoptimization info: splits deoptimization into two steps: copy frame to buffer, fill unoptimized frame from buffer. The only changes in the frame are the return address and the PC marker.
Second step will add deoptimization info 'instructions' that will fill the unoptimized frames using the saved registers and frame data.
Review URL: https://chromiumcodereview.appspot.com//10836020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10071 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 17:27:15 +00:00
vegorov@google.com 61dc368874 Fix kStoreBufferBlockProcessRuntimeEntry calling sequence.
Poping of volatile registers was performed without taking into account the fact that stack pointer could have been  modified to ensure correct alignment _after_ volatile registers were pushed.

Enable --use-ssa on x64 again.

BUG=4221

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10007 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 10:38:48 +00:00
srdjan@google.com 3402769c7a Use kIllegalObjectKind instead of NULL object to terminate ICData array
Review URL: https://chromiumcodereview.appspot.com//10796103

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9835 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:31:32 +00:00
srdjan@google.com c90763f160 Fix triggering of method optimization: increment counter at all IC calls and return as before but allow triggering of optimization only at exit of the method.
Review URL: https://chromiumcodereview.appspot.com//10779026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9710 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-17 16:35:45 +00:00
srdjan@google.com 00c3067049 Fix problem of excessive attempts to optimize, fix excessive deoptimizations for load/store indexed, performance issue with non-inlineable instance setter (direct call instead of IC call). Add tracing of issues encountered when attepting to optimize a method (--trace_failed_optimization_attempts), rename flag --print_stacktrace_at_throw.
Review URL: https://chromiumcodereview.appspot.com//10704210

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9680 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 20:55:09 +00:00
srdjan@google.com 94192b98a1 Use class id instead of class in subtype test cache.
Review URL: https://chromiumcodereview.appspot.com//10695136

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9559 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:16:30 +00:00
iposva@google.com dd800b6870 - On store buffer block overflow call a VM leaf function to
add the entries into the store buffer.
- Add a way to preserve and restore caller saved registers.
- Clean up the implementation of the stub for Assembler::Stop.
Review URL: https://chromiumcodereview.appspot.com//10758008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9490 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 22:58:27 +00:00
iposva@google.com 65d96de4e8 - Separate store buffer data in the isolate into the StoreBufferBlock and
the actual StoreBuffer.
- Add a HashSet class to use for the StoreBuffer data.
- Fix allocation sites for definite old objects.
- Remove obsolete leaf runtime entry StoreBuffer.
Review URL: https://chromiumcodereview.appspot.com//10702067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9323 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 00:10:23 +00:00
regis@google.com 8997078334 Remove old code generator.
Review URL: https://chromiumcodereview.appspot.com//10665038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9122 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:43:44 +00:00
srdjan@google.com 7508deeeab Intrinsify fixed and growable array allocation on x64.
Review URL: https://chromiumcodereview.appspot.com//10657012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9075 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:13:33 +00:00
asiva@google.com f05e3736d8 Fix issue 1968, replace usage of inline 'asm' constructs in 'stack alignment', 'jump to exception handler' and 'jump to error handler' code with calls to appropriate stubs.
Review URL: https://chromiumcodereview.appspot.com//10664004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9071 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:35:20 +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
iposva@google.com 5e52657f33 - Implement the filtering store barrier on x64.
Review URL: https://chromiumcodereview.appspot.com//10581049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8953 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 23:48:26 +00:00
iposva@google.com dbd08016de - Inline the store buffer update into a stub instead of
calling out into the C++ runtime.
Review URL: https://chromiumcodereview.appspot.com//10578046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8929 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 18:05:51 +00:00
asiva@google.com 88243dfce2 Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor.
Review URL: https://chromiumcodereview.appspot.com//10592006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8881 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 23:57:40 +00:00
srdjan@google.com 7f8cbb12b7 This is https://chromiumcodereview.appspot.com/10581006/ that I forgot to submit, and messed up the original accidentally. Submitting as TBR
Review URL: https://chromiumcodereview.appspot.com//10580024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8871 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 21:19:00 +00:00
asiva@google.com 16f8c892aa Add support for leaf runtime calls
- use a NoGCScope around these calls
- do not save and restore exit frame info, context register etc.
- Do not create a zone and handlescope by default
Review URL: https://chromiumcodereview.appspot.com//10542123

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8699 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 00:19:45 +00:00
vegorov@google.com a4711ef435 Eliminate RawObject::class_ field entirely.
Removed initializations of class_ field done in runtime and generated code on ia32/x64.

Changed forwarding address encoding used by scavenger: kFreeBit is now used to distinguish evacuated objects from not evacuated because scavenger will never encounter real FreeListElement.

Changed FreeListElement layout to match RawObject layout.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8336 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 14:22:52 +00:00
vegorov@google.com 9125248ea2 In generated code for x64 don't load object's class directly from class_ field.
Instead look it up in class table by class index taken from object's tags.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8159 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 15:35:14 +00:00
iposva@google.com bee192cbe4 - Rename class index to class id.
- Remove unused method.
Review URL: https://chromiumcodereview.appspot.com//10441111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8148 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 12:41:37 +00:00
regis@google.com e0d223b30b Address review comments in commited cl (issue 10460002).
Review URL: https://chromiumcodereview.appspot.com//10448079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8144 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 08:31:30 +00:00
srdjan@google.com eeda4b5810 First step toward an optimizing compiler:
- Fix ic-data instrumentation
- Optimize '+' for Smi-s only, by replacing the instance call with inlined operations.
- Add deoptimization stub
- Add deoptimzation support.
Review URL: https://chromiumcodereview.appspot.com//10431006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7952 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 16:50:57 +00:00
srdjan@google.com 7ecab7dcab More inlined type checking for x64.
Review URL: https://chromiumcodereview.appspot.com//10409067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7867 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 18:31:55 +00:00
srdjan@google.com 7e0f0ec4e8 Started porting inlined type checks to x64 (will be the future pattern for other architectures).
Review URL: https://chromiumcodereview.appspot.com//10414026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7837 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 00:55:20 +00:00
asiva@google.com c71a8cc1ee Change dart frame and stub frame layout to include the PC of the code executing on the frame. The stack frame layout is as follows:
ret PC
  saved EBP                          <== EBP
  PC (used to locate RawInstruction) <== ESP
Review URL: https://chromiumcodereview.appspot.com//10375059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7675 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 00:47:05 +00:00
srdjan@google.com d55a9bc973 First steps toward a two stages new compiler.
Review URL: https://chromiumcodereview.appspot.com//10356051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7420 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 16:03:15 +00:00
srdjan@google.com ad95f248cb Improve type checking, remove unused stub (removed also in x64 in preparation of porting the better type checking code from ia 32 to x64).
Review URL: https://chromiumcodereview.appspot.com//10381045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7399 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 21:37:39 +00:00
srdjan@google.com a53d7c1d03 Temporary fix for GrowableArray type arguments: use the type arguments stores in GrowableArray instead of the one in the data container (there is a bug that Regis is fixing where data container is always null). Fix assembly subtype cache lookup lookup.
Review URL: https://chromiumcodereview.appspot.com//10345003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7255 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 20:49:46 +00:00
iposva@google.com 4d3c2b94a2 - Add extra checking when validating objects.
- Properly set the class tags when converting growable arrays
  to fixed length arrays.
- Set the class tag when allocating instantiated type arguments. 
Review URL: https://chromiumcodereview.appspot.com//10271032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7190 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 15:16:02 +00:00
iposva@google.com d8c7c1ada6 - Add a class index to the classes.
- Add a class table which assigns individual ids to classes.
Review URL: https://chromiumcodereview.appspot.com//9965042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7183 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 09:20:40 +00:00
srdjan@google.com 33b4d35412 Simpler and better inlined type checks as discussed. Changed inline type test cache arrays to contain instance class, instance type argument and instantiator type argument (not yet used).
Review URL: https://chromiumcodereview.appspot.com//10243013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7113 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-28 00:06:37 +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
asiva@google.com 17c7958b33 Some minor cleanup.
Review URL: https://chromiumcodereview.appspot.com//10114012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6668 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 00:20:30 +00:00
regis@google.com cb6c1b27f3 Implement checked mode in new compiler.
The only remaining bailout is the boolean type check for conditions.
Review URL: https://chromiumcodereview.appspot.com//10080015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6542 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:16:59 +00:00
regis@google.com 5282e44fb2 Use null type argument vector instead of vector of Dynamic for a generic raw
type when possible.
Fix type finalization of type parameters (always finalize in the context of the
class being parameterized and not in the enclosing class where the type
parameter is used).
Fix wrong generic optimization and added a test (a generic type instantiated
from a raw instantiator is not always raw).
Added printing of type argument vectors.
Review URL: https://chromiumcodereview.appspot.com//9939003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6068 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 22:16:52 +00:00
srdjan@google.com 0b265044c1 Factor out super-class and interface array subtype checks into a stub.
Inline more type checks.
Review URL: https://chromiumcodereview.appspot.com//9873014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5934 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-28 15:50:33 +00:00
hausner@google.com e74d822b1d Fix merge error, Debug_StepInto test
Review URL: https://chromiumcodereview.appspot.com//9481018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4641 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:18:00 +00:00
hausner@google.com 6d9abc5e3b StepOver, StepInto, StepOut
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
  locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00:28 +00:00
srdjan@google.com a343a49338 Do not count invocations but usage of a function, i.e., increment a function's counter at IC calls and at return operations in unoptimized code. (TODO: increment count at static calls as well). There is no checking at method entry any more. The function counter reporting is not measuring the invocation count but much more how much time we spend in a method. Removed counter at backward branches.
Renamed flags to:
--optimization_counter_threshold (default 2000)
--report_usage_count
Review URL: https://chromiumcodereview.appspot.com//9460015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4583 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-25 00:33:25 +00:00
srdjan@google.com a54f33bf92 ICData is now a wrapper object that refers to the calling function, target name, ic data array, etc. The old ICData C++ class that wrapped around an Array is removed. The advantage is that the ICData object remains the same, only its ic_data array object is being modified as classes are added..
TODO: store ICData-s into function so that the type feedback can be easily extracted (currently must traverse the unoptimized code).
Review URL: https://chromiumcodereview.appspot.com//9395016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4417 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 00:40:03 +00:00
regis@google.com d573d5437d Enable remaining execution tests on x64.
Review URL: https://chromiumcodereview.appspot.com//9242025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3376 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 22:52:54 +00:00
regis@google.com 2d1f63af47 Port a couple more stubs to x64.
Fix integer implementation issues.
Enable all tests on x64.
Review URL: http://codereview.chromium.org//9114054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3307 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 20:07:54 +00:00
regis@google.com 344dcbde12 Print stop message.
Review URL: http://codereview.chromium.org//9128002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3124 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 00:32:51 +00:00
iposva@google.com 346424b9b0 - Add a size field to the header.
- Make use of the field when available to avoid accessing the class.
Review URL: http://codereview.chromium.org//9072011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2936 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 08:04:04 +00:00
asiva@google.com 2a3eca43a4 Push raw_null instead of smi 0 in all places were we setup the return value location before calling into the runtime.
Review URL: http://codereview.chromium.org//8965071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2844 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-28 01:55:58 +00:00