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

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

Issue 1012333002: Keep zone cached in SnapshotReader to allow removing ZoneHandle(Isolate*) interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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
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 6639 matching lines...) Expand 10 before | Expand all | Expand 10 after
6650 a.SetAt(count++, *deopt_id_to_ic_data[i]); 6650 a.SetAt(count++, *deopt_id_to_ic_data[i]);
6651 } 6651 }
6652 } 6652 }
6653 set_ic_data_array(a); 6653 set_ic_data_array(a);
6654 } 6654 }
6655 } 6655 }
6656 6656
6657 6657
6658 void Function::RestoreICDataMap( 6658 void Function::RestoreICDataMap(
6659 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data) const { 6659 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data) const {
6660 Isolate* isolate = Isolate::Current(); 6660 Zone* zone = Thread::Current()->zone();
6661 const Array& saved_icd = Array::Handle(isolate, ic_data_array()); 6661 const Array& saved_icd = Array::Handle(zone, ic_data_array());
6662 if (saved_icd.Length() == 0) { 6662 if (saved_icd.Length() == 0) {
6663 deopt_id_to_ic_data->Clear(); 6663 deopt_id_to_ic_data->Clear();
6664 return; 6664 return;
6665 } 6665 }
6666 ICData& icd = ICData::Handle(); 6666 ICData& icd = ICData::Handle();
6667 icd ^= saved_icd.At(saved_icd.Length() - 1); 6667 icd ^= saved_icd.At(saved_icd.Length() - 1);
6668 const intptr_t len = icd.deopt_id() + 1; 6668 const intptr_t len = icd.deopt_id() + 1;
6669 deopt_id_to_ic_data->SetLength(len); 6669 deopt_id_to_ic_data->SetLength(len);
6670 for (intptr_t i = 0; i < len; i++) { 6670 for (intptr_t i = 0; i < len; i++) {
6671 (*deopt_id_to_ic_data)[i] = NULL; 6671 (*deopt_id_to_ic_data)[i] = NULL;
6672 } 6672 }
6673 for (intptr_t i = 0; i < saved_icd.Length(); i++) { 6673 for (intptr_t i = 0; i < saved_icd.Length(); i++) {
6674 ICData& icd = ICData::ZoneHandle(isolate); 6674 ICData& icd = ICData::ZoneHandle(zone);
6675 icd ^= saved_icd.At(i); 6675 icd ^= saved_icd.At(i);
6676 (*deopt_id_to_ic_data)[icd.deopt_id()] = &icd; 6676 (*deopt_id_to_ic_data)[icd.deopt_id()] = &icd;
6677 } 6677 }
6678 } 6678 }
6679 6679
6680 6680
6681 void Function::set_ic_data_array(const Array& value) const { 6681 void Function::set_ic_data_array(const Array& value) const {
6682 StorePointer(&raw_ptr()->ic_data_array_, value.raw()); 6682 StorePointer(&raw_ptr()->ic_data_array_, value.raw());
6683 } 6683 }
6684 6684
(...skipping 14069 matching lines...) Expand 10 before | Expand all | Expand 10 after
20754 return tag_label.ToCString(); 20754 return tag_label.ToCString();
20755 } 20755 }
20756 20756
20757 20757
20758 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20758 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20759 Instance::PrintJSONImpl(stream, ref); 20759 Instance::PrintJSONImpl(stream, ref);
20760 } 20760 }
20761 20761
20762 20762
20763 } // namespace dart 20763 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698