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

Issue 9475031: Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code o… (Closed)

Created:
8 years, 9 months ago by srdjan
Modified:
8 years, 9 months ago
Reviewers:
hausner, siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code object that belongs to that function. That is not the case, there can be several Code object generated for the same function. "Renamed" "code()" to "CurrentCode()", use unoptimized_code where it is clear that we are using unoptimized code only. If compiled, there is a 1:1 correspondence between function and unoptimized code. Committed: https://code.google.com/p/dart/source/detail?r=4656

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -117 lines) Patch
M runtime/vm/code_generator.cc View 1 2 3 8 chunks +12 lines, -11 lines 0 comments Download
M runtime/vm/code_index_table.h View 1 2 3 4 2 chunks +19 lines, -22 lines 0 comments Download
M runtime/vm/code_index_table.cc View 1 2 3 7 chunks +15 lines, -25 lines 0 comments Download
M runtime/vm/code_index_table_test.cc View 1 2 3 2 chunks +3 lines, -7 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 3 6 chunks +17 lines, -14 lines 0 comments Download
M runtime/vm/dart_entry.cc View 1 2 3 4 chunks +9 lines, -18 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 6 chunks +12 lines, -6 lines 0 comments Download
M runtime/vm/disassembler_ia32.cc View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M runtime/vm/native_entry_test.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object.h View 1 2 3 3 chunks +8 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M runtime/vm/opt_code_generator_ia32.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/runtime_entry_test.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stack_frame.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/unit_test.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
srdjan
8 years, 9 months ago (2012-02-28 00:04:04 UTC) #1
hausner
lgtm https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/object.h File runtime/vm/object.h (right): https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/object.h#newcode1458 runtime/vm/object.h:1458: // It is not the only Code object ...
8 years, 9 months ago (2012-02-28 00:37:09 UTC) #2
siva
LGTM https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/code_index_table.h File runtime/vm/code_index_table.h (right): https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/code_index_table.h#newcode128 runtime/vm/code_index_table.h:128: // Add information about a large code (entrypoint, ...
8 years, 9 months ago (2012-02-28 00:52:20 UTC) #3
srdjan
8 years, 9 months ago (2012-02-28 01:18:58 UTC) #4
https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/code_inde...
File runtime/vm/code_index_table.h (right):

https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/code_inde...
runtime/vm/code_index_table.h:128: // Add information about a large code
(entrypoint, size, code object)
On 2012/02/28 00:52:20, asiva wrote:
> large code object (entrypoint...

Done.

https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/code_inde...
runtime/vm/code_index_table.h:129: // to the large code list.
On 2012/02/28 00:52:20, asiva wrote:
> large code objects list.

Done.

https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/code_inde...
runtime/vm/code_index_table.h:132: // Helper function to add a acode to the
list.
On 2012/02/28 00:52:20, asiva wrote:
> add a code object to the list.

Done.

https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/object.h
File runtime/vm/object.h (right):

https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/object.h#...
runtime/vm/object.h:1458: // It is not the only Code object that point to this
function.
On 2012/02/28 00:37:09, hausner wrote:
> points

Done.

https://chromiumcodereview.appspot.com/9475031/diff/7004/runtime/vm/object.h#...
runtime/vm/object.h:1462: RawCode* code() const { return raw_ptr()->code_; }
On 2012/02/28 00:52:20, asiva wrote:
> Why do you want to retain this accessor. There seems to be only one place
where
> this is used HasOptimizedCode() you could just access the field in that
> function.

Done.

Powered by Google App Engine
This is Rietveld 408576698