Commit Graph

34 Commits

Author SHA1 Message Date
John McCutchan b5259257bd Introduce CodeSourceMap object to hold pc -> token position mappings
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1634863002 .
2016-01-26 13:07:22 -08:00
Ryan Macnak 238c01b943 Precompilation: omit pc descriptors without a try index.
precompiled dart2js x64 24749045 -> 23713811 (-4.18%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1584393003 .
2016-01-19 14:53:23 -08:00
Srdjan Mitrovic 6f53350611 Move deopt_id and related helpers/definitions from Isolate to Thread
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/1390153004 .
2015-10-13 10:08:14 -07:00
Ryan Macnak 300a2f34cf Delta encode pc descriptors, and combine pc kind and try index into single field.
328.3kB -> 126.8kB (-61.4%) mirrors_reader_test

Avoid quadratic var-int decoding in extracting edge counters by decoding once into a temporary list.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//1128183007
2015-05-18 11:04:45 -07:00
rmacnak@google.com 848ad67ee1 Revert "Delta encode pc descriptors."
32% regression on dart2js. Edge counters need to be redone first.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45776 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 20:24:47 +00:00
rmacnak@google.com ab784887a7 Delta encode pc descriptors.
328.3kB -> 160.1kB (-51.2%) for mirrors_reader_test

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45715 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 20:27:21 +00:00
srdjan@google.com 5692c024bb Fix crash in x64: handler's pc-offset must be in 32-bit uword range ( x64 -1 is out of range). Use kInvalidPcOffset = 0.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44443 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 21:40:05 +00:00
srdjan@google.com b232f6d070 Fix issue 22800: Unreachable exception handlers do not have their handler types initialized. Initialize the handler info for unreachable handlers as well (instead of crashing).
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44440 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 19:18:18 +00:00
fschneider@google.com dd824bd017 Store pc offset instead of absolute pc in the pc descriptors.
This saves space on 64-bit platforms as the offset is stored
as a uint32_t compared to a pointer-size absolute address.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43100 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 12:30:11 +00:00
srdjan@google.com 054eeb87a6 Reduce number of times a deopt-id is computed.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40716 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 16:42:50 +00:00
zra@google.com c686b2c624 Finishes removing intptr_t from raw object fields.
Also removes {Read,Write}IntptrValue from the snapshot reader and writer.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40048 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 19:51:22 +00:00
srdjan@google.com 9c8a395f6f More PcDescriptor cleanups, compress recors if no try index is needed (frequent).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38242 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 17:07:03 +00:00
srdjan@google.com 2bb77cd8d5 Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression of PcDescriptors).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38032 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:25:45 +00:00
fschneider@google.com cc9e3b8068 Introduce a lazy-compile stub for functions.
The function's code pointer is either a lazy-compile stub
or the compiled code. The function is compiled on invocation.

There is no need to check for null when invoking a function. This means
one check less when invoking functions via a stub. For this I added a  LazyCompile
stub.

Additional cleanup in Stackmap and PcDescriptors (remove unused code pointer,
and changed smi-lengh into a raw integer).

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34643 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 12:37:48 +00:00
srdjan@google.com d78737298c Last cleanup int -> intptr_t. Also removed a hack (boolean is not an integer).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28372 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 18:54:00 +00:00
srdjan@google.com 849e8b0385 Make sure that all objects store in the Code object live in old space.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25353 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 18:38:03 +00:00
asiva@google.com f4fe42c280 Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
srdjan@google.com d56766f251 More ^= to |=
Review URL: https://codereview.chromium.org//11941021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17308 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:43:19 +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
kmillikin@google.com d7115e5eda Remove deoptimization index PC descriptors.
Put the PC (offset) of the deoptimization point and the deoptimization
reason in the DeoptInfo table.  The table entries are now triples of
(PC offset, info, reason).

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13056 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 10:16:22 +00:00
srdjan@google.com caf04303f7 Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This assumption (verified with Todd and Gilad) simplifies the implementation of lazy deoptimization considerably.
Add flag --deoptimize-alot, which will lazily deoptimize all live optimized frames. Currently only the presence of deoptimization information is checked.

Add kDeoptAfter deoptimization point, which is the continuation for lazy deoptimization, after a call. Rename kDeopt to kDeoptBefore.

Removed a tests case that called into a native without properly setting up a Dart frame (Ok-d by Siva).

Native functions are not optimizable.

TODO: Split deoptimization information from DeoptimizationStubs. Check for redundant PcDescriptor information (what can be merged, especially at calls).
Review URL: https://chromiumcodereview.appspot.com//10885039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11642 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:53:46 +00:00
kmillikin@google.com 8122966c80 Put live register bits in stackmaps.
Add a count of live registers to each stackmap and add bits describing the
registers.  This allows untagged values in general purpose registers at
safepoints.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11595 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 10:20:26 +00:00
kmillikin@google.com a953c03b36 Use the location summary to represent safepoint information.
Pass a LocationSummary everywhere instead of a BitmapBuilder.  The
LocationSummary contains information about live registers.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11219 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 10:08:37 +00:00
kmillikin@google.com 57f5dbafd6 Give a length field to stack bitmaps.
The bitmaps describing the stack have an explicit length field.  It is now
an assertion failure to read bits outside the length --- they are no longer
assumed to be false.

Also remove an unused method and simplify the implementation of
BitmapBuilder by removing an embedded member that was always referred to via
a pointer.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11138 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 12:42:54 +00:00
kmillikin@google.com 94a5b82f60 Make stackmaps store their actual length.
This allows stackmaps with varying lengths in the same function, necessary
for the way we plan to support bitmaps for saved live registers.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11019 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 08:43:32 +00:00
kmillikin@google.com 6c7d65e482 Reduce space used for stackmaps.
Only allocate space for the bits covered by the stackmap, instead of
for the backing store of the utility class that built it.  Fix a bug
where the size in bytes was multiplied by the word size in bytes.

Also do some cleanup of the stackmap code and renaming in the tests.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10870 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 07:57:47 +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
regis@google.com 6f5281c404 Get rid of ast node ids.
Rename cid to deopt_id.
Review URL: https://chromiumcodereview.appspot.com//10832150

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10306 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 20:24:03 +00:00
srdjan@google.com 85f242dbb1 Adding deopt info to code object.
Review URL: https://chromiumcodereview.appspot.com//10830131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10189 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 18:28:11 +00:00
kmillikin@google.com cc619aa2c9 Change the stackmap builder API.
It is inconvenient for the stackmap table builder to use a singleton bitmap
for all safepoints in a code object.  Instead, split the bitmap from the
table builder and allow a bitmap per safepoint.

Take this opportunity to rename StackmapBuilder => StackmapTableBuilder
because it builds the entire table of stackmaps for a code object.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10043 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 08:32:33 +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
asiva@google.com e360e4d1c9 Second set of changes for implementation of stack map support.
- Added functionality to be able to build stack maps in the compiler and register them into the Code object during Code finalization.
- Merged code_generator_ia32_test.cc and code_generator_x64_test.cc into code_generator_test.cc as the two files were identical.
Review URL: https://chromiumcodereview.appspot.com//9721006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5764 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 01:27:35 +00:00