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

Unified Diff: runtime/vm/object.h

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/heap_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 44580)
+++ runtime/vm/object.h (working copy)
@@ -659,8 +659,8 @@
}
// Provides non-const access to non-pointer fields within the object. Such
- // access does not need a write barrier, but it is *not* GC-safe (since the
- // object might move), hence must be fully contained within a NoGCScope.
+ // access does not need a write barrier, but it is *not* GC-safe, since the
+ // object might move, hence must be fully contained within a NoSafepointScope.
template<typename FieldType>
FieldType* UnsafeMutableNonPointer(const FieldType* addr) const {
// Allow pointers at the end of variable-length data, and disallow pointers
@@ -667,8 +667,8 @@
// within the header word.
ASSERT(Contains(reinterpret_cast<uword>(addr) - 1) &&
Contains(reinterpret_cast<uword>(addr) - kWordSize));
- // At least check that there is a NoGCScope, and hope it's big enough.
- ASSERT(Isolate::Current()->no_gc_scope_depth() > 0);
+ // At least check that there is a NoSafepointScope and hope it's big enough.
+ ASSERT(Isolate::Current()->no_safepoint_scope_depth() > 0);
return const_cast<FieldType*>(addr);
}
@@ -3281,7 +3281,7 @@
int64_t deopt_id,
int64_t token_pos, // Or deopt reason.
intptr_t try_index) const { // Or deopt index.
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawPcDescriptors::PcDescriptorRec* rec = recAt(index);
rec->set_pc_offset(pc_offset);
rec->set_kind(kind);
@@ -3345,23 +3345,23 @@
}
uword PcOffset() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return descriptors_.recAt(current_ix_)->pc_offset();
}
intptr_t DeoptId() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return descriptors_.recAt(current_ix_)->deopt_id();
}
intptr_t TokenPos() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return descriptors_.recAt(current_ix_)->token_pos();
}
intptr_t TryIndex() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return descriptors_.recAt(current_ix_)->try_index();
}
RawPcDescriptors::Kind Kind() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return descriptors_.recAt(current_ix_)->kind();
}
@@ -3380,7 +3380,7 @@
// Moves to record that matches kind_mask_.
void MoveToMatching() {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
while (next_ix_ < descriptors_.Length()) {
const RawPcDescriptors::PcDescriptorRec& rec =
*descriptors_.recAt(next_ix_);
@@ -4144,7 +4144,7 @@
static RawCode* FindCode(uword pc, int64_t timestamp);
int32_t GetPointerOffsetAt(int index) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return *PointerOffsetAddrAt(index);
}
intptr_t GetTokenIndexOfPC(uword pc) const;
@@ -4255,7 +4255,7 @@
return &UnsafeMutableNonPointer(raw_ptr()->data())[index];
}
void SetPointerOffsetAt(int index, int32_t offset_in_instructions) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
*PointerOffsetAddrAt(index) = offset_in_instructions;
}
@@ -6076,7 +6076,7 @@
}
static void SetCharAt(const String& str, intptr_t index, uint8_t code_unit) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
*CharAddr(str, index) = code_unit;
}
static RawOneByteString* EscapeSpecialCharacters(const String& str);
@@ -6207,7 +6207,7 @@
}
static void SetCharAt(const String& str, intptr_t index, uint16_t ch) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
*CharAddr(str, index) = ch;
}
@@ -6313,7 +6313,7 @@
class ExternalOneByteString : public AllStatic {
public:
static uint16_t CharAt(const String& str, intptr_t index) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return *CharAddr(str, index);
}
@@ -6393,7 +6393,7 @@
class ExternalTwoByteString : public AllStatic {
public:
static uint16_t CharAt(const String& str, intptr_t index) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return *CharAddr(str, index);
}
@@ -6521,7 +6521,7 @@
return *ObjectAddr(index);
}
void SetAt(intptr_t index, const Object& value) const {
- // TODO(iposva): Add storing NoGCScope.
+ // TODO(iposva): Add storing NoSafepointScope.
StorePointer(ObjectAddr(index), value.raw());
}
@@ -6653,7 +6653,7 @@
class GrowableObjectArray : public Instance {
public:
intptr_t Capacity() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
ASSERT(!IsNull());
return Smi::Value(DataArray()->length_);
}
@@ -6673,7 +6673,7 @@
}
RawObject* At(intptr_t index) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
ASSERT(!IsNull());
ASSERT(index < Length());
return *ObjectAddr(index);
@@ -6682,7 +6682,7 @@
ASSERT(!IsNull());
ASSERT(index < Length());
- // TODO(iposva): Add storing NoGCScope.
+ // TODO(iposva): Add storing NoSafepointScope.
DataStorePointer(ObjectAddr(index), value.raw());
}
@@ -6931,11 +6931,11 @@
#define TYPED_GETTER_SETTER(name, type) \
type Get##name(intptr_t byte_offset) const { \
- NoGCScope no_gc; \
+ NoSafepointScope no_safepoint; \
return *reinterpret_cast<type*>(DataAddr(byte_offset)); \
} \
void Set##name(intptr_t byte_offset, type value) const { \
- NoGCScope no_gc; \
+ NoSafepointScope no_safepoint; \
*reinterpret_cast<type*>(DataAddr(byte_offset)) = value; \
}
TYPED_GETTER_SETTER(Int8, int8_t)
@@ -7004,7 +7004,7 @@
length_in_bytes,
dst.LengthInBytes()));
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
if (length_in_bytes > 0) {
memmove(dst.DataAddr(dst_offset_in_bytes),
src.DataAddr(src_offset_in_bytes),
@@ -7025,7 +7025,7 @@
length_in_bytes,
dst.LengthInBytes()));
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
if (length_in_bytes > 0) {
uint8_t* dst_data =
reinterpret_cast<uint8_t*>(dst.DataAddr(dst_offset_in_bytes));
@@ -7755,7 +7755,7 @@
intptr_t Instance::GetNativeField(int index) const {
ASSERT(IsValidNativeIndex(index));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawTypedData* native_fields =
reinterpret_cast<RawTypedData*>(*NativeFieldsAddr());
if (native_fields == TypedData::null()) {
@@ -7767,7 +7767,7 @@
void Instance::GetNativeFields(uint16_t num_fields,
intptr_t* field_values) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
ASSERT(num_fields == NumNativeFields());
ASSERT(field_values != NULL);
RawTypedData* native_fields =
« no previous file with comments | « runtime/vm/heap_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698