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

Unified Diff: runtime/vm/object.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/object.h ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 44580)
+++ runtime/vm/object.cc (working copy)
@@ -387,7 +387,7 @@
// Should only be run by the vm isolate.
ASSERT(isolate == Dart::vm_isolate());
- // TODO(iposva): NoGCScope needs to be added here.
+ // TODO(iposva): NoSafepointScope needs to be added here.
ASSERT(class_class() == null_);
// Initialize the static vtable values.
{
@@ -850,7 +850,7 @@
void Object::MakeUnusedSpaceTraversable(const Object& obj,
intptr_t original_size,
intptr_t used_size) {
- ASSERT(Isolate::Current()->no_gc_scope_depth() > 0);
+ ASSERT(Isolate::Current()->no_safepoint_scope_depth() > 0);
ASSERT(!obj.IsNull());
ASSERT(original_size >= used_size);
if (original_size > used_size) {
@@ -1680,7 +1680,7 @@
} else {
isolate->class_table()->UpdateAllocatedOld(cls_id, size);
}
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
InitializeObject(address, cls_id, size);
RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
@@ -1729,7 +1729,7 @@
const Class& cls = Class::Handle(orig.clazz());
intptr_t size = orig.raw()->Size();
RawObject* raw_clone = Object::Allocate(cls.id(), size, space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// TODO(koda): This will trip when we start allocating black.
// Revisit code below at that point, to account for the new write barrier.
ASSERT(!raw_clone->IsMarked());
@@ -1851,7 +1851,7 @@
RawObject* raw = Object::Allocate(Class::kClassId,
Class::InstanceSize(),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
FakeObject fake;
@@ -2950,7 +2950,7 @@
RawObject* raw = Object::Allocate(Class::kClassId,
Class::InstanceSize(),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
FakeInstance fake;
@@ -3889,7 +3889,7 @@
}
if (name.IsSymbol()) {
// Quick Symbol compare.
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
for (intptr_t i = 0; i < len; i++) {
function ^= funcs.At(i);
if (function.name() == name.raw()) {
@@ -4776,7 +4776,7 @@
RawObject* raw = Object::Allocate(TypeArguments::kClassId,
TypeArguments::InstanceSize(len),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
// Length must be set before we start storing into the array.
result.SetLength(len);
@@ -6090,7 +6090,7 @@
bool Function::IsImplicitStaticClosureFunction(RawFunction* func) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
uint32_t kind_tag = func->ptr()->kind_tag_;
if (KindBits::decode(kind_tag) != RawFunction::kClosureFunction) {
return false;
@@ -7939,7 +7939,7 @@
result.SetPrivateKey(private_key);
const Array& token_objects = Array::Handle(data.MakeTokenObjectsArray());
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result.SetStream(stream);
result.SetTokenObjects(token_objects);
}
@@ -10482,7 +10482,7 @@
RawObject* raw = Object::Allocate(Instructions::kClassId,
aligned_size,
Heap::kCode);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.set_size(size);
}
@@ -10535,7 +10535,7 @@
RawObject* raw = Object::Allocate(PcDescriptors::kClassId,
size,
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(num_descriptors);
result.SetRecordSizeInBytes(rec_size);
@@ -10698,7 +10698,7 @@
int byte_index = bit_index >> kBitsPerByteLog2;
int bit_remainder = bit_index & (kBitsPerByte - 1);
uint8_t byte_mask = 1U << bit_remainder;
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
uint8_t* byte_addr = UnsafeMutableNonPointer(&raw_ptr()->data()[byte_index]);
if (value) {
*byte_addr |= byte_mask;
@@ -10730,7 +10730,7 @@
RawObject* raw = Object::Allocate(Stackmap::kClassId,
Stackmap::InstanceSize(length),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(length);
}
@@ -10954,7 +10954,7 @@
RawObject* raw = Object::Allocate(LocalVarDescriptors::kClassId,
size,
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.StoreNonPointer(&result.raw_ptr()->num_entries_, num_variables);
}
@@ -10978,7 +10978,7 @@
bool needs_stacktrace,
bool has_catch_all) const {
ASSERT((try_index >= 0) && (try_index < num_entries()));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawExceptionHandlers::HandlerInfo* info =
UnsafeMutableNonPointer(&raw_ptr()->data()[try_index]);
info->outer_try_index = outer_try_index;
@@ -11059,7 +11059,7 @@
RawObject* raw = Object::Allocate(ExceptionHandlers::kClassId,
size,
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.StoreNonPointer(&result.raw_ptr()->num_entries_, num_handlers);
}
@@ -11138,13 +11138,13 @@
intptr_t DeoptInfo::FromIndex(intptr_t index) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return *(EntryAddr(index, kFromIndex));
}
intptr_t DeoptInfo::Instruction(intptr_t index) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return *(EntryAddr(index, kInstruction));
}
@@ -11264,7 +11264,7 @@
RawObject* raw = Object::Allocate(DeoptInfo::kClassId,
size,
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(num_commands);
}
@@ -11282,7 +11282,7 @@
void DeoptInfo::SetAt(intptr_t index,
intptr_t instr_kind,
intptr_t from_index) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
*(EntryAddr(index, kInstruction)) = instr_kind;
*(EntryAddr(index, kFromIndex)) = from_index;
}
@@ -11633,7 +11633,7 @@
intptr_t ICData::GetReceiverClassIdAt(intptr_t index) const {
ASSERT(index < NumberOfChecks());
const intptr_t data_pos = index * TestEntryLength();
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawArray* raw_data = ic_data();
return Smi::Value(Smi::RawCast(raw_data->ptr()->data()[data_pos]));
}
@@ -11643,7 +11643,7 @@
const intptr_t data_pos = index * TestEntryLength() + NumArgsTested();
ASSERT(Object::Handle(Array::Handle(ic_data()).At(data_pos)).IsFunction());
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawArray* raw_data = ic_data();
return reinterpret_cast<RawFunction*>(raw_data->ptr()->data()[data_pos]);
}
@@ -11843,7 +11843,7 @@
RawObject* raw = Object::Allocate(ICData::kClassId,
ICData::InstanceSize(),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_owner(owner);
@@ -12128,7 +12128,7 @@
intptr_t Code::BinarySearchInSCallTable(uword pc) const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
const Array& table = Array::Handle(raw_ptr()->static_calls_target_table_);
RawObject* key = reinterpret_cast<RawObject*>(Smi::New(pc - EntryPoint()));
intptr_t imin = 0;
@@ -12260,7 +12260,7 @@
{
uword size = Code::InstanceSize(pointer_offsets_length);
RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.set_pointer_offsets_length(pointer_offsets_length);
result.set_is_optimized(false);
@@ -12305,7 +12305,7 @@
optimized);
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
const ZoneGrowableArray<intptr_t>& pointer_offsets =
assembler->GetPointerOffsets();
ASSERT(pointer_offsets.length() == pointer_offset_count);
@@ -12374,7 +12374,7 @@
RawCode* Code::LookupCodeInIsolate(Isolate* isolate, uword pc) {
ASSERT((isolate == Isolate::Current()) || (isolate == Dart::vm_isolate()));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
FindRawCodeVisitor visitor(pc);
RawInstructions* instr;
if (isolate->heap() == NULL) {
@@ -12642,7 +12642,7 @@
uint32_t pc_offset, Array* maps, Stackmap* map) const {
// This code is used during iterating frames during a GC and hence it
// should not in turn start a GC.
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
if (stackmaps() == Array::null()) {
// No stack maps are present in the code object which means this
// frame relies on tagged pointers.
@@ -12764,7 +12764,7 @@
RawObject* raw = Object::Allocate(Context::kClassId,
Context::InstanceSize(num_variables),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.set_num_variables(num_variables);
}
@@ -12868,7 +12868,7 @@
RawObject* raw = Object::Allocate(ContextScope::kClassId,
size,
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.set_num_variables(num_variables);
}
@@ -13033,7 +13033,7 @@
{ RawObject* raw = Object::Allocate(MegamorphicCache::kClassId,
MegamorphicCache::InstanceSize(),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
const intptr_t capacity = kInitialCapacity;
@@ -13120,7 +13120,7 @@
RawObject* raw = Object::Allocate(SubtypeTestCache::kClassId,
SubtypeTestCache::InstanceSize(),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
const Array& cache = Array::Handle(Array::New(kTestEntryLength));
@@ -13135,7 +13135,7 @@
intptr_t SubtypeTestCache::NumberOfChecks() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// Do not count the sentinel;
return (Smi::Value(cache()->ptr()->length_) / kTestEntryLength) - 1;
}
@@ -13221,7 +13221,7 @@
RawObject* raw = Object::Allocate(ApiError::kClassId,
ApiError::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_message(message);
@@ -13275,7 +13275,7 @@
RawObject* raw = Object::Allocate(LanguageError::kClassId,
LanguageError::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_previous_error(prev_error);
@@ -13297,7 +13297,7 @@
va_start(args, format);
RawLanguageError* result = LanguageError::NewFormattedV(
prev_error, script, token_pos, kind, space, format, args);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
va_end(args);
return result;
}
@@ -13312,7 +13312,7 @@
RawObject* raw = Object::Allocate(LanguageError::kClassId,
LanguageError::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_formatted_message(formatted_message);
@@ -13400,7 +13400,7 @@
RawObject* raw = Object::Allocate(UnhandledException::kClassId,
UnhandledException::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_exception(exception);
@@ -13416,7 +13416,7 @@
RawObject* raw = Object::Allocate(UnhandledException::kClassId,
UnhandledException::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_exception(Object::null_instance());
@@ -13496,7 +13496,7 @@
RawObject* raw = Object::Allocate(UnwindError::kClassId,
UnwindError::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_message(message);
@@ -13562,7 +13562,7 @@
}
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// Raw bits compare.
const intptr_t instance_size = Class::Handle(this->clazz()).instance_size();
ASSERT(instance_size != 0);
@@ -13789,7 +13789,7 @@
intptr_t* Instance::NativeFieldsDataAddr() const {
- ASSERT(Isolate::Current()->no_gc_scope_depth() > 0);
+ ASSERT(Isolate::Current()->no_safepoint_scope_depth() > 0);
RawTypedData* native_fields =
reinterpret_cast<RawTypedData*>(*NativeFieldsAddr());
if (native_fields == TypedData::null()) {
@@ -13938,7 +13938,7 @@
return "unknown_constant";
} else if (raw() == Object::non_constant().raw()) {
return "non_constant";
- } else if (Isolate::Current()->no_gc_scope_depth() > 0) {
+ } else if (Isolate::Current()->no_safepoint_scope_depth() > 0) {
// Can occur when running disassembler.
return "Instance";
} else {
@@ -16344,7 +16344,7 @@
RawObject* raw = Object::Allocate(Mint::kClassId,
Mint::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_value(val);
@@ -16494,7 +16494,7 @@
RawObject* raw = Object::Allocate(Double::kClassId,
Double::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_value(d);
@@ -16698,7 +16698,7 @@
RawObject* raw = Object::Allocate(Bigint::kClassId,
Bigint::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.SetNeg(false);
@@ -16720,7 +16720,7 @@
RawObject* raw = Object::Allocate(Bigint::kClassId,
Bigint::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
// Clamp the digits array.
@@ -17377,7 +17377,7 @@
return;
}
if (str.IsOneByteString()) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
uint8_t* str_addr = OneByteString::CharAddr(str, begin_index);
for (intptr_t i = 0; i < len; i++) {
Add(*str_addr);
@@ -17655,7 +17655,7 @@
if (type == Utf8::kLatin1) {
const String& strobj = String::Handle(OneByteString::New(len, space));
if (len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
Utf8::DecodeToLatin1(utf8_array, array_len,
OneByteString::CharAddr(strobj, 0), len);
}
@@ -17663,7 +17663,7 @@
}
ASSERT((type == Utf8::kBMP) || (type == Utf8::kSupplementary));
const String& strobj = String::Handle(TwoByteString::New(len, space));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
Utf8::DecodeToUTF16(utf8_array, array_len,
TwoByteString::CharAddr(strobj, 0), len);
return strobj.raw();
@@ -17758,7 +17758,7 @@
ASSERT(len >= 0);
ASSERT(len <= (dst.Length() - dst_offset));
if (dst.IsOneByteString()) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
if (len > 0) {
memmove(OneByteString::CharAddr(dst, dst_offset),
characters,
@@ -17779,7 +17779,7 @@
ASSERT(array_len >= 0);
ASSERT(array_len <= (dst.Length() - dst_offset));
if (dst.IsOneByteString()) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
for (intptr_t i = 0; i < array_len; ++i) {
ASSERT(Utf::IsLatin1(utf16_array[i]));
*OneByteString::CharAddr(dst, i + dst_offset) = utf16_array[i];
@@ -17786,7 +17786,7 @@
}
} else {
ASSERT(dst.IsTwoByteString());
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
if (array_len > 0) {
memmove(TwoByteString::CharAddr(dst, dst_offset),
utf16_array,
@@ -17808,7 +17808,7 @@
intptr_t char_size = src.CharSize();
if (char_size == kOneByteChar) {
if (src.IsOneByteString()) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
String::Copy(dst,
dst_offset,
OneByteString::CharAddr(src, src_offset),
@@ -17815,7 +17815,7 @@
len);
} else {
ASSERT(src.IsExternalOneByteString());
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
String::Copy(dst,
dst_offset,
ExternalOneByteString::CharAddr(src, src_offset),
@@ -17824,7 +17824,7 @@
} else {
ASSERT(char_size == kTwoByteChar);
if (src.IsTwoByteString()) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
String::Copy(dst,
dst_offset,
TwoByteString::CharAddr(src, src_offset),
@@ -17831,7 +17831,7 @@
len);
} else {
ASSERT(src.IsExternalTwoByteString());
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
String::Copy(dst,
dst_offset,
ExternalTwoByteString::CharAddr(src, src_offset),
@@ -18013,7 +18013,7 @@
va_list args;
va_start(args, format);
RawString* result = NewFormattedV(format, args);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
va_end(args);
return result;
}
@@ -18140,7 +18140,7 @@
}
Zone* zone = Isolate::Current()->current_zone();
uint8_t* result = zone->Alloc<uint8_t>(len + 1);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
const uint8_t* original_str = OneByteString::CharAddr(*this, 0);
for (intptr_t i = 0; i < len; i++) {
if (original_str[i] <= Utf8::kMaxOneByteChar) {
@@ -18224,7 +18224,7 @@
void* external_data;
Dart_WeakPersistentHandleFinalizer finalizer;
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
ASSERT(array != NULL);
intptr_t str_length = this->Length();
ASSERT(length >= (str_length * this->CharSize()));
@@ -18305,7 +18305,7 @@
external_data = ext_data;
finalizer = ExternalTwoByteString::Finalize;
}
- } // NoGCScope
+ } // NoSafepointScope
AddFinalizer(result, external_data, finalizer);
return this->raw();
}
@@ -18355,7 +18355,7 @@
ASSERT(start <= end);
ASSERT(end <= str.Length());
intptr_t length = end - start;
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
const uint8_t* startChar;
if (str.IsOneByteString()) {
startChar = OneByteString::CharAddr(str, start);
@@ -18453,7 +18453,7 @@
if (str1.raw() == str2.raw()) {
return true; // Both handles point to the same raw instance.
}
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
intptr_t str1_class_id = str1.raw()->GetClassId();
intptr_t str2_class_id = str2.raw()->GetClassId();
switch (str1_class_id) {
@@ -18577,7 +18577,7 @@
RawObject* raw = Object::Allocate(OneByteString::kClassId,
OneByteString::InstanceSize(len),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawOneByteString* result = reinterpret_cast<RawOneByteString*>(raw);
result->StoreSmi(&(result->ptr()->length_), Smi::New(len));
result->StoreSmi(&(result->ptr()->hash_), Smi::New(0));
@@ -18591,7 +18591,7 @@
Heap::Space space) {
const String& result = String::Handle(OneByteString::New(len, space));
if (len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(CharAddr(result, 0), characters, len);
}
return OneByteString::raw(result);
@@ -18602,7 +18602,7 @@
intptr_t len,
Heap::Space space) {
const String& result = String::Handle(OneByteString::New(len, space));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
for (intptr_t i = 0; i < len; ++i) {
ASSERT(Utf::IsLatin1(characters[i]));
*CharAddr(result, i) = characters[i];
@@ -18615,7 +18615,7 @@
intptr_t len,
Heap::Space space) {
const String& result = String::Handle(OneByteString::New(len, space));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
for (intptr_t i = 0; i < len; ++i) {
ASSERT(Utf::IsLatin1(characters[i]));
*CharAddr(result, i) = characters[i];
@@ -18640,7 +18640,7 @@
const String& result = String::Handle(OneByteString::New(other_len, space));
ASSERT(other_one_byte_string.IsOneByteString());
if (other_len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(OneByteString::CharAddr(result, 0),
OneByteString::CharAddr(other_one_byte_string, other_start_index),
other_len);
@@ -18656,7 +18656,7 @@
const String& result = String::Handle(OneByteString::New(other_len, space));
ASSERT(other_typed_data.ElementSizeInBytes() == 1);
if (other_len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(OneByteString::CharAddr(result, 0),
other_typed_data.DataAddr(other_start_index),
other_len);
@@ -18672,7 +18672,7 @@
const String& result = String::Handle(OneByteString::New(other_len, space));
ASSERT(other_typed_data.ElementSizeInBytes() == 1);
if (other_len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(OneByteString::CharAddr(result, 0),
other_typed_data.DataAddr(other_start_index),
other_len);
@@ -18722,7 +18722,7 @@
ASSERT(!str.IsNull());
intptr_t len = str.Length();
const String& result = String::Handle(OneByteString::New(len, space));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
for (intptr_t i = 0; i < len; ++i) {
int32_t ch = mapping(str.CharAt(i));
ASSERT(Utf::IsLatin1(ch));
@@ -18744,7 +18744,7 @@
}
ASSERT(begin_index < str.Length());
RawOneByteString* result = OneByteString::New(length, space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
if (length > 0) {
uint8_t* dest = &result->ptr()->data()[0];
const uint8_t* src = &raw_ptr(str)->data()[begin_index];
@@ -18818,7 +18818,7 @@
RawObject* raw = Object::Allocate(TwoByteString::kClassId,
TwoByteString::InstanceSize(len),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(len);
result.SetHash(0);
@@ -18833,7 +18833,7 @@
ASSERT(array_len > 0);
const String& result = String::Handle(TwoByteString::New(array_len, space));
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(CharAddr(result, 0), utf16_array, (array_len * 2));
}
return TwoByteString::raw(result);
@@ -18847,7 +18847,7 @@
ASSERT((array_len > 0) && (utf16_len >= array_len));
const String& result = String::Handle(TwoByteString::New(utf16_len, space));
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
intptr_t j = 0;
for (intptr_t i = 0; i < array_len; ++i) {
if (Utf::IsSupplementary(utf32_array[i])) {
@@ -18880,7 +18880,7 @@
Heap::Space space) {
const String& result = String::Handle(TwoByteString::New(other_len, space));
if (other_len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(TwoByteString::CharAddr(result, 0),
other_typed_data.DataAddr(other_start_index),
other_len * sizeof(uint16_t));
@@ -18895,7 +18895,7 @@
Heap::Space space) {
const String& result = String::Handle(TwoByteString::New(other_len, space));
if (other_len > 0) {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
memmove(TwoByteString::CharAddr(result, 0),
other_typed_data.DataAddr(other_start_index),
other_len * sizeof(uint16_t));
@@ -18947,7 +18947,7 @@
const String& result = String::Handle(TwoByteString::New(len, space));
String::CodePointIterator it(str);
intptr_t i = 0;
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
while (it.Next()) {
int32_t src = it.Current();
int32_t dst = mapping(src);
@@ -19004,7 +19004,7 @@
RawObject* raw = Object::Allocate(ExternalOneByteString::kClassId,
ExternalOneByteString::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(len);
result.SetHash(0);
@@ -19042,7 +19042,7 @@
RawObject* raw = Object::Allocate(ExternalTwoByteString::kClassId,
ExternalTwoByteString::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(len);
result.SetHash(0);
@@ -19069,7 +19069,7 @@
RawObject* raw = Object::Allocate(Bool::kClassId,
Bool::InstanceSize(),
Heap::kOld);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_value(value);
@@ -19146,7 +19146,7 @@
Object::Allocate(class_id,
Array::InstanceSize(len),
space));
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
raw->StoreSmi(&(raw->ptr()->length_), Smi::New(len));
VerifiedMemory::Accept(reinterpret_cast<uword>(raw->ptr()),
Array::InstanceSize(len));
@@ -19173,7 +19173,7 @@
void Array::MakeImmutable() const {
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
uword tags = raw_ptr()->tags_;
uword old_tags;
do {
@@ -19261,7 +19261,7 @@
array.SetTypeArguments(type_arguments);
intptr_t capacity_size = Array::InstanceSize(capacity_len);
intptr_t used_size = Array::InstanceSize(used_len);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
// If there is any left over space fill it with either an Array object or
// just a plain object (depending on the amount of left over space) so
@@ -19429,7 +19429,7 @@
RawObject* raw = Object::Allocate(GrowableObjectArray::kClassId,
GrowableObjectArray::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(0);
result.SetData(array);
@@ -19532,7 +19532,7 @@
ASSERT(!IsNull());
EnumIndexDefaultMap map(data());
{
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
RawObject* result = map.GetOrNull(key);
ASSERT(map.Release().raw() == data());
return result;
@@ -19611,7 +19611,7 @@
RawObject* raw = Object::Allocate(LinkedHashMap::kClassId,
LinkedHashMap::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetData(data);
result.SetModified();
@@ -19641,7 +19641,7 @@
RawObject* raw = Object::Allocate(Float32x4::kClassId,
Float32x4::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_x(v0);
@@ -19660,7 +19660,7 @@
RawObject* raw = Object::Allocate(Float32x4::kClassId,
Float32x4::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_value(value);
@@ -19746,7 +19746,7 @@
RawObject* raw = Object::Allocate(Int32x4::kClassId,
Int32x4::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_x(v0);
@@ -19765,7 +19765,7 @@
RawObject* raw = Object::Allocate(Int32x4::kClassId,
Int32x4::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_value(value);
@@ -19850,7 +19850,7 @@
RawObject* raw = Object::Allocate(Float64x2::kClassId,
Float64x2::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_x(value0);
@@ -19867,7 +19867,7 @@
RawObject* raw = Object::Allocate(Float64x2::kClassId,
Float64x2::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_value(value);
@@ -19960,7 +19960,7 @@
if (len != other_typed_data.LengthInBytes()) {
return false;
}
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
return (len == 0) ||
(memcmp(DataAddr(0), other_typed_data.DataAddr(0), len) == 0);
}
@@ -19978,7 +19978,7 @@
RawObject* raw = Object::Allocate(class_id,
TypedData::InstanceSize(lengthInBytes),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(len);
if (len > 0) {
@@ -20028,7 +20028,7 @@
RawObject* raw = Object::Allocate(class_id,
ExternalTypedData::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.SetLength(len);
result.SetData(data);
@@ -20054,7 +20054,7 @@
RawObject* raw = Object::Allocate(Capability::kClassId,
Capability::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.StoreNonPointer(&result.raw_ptr()->id_, id);
}
@@ -20084,7 +20084,7 @@
RawObject* raw = Object::Allocate(ReceivePort::kClassId,
ReceivePort::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.StorePointer(&result.raw_ptr()->send_port_, send_port.raw());
}
@@ -20120,7 +20120,7 @@
RawObject* raw = Object::Allocate(SendPort::kClassId,
SendPort::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.StoreNonPointer(&result.raw_ptr()->id_, id);
result.StoreNonPointer(&result.raw_ptr()->origin_id_, origin_id);
@@ -20161,7 +20161,7 @@
Instance& result = Instance::Handle();
{
RawObject* raw = Object::Allocate(cls.id(), Closure::InstanceSize(), space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
Closure::set_function(result, function);
@@ -20236,7 +20236,7 @@
RawObject* raw = Object::Allocate(Stacktrace::kClassId,
Stacktrace::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_code_array(code_array);
@@ -20408,7 +20408,7 @@
RawObject* raw = Object::Allocate(JSRegExp::kClassId,
JSRegExp::InstanceSize(len),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
result.set_type(kUnitialized);
result.set_flags(0);
@@ -20565,7 +20565,7 @@
RawObject* raw = Object::Allocate(MirrorReference::kClassId,
MirrorReference::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_referent(referent);
@@ -20624,7 +20624,7 @@
RawObject* raw = Object::Allocate(UserTag::kClassId,
UserTag::InstanceSize(),
space);
- NoGCScope no_gc;
+ NoSafepointScope no_safepoint;
result ^= raw;
}
result.set_label(label);
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698