Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Issue 10825077: Change the stackmap builder API. (Closed)

Created:
8 years, 4 months ago by Kevin Millikin (Google)
Modified:
8 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

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= Committed: https://code.google.com/p/dart/source/detail?r=10043

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -74 lines) Patch
M runtime/vm/code_descriptors.h View 2 chunks +5 lines, -33 lines 2 comments Download
M runtime/vm/code_descriptors.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M runtime/vm/code_descriptors_test.cc View 3 chunks +69 lines, -31 lines 2 comments Download
M runtime/vm/flow_graph_compiler.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Kevin Millikin (Google)
8 years, 4 months ago (2012-07-30 14:54:40 UTC) #1
Vyacheslav Egorov (Google)
lgtm
8 years, 4 months ago (2012-07-30 15:03:45 UTC) #2
siva
DBC. https://chromiumcodereview.appspot.com/10825077/diff/1/runtime/vm/code_descriptors.h File runtime/vm/code_descriptors.h (right): https://chromiumcodereview.appspot.com/10825077/diff/1/runtime/vm/code_descriptors.h#newcode71 runtime/vm/code_descriptors.h:71: I would retain a StackmapBuilder class which has ...
8 years, 4 months ago (2012-07-31 19:03:00 UTC) #3
Kevin Millikin (Google)
8 years, 4 months ago (2012-08-01 09:34:33 UTC) #4
https://chromiumcodereview.appspot.com/10825077/diff/1/runtime/vm/code_descri...
File runtime/vm/code_descriptors.h (right):

https://chromiumcodereview.appspot.com/10825077/diff/1/runtime/vm/code_descri...
runtime/vm/code_descriptors.h:71: 
Thanks for the comment.

I agree with the naming issue (Slava raised it to), but a separate wrapper class
seems too heavy.  There will be exactly one call in the code to SetSlotAsObject,
one to IsSlotObject, and none at all to the other methods:

for (intptr_t i = 0; i < safepoints_.length(); ++i) {
  if (range->CanCover(safepoints_[i].position)) {
    safepoints_[i].stack_bitmap->Set(spill_index, true);
  }
}

(Replace Set(spill_index, true) by SetSlotAsObject(spill_index)).  It seems too
much to wrap the whole bitmap builder, when the interpretation is pretty obvious
in the code above.

I'll hold off on making any change for now, but a lightweight solution for
better naming might be a static function on the StackmapTableBuilder.

Powered by Google App Engine
This is Rietveld 408576698