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

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

Issue 1408653002: Skip making code pages temporarily writable when finalizing the VM isolate loaded from precompiled … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 948
949 // Set up names for object array and one byte string class which are 949 // Set up names for object array and one byte string class which are
950 // pre-allocated in the vm isolate also. 950 // pre-allocated in the vm isolate also.
951 cls = isolate->object_store()->array_class(); 951 cls = isolate->object_store()->array_class();
952 cls.set_name(Symbols::_List()); 952 cls.set_name(Symbols::_List());
953 cls = isolate->object_store()->one_byte_string_class(); 953 cls = isolate->object_store()->one_byte_string_class();
954 cls.set_name(Symbols::OneByteString()); 954 cls.set_name(Symbols::OneByteString());
955 955
956 { 956 {
957 ASSERT(isolate == Dart::vm_isolate()); 957 ASSERT(isolate == Dart::vm_isolate());
958 WritableVMIsolateScope scope(Thread::Current()); 958 bool include_code_pages = !Dart::IsRunningPrecompiledCode();
959 WritableVMIsolateScope scope(Thread::Current(), include_code_pages);
959 PremarkingVisitor premarker(isolate); 960 PremarkingVisitor premarker(isolate);
960 ASSERT(isolate->heap()->UsedInWords(Heap::kNew) == 0); 961 ASSERT(isolate->heap()->UsedInWords(Heap::kNew) == 0);
961 isolate->heap()->IterateOldObjects(&premarker); 962 isolate->heap()->IterateOldObjects(&premarker);
962 // Make the VM isolate read-only again after setting all objects as marked. 963 // Make the VM isolate read-only again after setting all objects as marked.
963 } 964 }
964 } 965 }
965 966
966 967
967 void Object::InitVmIsolateSnapshotObjectTable(intptr_t len) { 968 void Object::InitVmIsolateSnapshotObjectTable(intptr_t len) {
968 ASSERT(Isolate::Current() == Dart::vm_isolate()); 969 ASSERT(Isolate::Current() == Dart::vm_isolate());
(...skipping 20684 matching lines...) Expand 10 before | Expand all | Expand 10 after
21653 return tag_label.ToCString(); 21654 return tag_label.ToCString();
21654 } 21655 }
21655 21656
21656 21657
21657 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21658 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21658 Instance::PrintJSONImpl(stream, ref); 21659 Instance::PrintJSONImpl(stream, ref);
21659 } 21660 }
21660 21661
21661 21662
21662 } // namespace dart 21663 } // namespace dart
OLDNEW
« runtime/vm/heap.h ('K') | « runtime/vm/heap_test.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698