Commit Graph

2008 Commits

Author SHA1 Message Date
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 dc45a91a4e Avoid reading RawObject::class_ directly in the runtime.
Instead rely on tags_ and perform lookups through isolate's class table where appropriately.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8244 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-04 10:29:00 +00:00
hausner@google.com 0c66cef0d9 Bigger stepping granularity in debugging
- Single step now steps to a safe point on the next line.
- Step into no longer steps into library code.
- Each library has a flag that specifies whether one
  can step into its code.

Later I will add an API to set the per-library flag. Currently
it's set to true for the top-level library and to false for
all other libraries.
Review URL: https://chromiumcodereview.appspot.com//10442088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8173 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 20:17:34 +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
hausner@google.com eeaa660d52 Introduce library ids and info in the wire protocol
- Library hierarchy (imports, prefixes)
- Global (top-level) variables
- Removing breakpoints
Review URL: https://chromiumcodereview.appspot.com//10447045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8075 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 19:51:51 +00:00
turnidge@google.com 6d0932f0b2 Make Dart_GetClass work for private classes.
Review URL: https://chromiumcodereview.appspot.com//10433003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7926 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 21:54:00 +00:00
hausner@google.com 6ddf54511d Replace linked list of loaded libraries
Replace the linked list of loaded libraries with a growable array
or libraries in the object store. This array will be used in the
debugger, where we use the index of a library in the array as an
id number, similarly to the class id and the table of loaded classes.
Review URL: https://chromiumcodereview.appspot.com//10414084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7923 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 20:28:21 +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
iposva@google.com 3b3b6e5000 - Add a math library. Currently it mostly matches the Math class in dart:core.
- Add a useable Random number generator.
Review URL: https://chromiumcodereview.appspot.com//10389150

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7860 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 16:54:31 +00:00
asiva@google.com c483079e45 Remove the special stub code region as we don't need it anymore. With the new frame layout convention we can find the first dart frame quickly.
Review URL: https://chromiumcodereview.appspot.com//10409038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7778 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 23:28:34 +00:00
asiva@google.com 88ca1a6cac Remove script source from the snapshot in order to reduce the size and to make the image size smaller. When the source for a script is needed we regenerate the source (a close approximation).
The size of the core isolate snapshot (corelibs, builtin, io etc.) prior to
this change is 1438238 bytes and after the change it is 769026 bytes.
The CorelibIsolateStartup times goes from 5389 microseconds to 4843 microseconds.
Review URL: https://chromiumcodereview.appspot.com//10414005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7774 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 22:27:06 +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
vegorov@google.com f999f30052 Extend assembler with ability to produce comments for the generated code.
Extend x64 disassembler with ability to decode and output recorded comments.

Example output (currently comments are emitted only by flow graph compiler at block/instruction boundaries, once instruction printing is refactored and supports printing into buffer simple "instruction" comment will be replaced with the actual IL construct):

        ;; B0
        ;; B1
        ;; instruction
0x007f0fff812525 00000055 49 bb 21 00 b4 04 10  mov    $0x7f1004b40021,%r11
0x007f0fff81252c 0000005c 7f 00 00
0x007f0fff81252f 0000005f 41 53                 push   %r11

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7723 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:56:16 +00:00
regis@google.com f3aca487fe First shot at static type propagation and type test elimination.
Review URL: https://chromiumcodereview.appspot.com//10399051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7708 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 23:21:24 +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
regis@google.com 5d9dab620c Implement latest rules prohibiting some self referencing typedefs.
Update tests.
Review URL: https://chromiumcodereview.appspot.com//10377095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7524 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:03:36 +00:00
srdjan@google.com 92b9e64375 Adding collected type feedback to the IL nodes (only in optimized mode).
Review URL: https://chromiumcodereview.appspot.com//10378093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7509 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:04:09 +00:00
srdjan@google.com eaab5d38aa Fixed compilation time measurement, restructure some code. Do not use slow ToFullyQualifiedCString in production backend (saves 10% in backend time with compile-all).
Review URL: https://chromiumcodereview.appspot.com//10389023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7435 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 00:03:25 +00:00
regis@google.com c609c03cc2 Stop postponing instantiation of Type and remove InstantiatedType VM class.
Review URL: https://chromiumcodereview.appspot.com//10380019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7389 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 17:34:53 +00:00
cshapiro@google.com 1472427af8 Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.""
This reverts commit 63480a81fccbde001494dd535cd06a8fa02ed261.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7352 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:16:09 +00:00
regis@google.com 5e99edcea7 Properly set the element type of literal lists.
Add test.
Keep element type consistent between growable array and backing array.
Fix snapshot reader to set the element type in growable array
Remove run time call checking rest argument.
Review URL: https://chromiumcodereview.appspot.com//10368004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7337 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 16:36:27 +00:00
cshapiro@google.com 3a14326da4 Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."
This reverts commit 747dbeaa8f9c0dc1f49d6d6a369c6a3fe2d8b7c9.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7313 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:28:10 +00:00
cshapiro@google.com 537010ea16 Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.
Internal and external representations of each array are provided.  A
single interface type implementing the ByteArray and List interfaces
is shared among the internal and external implementation type.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7311 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:12:19 +00:00
srdjan@google.com 6fc1247bb6 Using SubtypeTestCache object instead of an array, that way we do not need to patch and can communicate to type tests if there is a cache to update (quicker than looking up code).
Review URL: https://chromiumcodereview.appspot.com//10352012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7304 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 22:00:52 +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
asiva@google.com 09adb99a85 Add a stub_code_space in the heap alongside code_space so that stub code generation happens here and it is easy to determine if a PC is a stub code or not.
This gets rid of the temporary change made in code_generator.cc for fast access to the top dart frame. In addition it will not pollute the pc ==> code cache that I plan to add next as we don't have to store stub pcs in that table.
Review URL: https://chromiumcodereview.appspot.com//10223015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7033 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 18:00:53 +00:00
srdjan@google.com 72e21058ee (Redoing the change 6946) Progress toward inlined type checks for classes with type arguments: factor out
code, optimize type arguments of an instance.
Review URL: https://chromiumcodereview.appspot.com//10227006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6975 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 21:19:08 +00:00
srdjan@google.com dc17b7338f Canonicalize type arguments lazily.
Review URL: https://chromiumcodereview.appspot.com//10161030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6973 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 20:32:45 +00:00
srdjan@google.com be4b479d8b Revert change 6946.
Review URL: https://chromiumcodereview.appspot.com//10191020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6953 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 15:43:44 +00:00
srdjan@google.com b34787b742 Progress toward inlined type checks for classes with type arguments: factor out code, optimize type arguments of an instance.
Review URL: https://chromiumcodereview.appspot.com//10209002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6946 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 15:21:40 +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
regis@google.com efa92f5447 Mark types as instantiated or uninstantiated upon finalization.
Review URL: https://chromiumcodereview.appspot.com//10205006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6894 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 16:15:37 +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
turnidge@google.com e5022d70d4 Add fast paths for Smi values in the dart embedding api.
This speeds up the UseDartApi microbenchmark by 30%.  Thanks to Carl
for suggesting this.
Review URL: https://chromiumcodereview.appspot.com//10052027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6602 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 20:30:37 +00:00
regis@google.com fce1a7e45e Fix lazy initialization of static fields (issue 2472).
Review URL: https://chromiumcodereview.appspot.com//10050022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6438 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 21:24:17 +00:00
asiva@google.com 8f208ad7ca Wire GrowableArray to use the internal VM object.
This also fixes issue (5526318 : Make access to GrowableArray objects through the dart api more efficient)
Review URL: https://chromiumcodereview.appspot.com//10012042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6341 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 21:50:53 +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
asiva@google.com c27cec5b6e - 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.

- Remove registration of code objects into the code index table.
Review URL: https://chromiumcodereview.appspot.com//9791048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6302 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:44:48 +00:00
srdjan@google.com 1125846660 When checking against non-parametrized types use a cache to hold result tuples (class, result). That cache is stored in the instruction stream. Currently implemented for instanceof, ia32 only. Should migrate to other type tests and architectures.
70x improvement on a benchmark (similar to what is seen in html _unwrap).
Review URL: https://chromiumcodereview.appspot.com//10010029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6281 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 16:05:55 +00:00
regis@google.com 9ff0afa50e Do not require upper bounds to be resolved and finalized before comparing them
between the expected and actual factory class (issue 2431).
Add test.
Review URL: https://chromiumcodereview.appspot.com//10008017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6236 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 18:11:42 +00:00
turnidge@google.com c0d7f96409 Remove many calls to Isolate::Current() in the dart embedding api by
passing the isolate explicitly.
Review URL: https://chromiumcodereview.appspot.com//9956133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6193 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 20:31:49 +00:00
turnidge@google.com e610ab662b Revert my last change due to problems on other platforms.
Review URL: https://chromiumcodereview.appspot.com//9968088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6129 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 17:51:20 +00:00
turnidge@google.com 11d29be5e1 Detect recursion during compilation of const constructors.
We now give a message like this:

    Illegal recursion in const constructor 'A.'.
Review URL: https://chromiumcodereview.appspot.com//9965081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6128 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-03 17:32:39 +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
srdjan@google.com a559ebbc68 Inline checks for super class and interfaces (checked mdoe improvements).
Review URL: https://chromiumcodereview.appspot.com//9863043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5898 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 19:40:08 +00:00