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

Side by Side Diff: vm/snapshot.cc

Issue 11722026: Do not emit pointer information for embedded singleton VM Isolate objects while generating code. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « vm/raw_object.cc ('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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 uword tags = rawobj->ptr()->tags_; 1039 uword tags = rawobj->ptr()->tags_;
1040 if (SerializedHeaderTag::decode(tags) == kObjectId) { 1040 if (SerializedHeaderTag::decode(tags) == kObjectId) {
1041 intptr_t id = SerializedHeaderData::decode(tags); 1041 intptr_t id = SerializedHeaderData::decode(tags);
1042 WriteIndexedObject(id); 1042 WriteIndexedObject(id);
1043 return true; 1043 return true;
1044 } 1044 }
1045 1045
1046 // Now check if it is an object from the VM isolate (NOTE: premarked objects 1046 // Now check if it is an object from the VM isolate (NOTE: premarked objects
1047 // are considered to be objects in the VM isolate). These objects are shared 1047 // are considered to be objects in the VM isolate). These objects are shared
1048 // by all isolates. 1048 // by all isolates.
1049 if (rawobj->IsMarked()) { 1049 if (rawobj->IsVMHeapObject()) {
1050 HandleVMIsolateObject(rawobj); 1050 HandleVMIsolateObject(rawobj);
1051 return true; 1051 return true;
1052 } 1052 }
1053 1053
1054 // Check if the object is a Mint and could potentially be a Smi 1054 // Check if the object is a Mint and could potentially be a Smi
1055 // on other architectures (64 bit), if so write it out as int64_t value. 1055 // on other architectures (64 bit), if so write it out as int64_t value.
1056 if (rawobj->GetClassId() == kMintCid) { 1056 if (rawobj->GetClassId() == kMintCid) {
1057 int64_t value = reinterpret_cast<RawMint*>(rawobj)->ptr()->value_; 1057 int64_t value = reinterpret_cast<RawMint*>(rawobj)->ptr()->value_;
1058 const intptr_t kSmi64Bits = 62; 1058 const intptr_t kSmi64Bits = 62;
1059 const int64_t kSmi64Max = (static_cast<int64_t>(1) << kSmi64Bits) - 1; 1059 const int64_t kSmi64Max = (static_cast<int64_t>(1) << kSmi64Bits) - 1;
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 UnmarkAll(); 1315 UnmarkAll();
1316 isolate->set_long_jump_base(base); 1316 isolate->set_long_jump_base(base);
1317 } else { 1317 } else {
1318 isolate->set_long_jump_base(base); 1318 isolate->set_long_jump_base(base);
1319 ThrowException(exception_type(), exception_msg()); 1319 ThrowException(exception_type(), exception_msg());
1320 } 1320 }
1321 } 1321 }
1322 1322
1323 1323
1324 } // namespace dart 1324 } // namespace dart
OLDNEW
« no previous file with comments | « vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698