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

Side by Side Diff: runtime/vm/object.cc

Issue 150923002: Mark optimized code that used CHA for optimization so that lazy class 'finalization' does not inval… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« runtime/vm/cha.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 9805 matching lines...) Expand 10 before | Expand all | Expand 10 after
9816 void Code::set_is_optimized(bool value) const { 9816 void Code::set_is_optimized(bool value) const {
9817 set_state_bits(OptimizedBit::update(value, raw_ptr()->state_bits_)); 9817 set_state_bits(OptimizedBit::update(value, raw_ptr()->state_bits_));
9818 } 9818 }
9819 9819
9820 9820
9821 void Code::set_is_alive(bool value) const { 9821 void Code::set_is_alive(bool value) const {
9822 set_state_bits(AliveBit::update(value, raw_ptr()->state_bits_)); 9822 set_state_bits(AliveBit::update(value, raw_ptr()->state_bits_));
9823 } 9823 }
9824 9824
9825 9825
9826 void Code::set_has_used_cha(bool value) const {
9827 set_state_bits(UsedCHABit::update(value, raw_ptr()->state_bits_));
9828 }
9829
9830
9826 void Code::set_stackmaps(const Array& maps) const { 9831 void Code::set_stackmaps(const Array& maps) const {
9827 ASSERT(maps.IsOld()); 9832 ASSERT(maps.IsOld());
9828 StorePointer(&raw_ptr()->stackmaps_, maps.raw()); 9833 StorePointer(&raw_ptr()->stackmaps_, maps.raw());
9829 } 9834 }
9830 9835
9831 9836
9832 void Code::set_deopt_info_array(const Array& array) const { 9837 void Code::set_deopt_info_array(const Array& array) const {
9833 ASSERT(array.IsOld()); 9838 ASSERT(array.IsOld());
9834 StorePointer(&raw_ptr()->deopt_info_array_, array.raw()); 9839 StorePointer(&raw_ptr()->deopt_info_array_, array.raw());
9835 } 9840 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
9989 ASSERT(Object::code_class() != Class::null()); 9994 ASSERT(Object::code_class() != Class::null());
9990 Code& result = Code::Handle(); 9995 Code& result = Code::Handle();
9991 { 9996 {
9992 uword size = Code::InstanceSize(pointer_offsets_length); 9997 uword size = Code::InstanceSize(pointer_offsets_length);
9993 RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld); 9998 RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld);
9994 NoGCScope no_gc; 9999 NoGCScope no_gc;
9995 result ^= raw; 10000 result ^= raw;
9996 result.set_pointer_offsets_length(pointer_offsets_length); 10001 result.set_pointer_offsets_length(pointer_offsets_length);
9997 result.set_is_optimized(false); 10002 result.set_is_optimized(false);
9998 result.set_is_alive(true); 10003 result.set_is_alive(true);
10004 result.set_has_used_cha(false);
9999 result.set_comments(Comments::New(0)); 10005 result.set_comments(Comments::New(0));
10000 result.set_pc_descriptors(Object::empty_descriptors()); 10006 result.set_pc_descriptors(Object::empty_descriptors());
10001 } 10007 }
10002 return result.raw(); 10008 return result.raw();
10003 } 10009 }
10004 10010
10005 10011
10006 RawCode* Code::FinalizeCode(const char* name, 10012 RawCode* Code::FinalizeCode(const char* name,
10007 Assembler* assembler, 10013 Assembler* assembler,
10008 bool optimized) { 10014 bool optimized) {
(...skipping 7104 matching lines...) Expand 10 before | Expand all | Expand 10 after
17113 return "_MirrorReference"; 17119 return "_MirrorReference";
17114 } 17120 }
17115 17121
17116 17122
17117 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 17123 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
17118 Instance::PrintToJSONStream(stream, ref); 17124 Instance::PrintToJSONStream(stream, ref);
17119 } 17125 }
17120 17126
17121 17127
17122 } // namespace dart 17128 } // namespace dart
OLDNEW
« runtime/vm/cha.cc ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698