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

Unified Diff: runtime/vm/snapshot.cc

Issue 1016503005: Rename NoGCScope -> NoSafepointScope. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 44580)
+++ runtime/vm/snapshot.cc (working copy)
@@ -496,7 +496,7 @@
// TODO(asiva): Add a check here to ensure we have the right heap
// size for the full snapshot being read.
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
HeapLocker hl(isolate, old_space());
// Read in all the objects stored in the object store.
@@ -591,7 +591,7 @@
#define ALLOC_NEW_OBJECT_WITH_LEN(type, length) \
ASSERT(kind_ == Snapshot::kFull); \
- ASSERT(isolate()->no_gc_scope_depth() != 0); \
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0); \
Raw##type* obj = reinterpret_cast<Raw##type*>( \
AllocateUninitialized(k##type##Cid, type::InstanceSize(length))); \
obj->StoreSmi(&(obj->ptr()->length_), Smi::New(length)); \
@@ -625,7 +625,7 @@
RawTokenStream* SnapshotReader::NewTokenStream(intptr_t len) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
stream_ = reinterpret_cast<RawTokenStream*>(
AllocateUninitialized(kTokenStreamCid, TokenStream::InstanceSize()));
uint8_t* array = const_cast<uint8_t*>(CurrentBufferAddress());
@@ -643,7 +643,7 @@
RawContext* SnapshotReader::NewContext(intptr_t num_variables) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawContext* obj = reinterpret_cast<RawContext*>(
AllocateUninitialized(kContextCid, Context::InstanceSize(num_variables)));
obj->ptr()->num_variables_ = num_variables;
@@ -653,7 +653,7 @@
RawClass* SnapshotReader::NewClass(intptr_t class_id) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
if (class_id < kNumPredefinedCids) {
ASSERT((class_id >= kInstanceCid) &&
(class_id <= kNullCid));
@@ -672,7 +672,7 @@
RawInstance* SnapshotReader::NewInstance() {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawInstance* obj = reinterpret_cast<RawInstance*>(
AllocateUninitialized(kObjectCid, Instance::InstanceSize()));
return obj;
@@ -681,7 +681,7 @@
RawMint* SnapshotReader::NewMint(int64_t value) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawMint* obj = reinterpret_cast<RawMint*>(
AllocateUninitialized(kMintCid, Mint::InstanceSize()));
obj->ptr()->value_ = value;
@@ -691,7 +691,7 @@
RawDouble* SnapshotReader::NewDouble(double value) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawDouble* obj = reinterpret_cast<RawDouble*>(
AllocateUninitialized(kDoubleCid, Double::InstanceSize()));
obj->ptr()->value_ = value;
@@ -701,7 +701,7 @@
RawTypedData* SnapshotReader::NewTypedData(intptr_t class_id, intptr_t len) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
const intptr_t lengthInBytes = len * TypedData::ElementSizeInBytes(class_id);
RawTypedData* obj = reinterpret_cast<RawTypedData*>(
AllocateUninitialized(class_id, TypedData::InstanceSize(lengthInBytes)));
@@ -712,7 +712,7 @@
#define ALLOC_NEW_OBJECT(type) \
ASSERT(kind_ == Snapshot::kFull); \
- ASSERT(isolate()->no_gc_scope_depth() != 0); \
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0); \
return reinterpret_cast<Raw##type*>( \
AllocateUninitialized(k##type##Cid, type::InstanceSize())); \
@@ -810,7 +810,7 @@
RawFloat32x4* SnapshotReader::NewFloat32x4(float v0, float v1, float v2,
float v3) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawFloat32x4* obj = reinterpret_cast<RawFloat32x4*>(
AllocateUninitialized(kFloat32x4Cid, Float32x4::InstanceSize()));
obj->ptr()->value_[0] = v0;
@@ -824,7 +824,7 @@
RawInt32x4* SnapshotReader::NewInt32x4(uint32_t v0, uint32_t v1, uint32_t v2,
uint32_t v3) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawInt32x4* obj = reinterpret_cast<RawInt32x4*>(
AllocateUninitialized(kInt32x4Cid, Int32x4::InstanceSize()));
obj->ptr()->value_[0] = v0;
@@ -837,7 +837,7 @@
RawFloat64x2* SnapshotReader::NewFloat64x2(double v0, double v1) {
ASSERT(kind_ == Snapshot::kFull);
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
RawFloat64x2* obj = reinterpret_cast<RawFloat64x2*>(
AllocateUninitialized(kFloat64x2Cid, Float64x2::InstanceSize()));
obj->ptr()->value_[0] = v0;
@@ -896,7 +896,7 @@
RawObject* SnapshotReader::AllocateUninitialized(intptr_t class_id,
intptr_t size) {
- ASSERT(isolate()->no_gc_scope_depth() != 0);
+ ASSERT(isolate()->no_safepoint_scope_depth() != 0);
ASSERT(Utils::IsAligned(size, kObjectAlignment));
// Allocate memory where all words look like smis. This is currently
@@ -1220,7 +1220,7 @@
return;
}
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawClass* cls = class_table_->At(raw->GetClassId());
intptr_t class_id = cls->ptr()->id_;
ASSERT(class_id == raw->GetClassId());
@@ -1335,7 +1335,7 @@
// Write out the full snapshot.
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// Write out all the objects in the object store of the isolate which
// is the root set for all dart allocated objects at this point.
@@ -1390,7 +1390,7 @@
intptr_t ForwardList::MarkAndAddObject(RawObject* raw, SerializeState state) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
intptr_t object_id = next_object_id();
ASSERT(object_id <= kMaxObjectId);
uword value = 0;
@@ -1407,7 +1407,7 @@
void ForwardList::UnmarkAll() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
for (intptr_t id = first_object_id(); id < next_object_id(); ++id) {
const Node* node = NodeForObjectId(id);
RawObject* raw = node->raw();
@@ -1422,7 +1422,7 @@
// - VM internal class (from VM isolate): (index of class in vm isolate | 0x3)
// - Object that has already been written: (negative id in stream | 0x3)
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// First check if it is a Smi (i.e not a heap object).
if (!rawobj->IsHeapObject()) {
@@ -1524,7 +1524,7 @@
// (object size in multiples of kObjectAlignment | 0x1)
// serialized fields of the object
// ......
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
uword tags = raw->ptr()->tags_;
ASSERT(SerializedHeaderTag::decode(tags) == kObjectId);
intptr_t object_id = SerializedHeaderData::decode(tags);
@@ -1915,7 +1915,7 @@
// Write out the library object.
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// Write out the library object.
WriteObject(lib.raw());
@@ -1949,7 +1949,7 @@
// the message.
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
WriteObject(obj.raw());
UnmarkAll();
} else {
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698