Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 39611) |
+++ runtime/vm/object.cc (working copy) |
@@ -13096,14 +13096,14 @@ |
const Function& eval_func = |
Function::Handle(EvaluateHelper(cls, expr, param_names, false)); |
const Array& args = Array::Handle(Array::New(1 + param_values.Length())); |
- Object& param = Object::Handle(); |
+ PassiveObject& param = PassiveObject::Handle(); |
args.SetAt(0, *this); |
for (intptr_t i = 0; i < param_values.Length(); i++) { |
param = param_values.At(i); |
args.SetAt(i + 1, param); |
} |
- const Object& result = |
- Object::Handle(DartEntry::InvokeFunction(eval_func, args)); |
+ const PassiveObject& result = |
+ PassiveObject::Handle(DartEntry::InvokeFunction(eval_func, args)); |
return result.raw(); |
} |
@@ -13335,8 +13335,8 @@ |
bool Instance::OperatorEquals(const Instance& other) const { |
// TODO(koda): Optimize for all builtin classes and all classes |
// that do not override operator==. |
- const Object& result = |
- Object::Handle(DartLibraryCalls::Equals(*this, other)); |
+ const PassiveObject& result = |
+ PassiveObject::Handle(DartLibraryCalls::Equals(*this, other)); |
return result.raw() == Object::bool_true().raw(); |
Ivan Posva
2014/08/28 19:31:53
I don't think we need to wrap it in a handle to co
siva
2014/08/29 00:17:01
Done.
|
} |
@@ -18124,7 +18124,7 @@ |
} |
ASSERT(new_length >= len); // Cannot copy 'source' into new array. |
ASSERT(new_length != len); // Unnecessary copying of array. |
- Object& obj = Object::Handle(); |
+ PassiveObject& obj = PassiveObject::Handle(); |
for (int i = 0; i < len; i++) { |
obj = source.At(i); |
result.SetAt(i, obj); |
@@ -18244,7 +18244,7 @@ |
ASSERT(Length() > 0); |
intptr_t index = Length() - 1; |
const Array& contents = Array::Handle(data()); |
- const Object& obj = Object::Handle(contents.At(index)); |
+ const PassiveObject& obj = PassiveObject::Handle(contents.At(index)); |
contents.SetAt(index, Object::null_object()); |
SetLength(index); |
return obj.raw(); |
@@ -18406,7 +18406,7 @@ |
RawObject* LinkedHashMap::LookUp(const Object& key) const { |
ASSERT(!IsNull()); |
EnumIndexDefaultMap map(data()); |
- const Object& result = Object::Handle(map.GetOrNull(key)); |
+ const PassiveObject& result = PassiveObject::Handle(map.GetOrNull(key)); |
ASSERT(map.Release().raw() == data()); |
Ivan Posva
2014/08/28 19:31:53
You could stick the ASSERT in a NoGCScope and then
siva
2014/08/29 00:17:01
Done.
|
return result.raw(); |
} |
@@ -18425,7 +18425,7 @@ |
ASSERT(!IsNull()); |
EnumIndexDefaultMap map(data()); |
// TODO(koda): Make 'Remove' also return the old value. |
- const Object& result = Object::Handle(map.GetOrNull(key)); |
+ const PassiveObject& result = PassiveObject::Handle(map.GetOrNull(key)); |
if (map.Remove(key)) { |
SetModified(); |
} |
@@ -19109,7 +19109,7 @@ |
set_pc_offset_array(pc_offset_array); |
// Now append the new function and code list to the existing arrays. |
intptr_t j = start_index; |
- Object& obj = Object::Handle(); |
+ PassiveObject& obj = PassiveObject::Handle(); |
for (intptr_t i = old_length; i < new_length; i++, j++) { |
obj = code_list.At(j); |
code_array.SetAt(i, obj); |