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

Issue 10021070: Move type check elimination from backend to graph builder in new compiler. (Closed)

Created:
8 years, 8 months ago by regis
Modified:
8 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Move type check elimination from backend to graph builder in new compiler. Committed: https://code.google.com/p/dart/source/detail?r=6713

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -149 lines) Patch
M runtime/vm/flow_graph_builder.h View 2 chunks +17 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 8 chunks +163 lines, -98 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 5 chunks +5 lines, -44 lines 0 comments Download
M runtime/vm/intermediate_language.h View 4 chunks +13 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
regis
8 years, 8 months ago (2012-04-18 21:24:23 UTC) #1
srdjan
LGTM https://chromiumcodereview.appspot.com/10021070/diff/1/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://chromiumcodereview.appspot.com/10021070/diff/1/runtime/vm/flow_graph_builder.cc#newcode300 runtime/vm/flow_graph_builder.cc:300: (literal_value.raw() == Object::transition_sentinel())); Why is this assert needed?
8 years, 8 months ago (2012-04-18 21:33:15 UTC) #2
regis
8 years, 8 months ago (2012-04-18 21:58:30 UTC) #3
Thanks!

https://chromiumcodereview.appspot.com/10021070/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_builder.cc (right):

https://chromiumcodereview.appspot.com/10021070/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_builder.cc:300: (literal_value.raw() ==
Object::transition_sentinel()));
On 2012/04/18 21:33:16, srdjan wrote:
> Why is this assert needed?

The assert is only to document the fact that we eliminate type checks with
sentinels as well, not just null. I have added this comment:

      // There are only three instances that can be of Class Null:
      // Object::null(), Object::sentinel(), and Object::transition_sentinel().
      // The inline code and run time code performing the type check will never
      // encounter the 2 sentinel values. The type check of a sentinel value
      // will always be eliminated here, because these sentinel values can only
      // be encountered as constants, never as actual value of an heap object
      // being type checked.

Powered by Google App Engine
This is Rietveld 408576698