mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[vm] Replace ^= assignments with = where possible
Change-Id: I04ac2e9c4b8bb654b7c660e728be3867aa4e1513 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100923 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
2e24a992c7
commit
4ce3aa7af1
|
@ -34,11 +34,11 @@ static RawScript* FindScript(DartFrameIterator* iterator) {
|
|||
if (stack_frame->is_interpreted()) {
|
||||
func = stack_frame->LookupDartFunction();
|
||||
} else {
|
||||
code ^= stack_frame->LookupDartCode();
|
||||
code = stack_frame->LookupDartCode();
|
||||
if (code.is_optimized()) {
|
||||
InlinedFunctionsIterator inlined_iterator(code, stack_frame->pc());
|
||||
while (!inlined_iterator.Done()) {
|
||||
func ^= inlined_iterator.function();
|
||||
func = inlined_iterator.function();
|
||||
if (hit_assertion_error) {
|
||||
return func.script();
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ static bool IsPointerType(const AbstractType& type) {
|
|||
Class::Handle(Isolate::Current()->object_store()->ffi_pointer_class());
|
||||
AbstractType& pointer_type =
|
||||
AbstractType::Handle(pointer_class.DeclarationType());
|
||||
pointer_type ^= pointer_type.InstantiateFrom(Object::null_type_arguments(),
|
||||
Object::null_type_arguments(),
|
||||
kNoneFree, NULL, Heap::kNew);
|
||||
pointer_type = pointer_type.InstantiateFrom(Object::null_type_arguments(),
|
||||
Object::null_type_arguments(),
|
||||
kNoneFree, NULL, Heap::kNew);
|
||||
ASSERT(pointer_type.IsInstantiated());
|
||||
ASSERT(type.IsInstantiated());
|
||||
return type.IsSubtypeOf(pointer_type, Heap::kNew);
|
||||
|
@ -594,7 +594,7 @@ DEFINE_NATIVE_ENTRY(Ffi_fromFunction, 1, 1) {
|
|||
TypeArguments& type_args = TypeArguments::Handle(zone);
|
||||
type_args = TypeArguments::New(1);
|
||||
type_args.SetTypeAt(Pointer::kNativeTypeArgPos, type_arg);
|
||||
type_args ^= type_args.Canonicalize();
|
||||
type_args = type_args.Canonicalize();
|
||||
|
||||
Class& native_function_class = Class::Handle(
|
||||
Isolate::Current()->class_table()->At(kFfiNativeFunctionCid));
|
||||
|
|
|
@ -159,14 +159,14 @@ static RawInstance* CreateParameterMirrorList(const Function& func,
|
|||
args.SetAt(2, owner_mirror);
|
||||
|
||||
if (!has_extra_parameter_info) {
|
||||
is_final ^= Bool::True().raw();
|
||||
is_final = Bool::True().raw();
|
||||
default_value = Object::null();
|
||||
metadata = Object::null();
|
||||
}
|
||||
|
||||
for (intptr_t i = 0; i < non_implicit_param_count; i++) {
|
||||
pos ^= Smi::New(i);
|
||||
name ^= func.ParameterNameAt(implicit_param_count + i);
|
||||
pos = Smi::New(i);
|
||||
name = func.ParameterNameAt(implicit_param_count + i);
|
||||
if (has_extra_parameter_info) {
|
||||
is_final ^= param_descriptor.At(i * Parser::kParameterEntrySize +
|
||||
Parser::kParameterIsFinalOffset);
|
||||
|
@ -186,7 +186,7 @@ static RawInstance* CreateParameterMirrorList(const Function& func,
|
|||
args.SetAt(6, is_final);
|
||||
args.SetAt(7, default_value);
|
||||
args.SetAt(8, metadata);
|
||||
param ^= CreateMirror(Symbols::_LocalParameterMirror(), args);
|
||||
param = CreateMirror(Symbols::_LocalParameterMirror(), args);
|
||||
results.SetAt(i, param);
|
||||
}
|
||||
results.MakeImmutable();
|
||||
|
@ -216,7 +216,7 @@ static RawInstance* CreateTypeVariableList(const Class& cls) {
|
|||
type ^= args.TypeAt(i);
|
||||
ASSERT(type.IsTypeParameter());
|
||||
ASSERT(type.IsFinalized());
|
||||
name ^= type.name();
|
||||
name = type.name();
|
||||
result.SetAt(2 * i, name);
|
||||
result.SetAt(2 * i + 1, type);
|
||||
}
|
||||
|
@ -756,7 +756,7 @@ DEFINE_NATIVE_ENTRY(Mirrors_instantiateGenericType, 0, 2) {
|
|||
|
||||
intptr_t num_expected_type_arguments = args.Length();
|
||||
TypeArguments& type_args_obj = TypeArguments::Handle();
|
||||
type_args_obj ^= TypeArguments::New(num_expected_type_arguments);
|
||||
type_args_obj = TypeArguments::New(num_expected_type_arguments);
|
||||
AbstractType& type_arg = AbstractType::Handle();
|
||||
Instance& instance = Instance::Handle();
|
||||
for (intptr_t i = 0; i < args.Length(); i++) {
|
||||
|
@ -824,7 +824,7 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_metadata, 0, 1) {
|
|||
// TODO(regis): Fully support generic functions.
|
||||
return Object::empty_array().raw();
|
||||
}
|
||||
klass ^= TypeParameter::Cast(decl).parameterized_class();
|
||||
klass = TypeParameter::Cast(decl).parameterized_class();
|
||||
library = klass.library();
|
||||
} else {
|
||||
return Object::empty_array().raw();
|
||||
|
@ -1117,8 +1117,8 @@ DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 0, 1) {
|
|||
// arguments have been provided, or all arguments are dynamic. Return a list
|
||||
// of typemirrors on dynamic in this case.
|
||||
if (args.IsNull()) {
|
||||
arg_type ^= Object::dynamic_type().raw();
|
||||
type_mirror ^= CreateTypeMirror(arg_type);
|
||||
arg_type = Object::dynamic_type().raw();
|
||||
type_mirror = CreateTypeMirror(arg_type);
|
||||
for (intptr_t i = 0; i < num_params; i++) {
|
||||
result.SetAt(i, type_mirror);
|
||||
}
|
||||
|
@ -1128,7 +1128,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 0, 1) {
|
|||
ASSERT(args.Length() >= num_params);
|
||||
const intptr_t num_inherited_args = args.Length() - num_params;
|
||||
for (intptr_t i = 0; i < num_params; i++) {
|
||||
arg_type ^= args.TypeAt(i + num_inherited_args);
|
||||
arg_type = args.TypeAt(i + num_inherited_args);
|
||||
type_mirror = CreateTypeMirror(arg_type);
|
||||
result.SetAt(i, type_mirror);
|
||||
}
|
||||
|
@ -1500,7 +1500,7 @@ DEFINE_NATIVE_ENTRY(MethodMirror_return_type, 0, 2) {
|
|||
// We handle constructors in Dart code.
|
||||
ASSERT(!func.IsGenerativeConstructor());
|
||||
AbstractType& type = AbstractType::Handle(func.result_type());
|
||||
type ^= type.Canonicalize(); // Instantiated signatures are not canonical.
|
||||
type = type.Canonicalize(); // Instantiated signatures are not canonical.
|
||||
return InstantiateType(type, instantiator);
|
||||
}
|
||||
|
||||
|
@ -1618,7 +1618,7 @@ DEFINE_NATIVE_ENTRY(ParameterMirror_type, 0, 3) {
|
|||
const Function& func = Function::Handle(ref.GetFunctionReferent());
|
||||
AbstractType& type = AbstractType::Handle(
|
||||
func.ParameterTypeAt(func.NumImplicitParameters() + pos.Value()));
|
||||
type ^= type.Canonicalize(); // Instantiated signatures are not canonical.
|
||||
type = type.Canonicalize(); // Instantiated signatures are not canonical.
|
||||
return InstantiateType(type, instantiator);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 0, 3) {
|
|||
intptr_t length;
|
||||
if (list.IsGrowableObjectArray()) {
|
||||
const GrowableObjectArray& growableArray = GrowableObjectArray::Cast(list);
|
||||
a ^= growableArray.data();
|
||||
a = growableArray.data();
|
||||
length = growableArray.Length();
|
||||
} else if (list.IsArray()) {
|
||||
a ^= Array::Cast(list).raw();
|
||||
a = Array::Cast(list).raw();
|
||||
length = a.Length();
|
||||
} else {
|
||||
Exceptions::ThrowArgumentError(list);
|
||||
|
@ -188,9 +188,9 @@ DEFINE_NATIVE_ENTRY(StringBase_joinReplaceAllResult, 0, 4) {
|
|||
const intptr_t base_length = base.Length();
|
||||
String& result = String::Handle(zone);
|
||||
if (is_onebyte) {
|
||||
result ^= OneByteString::New(length, Heap::kNew);
|
||||
result = OneByteString::New(length, Heap::kNew);
|
||||
} else {
|
||||
result ^= TwoByteString::New(length, Heap::kNew);
|
||||
result = TwoByteString::New(length, Heap::kNew);
|
||||
}
|
||||
Instance& object = Instance::Handle(zone);
|
||||
intptr_t write_index = 0;
|
||||
|
|
|
@ -86,7 +86,7 @@ static void CollectFinalizedSuperClasses(
|
|||
super_type = cls.super_type();
|
||||
if (!super_type.IsNull()) {
|
||||
if (super_type.HasTypeClass()) {
|
||||
cls ^= super_type.type_class();
|
||||
cls = super_type.type_class();
|
||||
if (cls.is_finalized()) {
|
||||
AddSuperType(super_type, finalized_super_classes);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class InterfaceFinder {
|
|||
if (!array->IsNull()) {
|
||||
for (intptr_t i = 0; i < array->Length(); ++i) {
|
||||
*type ^= array->At(i);
|
||||
*interface_class ^= class_table_->At(type->type_class_id());
|
||||
*interface_class = class_table_->At(type->type_class_id());
|
||||
FindAllInterfaces(*interface_class);
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ static void CollectImmediateSuperInterfaces(const Class& cls,
|
|||
for (intptr_t i = 0; i < interfaces.Length(); ++i) {
|
||||
type ^= interfaces.At(i);
|
||||
if (!type.HasTypeClass()) continue;
|
||||
ifc ^= type.type_class();
|
||||
ifc = type.type_class();
|
||||
for (intptr_t j = 0; j < cids->length(); ++j) {
|
||||
if ((*cids)[j] == ifc.id()) {
|
||||
// Already added.
|
||||
|
@ -560,7 +560,7 @@ void ClassFinalizer::FinalizeTypeArguments(const Class& cls,
|
|||
ASSERT(num_super_type_args ==
|
||||
(cls.NumTypeArguments() - cls.NumOwnTypeArguments()));
|
||||
if (!super_type.IsFinalized() && !super_type.IsBeingFinalized()) {
|
||||
super_type ^= FinalizeType(cls, super_type, kFinalize, pending_types);
|
||||
super_type = FinalizeType(cls, super_type, kFinalize, pending_types);
|
||||
cls.set_super_type(super_type);
|
||||
}
|
||||
TypeArguments& super_type_args =
|
||||
|
@ -585,7 +585,7 @@ void ClassFinalizer::FinalizeTypeArguments(const Class& cls,
|
|||
super_type_args.SetTypeAt(i, super_type_arg);
|
||||
} else {
|
||||
if (!super_type_arg.IsFinalized()) {
|
||||
super_type_arg ^=
|
||||
super_type_arg =
|
||||
FinalizeType(cls, super_type_arg, kFinalize, pending_types);
|
||||
super_type_args.SetTypeAt(i, super_type_arg);
|
||||
// Note that super_type_arg may still not be finalized here, in
|
||||
|
|
|
@ -601,7 +601,7 @@ class FunctionDeserializationCluster : public DeserializationCluster {
|
|||
Code& code = Code::Handle(zone);
|
||||
for (intptr_t i = start_index_; i < stop_index_; i++) {
|
||||
func ^= refs.At(i);
|
||||
code ^= func.CurrentCode();
|
||||
code = func.CurrentCode();
|
||||
if (func.HasCode() && !code.IsDisabled()) {
|
||||
func.SetInstructions(code); // Set entrypoint.
|
||||
func.SetWasCompiled(true);
|
||||
|
|
|
@ -49,7 +49,7 @@ RawFunction* CodePatcher::GetUnoptimizedStaticCallAt(uword return_address,
|
|||
ASSERT(code.ContainsInstructionAt(return_address));
|
||||
CallPattern static_call(return_address, code);
|
||||
ICData& ic_data = ICData::Handle();
|
||||
ic_data ^= static_call.IcData();
|
||||
ic_data = static_call.IcData();
|
||||
if (ic_data_result != NULL) {
|
||||
*ic_data_result = ic_data.raw();
|
||||
}
|
||||
|
|
|
@ -495,7 +495,7 @@ void Precompiler::CollectCallbackFields() {
|
|||
cids.Clear();
|
||||
if (CHA::ConcreteSubclasses(cls, &cids)) {
|
||||
for (intptr_t j = 0; j < cids.length(); ++j) {
|
||||
subcls ^= I->class_table()->At(cids[j]);
|
||||
subcls = I->class_table()->At(cids[j]);
|
||||
if (subcls.is_allocated()) {
|
||||
// Add dispatcher to cls.
|
||||
dispatcher = subcls.GetInvocationDispatcher(
|
||||
|
@ -1947,7 +1947,7 @@ void Precompiler::BindStaticCalls() {
|
|||
// stub.
|
||||
auto& fun = Function::Cast(target_);
|
||||
ASSERT(fun.HasCode());
|
||||
target_code_ ^= fun.CurrentCode();
|
||||
target_code_ = fun.CurrentCode();
|
||||
uword pc = pc_offset + code_.PayloadStart();
|
||||
CodePatcher::PatchStaticCallAt(pc, code_, target_code_);
|
||||
}
|
||||
|
|
|
@ -1995,7 +1995,7 @@ bool FlowGraphCompiler::LookupMethodFor(int class_id,
|
|||
Function::Handle(zone, Resolver::ResolveDynamicForReceiverClass(
|
||||
cls, name, args_desc, allow_add));
|
||||
if (target_function.IsNull()) return false;
|
||||
*fn_return ^= target_function.raw();
|
||||
*fn_return = target_function.raw();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -4262,7 +4262,7 @@ bool PolymorphicInstanceCallInstr::HasOnlyDispatcherOrImplicitAccessorTargets()
|
|||
const intptr_t len = targets_.length();
|
||||
Function& target = Function::Handle();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
target ^= targets_.TargetAt(i)->target->raw();
|
||||
target = targets_.TargetAt(i)->target->raw();
|
||||
if (!target.IsDispatcherOrImplicitAccessor()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -4922,7 +4922,7 @@ class AllocateObjectInstr : public TemplateAllocation<0, NoThrow> {
|
|||
|
||||
const Function& closure_function() const { return closure_function_; }
|
||||
void set_closure_function(const Function& function) {
|
||||
closure_function_ ^= function.raw();
|
||||
closure_function_ = function.raw();
|
||||
}
|
||||
|
||||
virtual bool ComputeCanDeoptimize() const { return false; }
|
||||
|
|
|
@ -192,7 +192,7 @@ static void PrintTargetsHelper(BufferFormatter* f,
|
|||
const CidRange& range = targets[i];
|
||||
const auto target_info = targets.TargetAt(i);
|
||||
const intptr_t count = target_info->count;
|
||||
target ^= target_info->target->raw();
|
||||
target = target_info->target->raw();
|
||||
if (i > 0) {
|
||||
f->Print(" | ");
|
||||
}
|
||||
|
|
|
@ -415,11 +415,11 @@ class CallSites : public ValueObject {
|
|||
if (current->IsPolymorphicInstanceCall()) {
|
||||
PolymorphicInstanceCallInstr* instance_call =
|
||||
current->AsPolymorphicInstanceCall();
|
||||
target ^= instance_call->targets().FirstTarget().raw();
|
||||
target = instance_call->targets().FirstTarget().raw();
|
||||
call = instance_call;
|
||||
} else if (current->IsStaticCall()) {
|
||||
StaticCallInstr* static_call = current->AsStaticCall();
|
||||
target ^= static_call->function().raw();
|
||||
target = static_call->function().raw();
|
||||
call = static_call;
|
||||
} else if (current->IsClosureCall()) {
|
||||
// TODO(srdjan): Add data for closure calls.
|
||||
|
@ -1499,12 +1499,12 @@ class CallSiteInliner : public ValueObject {
|
|||
call->Receiver()->definition()->OriginalDefinition();
|
||||
if (AllocateObjectInstr* alloc = receiver->AsAllocateObject()) {
|
||||
if (!alloc->closure_function().IsNull()) {
|
||||
target ^= alloc->closure_function().raw();
|
||||
target = alloc->closure_function().raw();
|
||||
ASSERT(alloc->cls().IsClosureClass());
|
||||
}
|
||||
} else if (ConstantInstr* constant = receiver->AsConstant()) {
|
||||
if (constant->value().IsClosure()) {
|
||||
target ^= Closure::Cast(constant->value()).function();
|
||||
target = Closure::Cast(constant->value()).function();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -442,7 +442,7 @@ RawType* BytecodeReaderHelper::ReadFunctionSignature(
|
|||
|
||||
// Finalize function type.
|
||||
type = func.SignatureType();
|
||||
type ^= ClassFinalizer::FinalizeType(*(active_class_->klass), type);
|
||||
type = ClassFinalizer::FinalizeType(*(active_class_->klass), type);
|
||||
return Type::Cast(type).raw();
|
||||
}
|
||||
|
||||
|
@ -1433,7 +1433,7 @@ RawTypeArguments* BytecodeReaderHelper::ReadTypeArguments(
|
|||
// finalize the argument types.
|
||||
// (This can for example make the [type_arguments] vector larger)
|
||||
type = Type::New(instantiator, type_arguments, TokenPosition::kNoSource);
|
||||
type ^= ClassFinalizer::FinalizeType(*active_class_->klass, type);
|
||||
type = ClassFinalizer::FinalizeType(*active_class_->klass, type);
|
||||
return type.arguments();
|
||||
}
|
||||
|
||||
|
|
|
@ -579,7 +579,7 @@ void ConstantEvaluator::EvaluateConstructorInvocationInternal() {
|
|||
result_ ^= result.raw();
|
||||
} else {
|
||||
ASSERT(!receiver->IsNull());
|
||||
result_ ^= (*receiver).raw();
|
||||
result_ = (*receiver).raw();
|
||||
}
|
||||
if (I->obfuscate() &&
|
||||
(result_.clazz() == I->object_store()->symbol_class())) {
|
||||
|
@ -589,7 +589,7 @@ void ConstantEvaluator::EvaluateConstructorInvocationInternal() {
|
|||
}
|
||||
|
||||
void ConstantEvaluator::EvaluateNot() {
|
||||
result_ ^= Bool::Get(!EvaluateBooleanExpressionHere()).raw();
|
||||
result_ = Bool::Get(!EvaluateBooleanExpressionHere()).raw();
|
||||
}
|
||||
|
||||
void ConstantEvaluator::EvaluateLogicalExpression() {
|
||||
|
|
|
@ -1986,7 +1986,7 @@ Fragment StreamingFlowGraphBuilder::BuildArgumentsFromActualArguments(
|
|||
// List of named.
|
||||
list_length = ReadListLength(); // read list length.
|
||||
if (argument_names != NULL && list_length > 0) {
|
||||
*argument_names ^= Array::New(list_length, Heap::kOld);
|
||||
*argument_names = Array::New(list_length, Heap::kOld);
|
||||
}
|
||||
for (intptr_t i = 0; i < list_length; ++i) {
|
||||
String& name =
|
||||
|
@ -2916,7 +2916,7 @@ Fragment StreamingFlowGraphBuilder::BuildSuperMethodInvocation(
|
|||
|
||||
SkipListOfExpressions();
|
||||
intptr_t named_list_length = ReadListLength();
|
||||
argument_names ^= Array::New(named_list_length, H.allocation_space());
|
||||
argument_names = Array::New(named_list_length, H.allocation_space());
|
||||
for (intptr_t i = 0; i < named_list_length; i++) {
|
||||
const String& arg_name = H.DartSymbolObfuscate(ReadStringReference());
|
||||
argument_names.SetAt(i, arg_name);
|
||||
|
|
|
@ -795,9 +795,9 @@ uint32_t KernelSourceFingerprintHelper::CalculateClassFingerprint(
|
|||
uint32_t hash = 0;
|
||||
hash = KernelFingerprintHelper::CalculateHash(hash, name.Hash());
|
||||
|
||||
type ^= klass.super_type();
|
||||
type = klass.super_type();
|
||||
if (!type.IsNull()) {
|
||||
name ^= type.Name();
|
||||
name = type.Name();
|
||||
hash = KernelFingerprintHelper::CalculateHash(hash, name.Hash());
|
||||
}
|
||||
|
||||
|
@ -820,7 +820,7 @@ uint32_t KernelSourceFingerprintHelper::CalculateClassFingerprint(
|
|||
// Calculate fingerprint for the interfaces.
|
||||
for (intptr_t i = 0; i < interfaces.Length(); ++i) {
|
||||
type ^= interfaces.At(i);
|
||||
name ^= type.Name();
|
||||
name = type.Name();
|
||||
hash = KernelFingerprintHelper::CalculateHash(hash, name.Hash());
|
||||
}
|
||||
|
||||
|
|
|
@ -1799,9 +1799,9 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfNoSuchMethodForwarder(
|
|||
Function::ZoneHandle(Z, function.parent_function());
|
||||
const Class& owner = Class::ZoneHandle(Z, parent.Owner());
|
||||
AbstractType& type = AbstractType::ZoneHandle(Z);
|
||||
type ^= Type::New(owner, TypeArguments::Handle(Z), owner.token_pos(),
|
||||
Heap::kOld);
|
||||
type ^= ClassFinalizer::FinalizeType(owner, type);
|
||||
type = Type::New(owner, TypeArguments::Handle(Z), owner.token_pos(),
|
||||
Heap::kOld);
|
||||
type = ClassFinalizer::FinalizeType(owner, type);
|
||||
body += Constant(type);
|
||||
} else {
|
||||
body += LoadLocal(parsed_function_->current_context_var());
|
||||
|
|
|
@ -2899,7 +2899,7 @@ void TypeTranslator::BuildTypeParameterType() {
|
|||
if (parameter_index < class_types.Length()) {
|
||||
// The index of the type parameter in [parameters] is
|
||||
// the same index into the `klass->type_parameters()` array.
|
||||
result_ ^= class_types.TypeAt(parameter_index);
|
||||
result_ = class_types.TypeAt(parameter_index);
|
||||
return;
|
||||
}
|
||||
parameter_index -= class_types.Length();
|
||||
|
@ -2924,7 +2924,7 @@ void TypeTranslator::BuildTypeParameterType() {
|
|||
// }
|
||||
//
|
||||
if (class_types.Length() > parameter_index) {
|
||||
result_ ^= class_types.TypeAt(parameter_index);
|
||||
result_ = class_types.TypeAt(parameter_index);
|
||||
return;
|
||||
}
|
||||
parameter_index -= class_types.Length();
|
||||
|
@ -2936,7 +2936,7 @@ void TypeTranslator::BuildTypeParameterType() {
|
|||
: 0;
|
||||
if (procedure_type_parameter_count > 0) {
|
||||
if (procedure_type_parameter_count > parameter_index) {
|
||||
result_ ^=
|
||||
result_ =
|
||||
TypeArguments::Handle(Z, active_class_->member->type_parameters())
|
||||
.TypeAt(parameter_index);
|
||||
if (finalize_) {
|
||||
|
@ -2951,7 +2951,7 @@ void TypeTranslator::BuildTypeParameterType() {
|
|||
|
||||
if (active_class_->local_type_parameters != NULL) {
|
||||
if (parameter_index < active_class_->local_type_parameters->Length()) {
|
||||
result_ ^= active_class_->local_type_parameters->TypeAt(parameter_index);
|
||||
result_ = active_class_->local_type_parameters->TypeAt(parameter_index);
|
||||
if (finalize_) {
|
||||
result_ = ClassFinalizer::FinalizeType(*active_class_->klass, result_);
|
||||
}
|
||||
|
@ -2963,7 +2963,7 @@ void TypeTranslator::BuildTypeParameterType() {
|
|||
if (type_parameter_scope_ != NULL &&
|
||||
parameter_index < type_parameter_scope_->outer_parameter_count() +
|
||||
type_parameter_scope_->parameter_count()) {
|
||||
result_ ^= Type::DynamicType();
|
||||
result_ = Type::DynamicType();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2387,7 +2387,7 @@ DART_EXPORT Dart_Handle Dart_GetStaticMethodClosure(Dart_Handle library,
|
|||
return Api::NewError(
|
||||
"function_name must be the name of a regular function.");
|
||||
}
|
||||
func ^= func.ImplicitClosureFunction();
|
||||
func = func.ImplicitClosureFunction();
|
||||
if (func.IsNull()) {
|
||||
return Dart_Null();
|
||||
}
|
||||
|
@ -3707,10 +3707,10 @@ DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object,
|
|||
const auto& view_obj = Api::UnwrapTypedDataViewHandle(Z, object);
|
||||
ASSERT(!view_obj.IsNull());
|
||||
Smi& val = Smi::Handle();
|
||||
val ^= view_obj.length();
|
||||
val = view_obj.length();
|
||||
length = val.Value();
|
||||
size_in_bytes = length * TypedDataView::ElementSizeInBytes(class_id);
|
||||
val ^= view_obj.offset_in_bytes();
|
||||
val = view_obj.offset_in_bytes();
|
||||
intptr_t offset_in_bytes = val.Value();
|
||||
const auto& obj = Instance::Handle(view_obj.typed_data());
|
||||
T->IncrementNoSafepointScopeDepth();
|
||||
|
@ -5160,7 +5160,7 @@ DART_EXPORT Dart_Handle Dart_GetType(Dart_Handle library,
|
|||
number_of_type_arguments, array.Length());
|
||||
}
|
||||
// Set up the type arguments array.
|
||||
type_args_obj ^= TypeArguments::New(num_expected_type_arguments);
|
||||
type_args_obj = TypeArguments::New(num_expected_type_arguments);
|
||||
AbstractType& type_arg = AbstractType::Handle();
|
||||
for (intptr_t i = 0; i < number_of_type_arguments; i++) {
|
||||
type_arg ^= array.At(i);
|
||||
|
@ -6143,7 +6143,7 @@ static void DropRegExpMatchCode(Zone* zone) {
|
|||
ASSERT(!func.IsNull());
|
||||
Code& code = Code::Handle(zone);
|
||||
if (func.HasCode()) {
|
||||
code ^= func.CurrentCode();
|
||||
code = func.CurrentCode();
|
||||
ASSERT(!code.IsNull());
|
||||
code.DisableDartCode();
|
||||
}
|
||||
|
@ -6151,10 +6151,10 @@ static void DropRegExpMatchCode(Zone* zone) {
|
|||
func.ClearICDataArray();
|
||||
ASSERT(!func.HasCode());
|
||||
|
||||
func ^= reg_exp_class.LookupFunctionAllowPrivate(execute_match_sticky_name);
|
||||
func = reg_exp_class.LookupFunctionAllowPrivate(execute_match_sticky_name);
|
||||
ASSERT(!func.IsNull());
|
||||
if (func.HasCode()) {
|
||||
code ^= func.CurrentCode();
|
||||
code = func.CurrentCode();
|
||||
ASSERT(!code.IsNull());
|
||||
code.DisableDartCode();
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ RawObject* DartEntry::InvokeClosure(const Array& arguments,
|
|||
const String& getter_name = Symbols::GetCall();
|
||||
Class& cls = Class::Handle(zone, instance.clazz());
|
||||
while (!cls.IsNull()) {
|
||||
function ^= cls.LookupDynamicFunction(getter_name);
|
||||
function = cls.LookupDynamicFunction(getter_name);
|
||||
if (!function.IsNull()) {
|
||||
Isolate* isolate = thread->isolate();
|
||||
if (!OSThread::Current()->HasStackHeadroom()) {
|
||||
|
@ -312,7 +312,7 @@ RawObject* DartEntry::InvokeNoSuchMethod(const Instance& receiver,
|
|||
ASSERT(!FLAG_lazy_dispatchers);
|
||||
// If noSuchMethod(invocation) is not found, call Object::noSuchMethod.
|
||||
Thread* thread = Thread::Current();
|
||||
function ^= Resolver::ResolveDynamicForReceiverClass(
|
||||
function = Resolver::ResolveDynamicForReceiverClass(
|
||||
Class::Handle(thread->zone(),
|
||||
thread->isolate()->object_store()->object_class()),
|
||||
Symbols::NoSuchMethod(), nsm_args_desc);
|
||||
|
|
|
@ -633,7 +633,7 @@ void ActivationFrame::GetVarDescriptors() {
|
|||
if (!error.IsNull()) {
|
||||
Exceptions::PropagateError(error);
|
||||
}
|
||||
unoptimized_code ^= function().unoptimized_code();
|
||||
unoptimized_code = function().unoptimized_code();
|
||||
}
|
||||
ASSERT(!unoptimized_code.IsNull());
|
||||
var_descriptors_ = unoptimized_code.GetLocalVarDescriptors();
|
||||
|
@ -960,9 +960,9 @@ const Context& ActivationFrame::GetSavedCurrentContext() {
|
|||
ASSERT(function().name() == Symbols::Call().raw());
|
||||
ASSERT(function().IsInvokeFieldDispatcher());
|
||||
// Closure.call frames.
|
||||
ctx_ ^= Closure::Cast(obj).context();
|
||||
ctx_ = Closure::Cast(obj).context();
|
||||
} else if (obj.IsContext()) {
|
||||
ctx_ ^= Context::Cast(obj).raw();
|
||||
ctx_ = Context::Cast(obj).raw();
|
||||
} else {
|
||||
ASSERT(obj.IsNull());
|
||||
}
|
||||
|
@ -2062,7 +2062,7 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
|
|||
function = it.function();
|
||||
|
||||
if (skip_sync_async_frames_count > 0) {
|
||||
function_name ^= function.QualifiedScrubbedName();
|
||||
function_name = function.QualifiedScrubbedName();
|
||||
if (CheckAndSkipAsync(skip_sync_async_frames_count,
|
||||
function_name)) {
|
||||
skip_sync_async_frames_count--;
|
||||
|
@ -2117,7 +2117,7 @@ DebuggerStackTrace* Debugger::CollectAwaiterReturnStackTrace() {
|
|||
function = code.function();
|
||||
|
||||
if (skip_sync_async_frames_count > 0) {
|
||||
function_name ^= function.QualifiedScrubbedName();
|
||||
function_name = function.QualifiedScrubbedName();
|
||||
if (CheckAndSkipAsync(skip_sync_async_frames_count, function_name)) {
|
||||
skip_sync_async_frames_count--;
|
||||
} else {
|
||||
|
|
|
@ -919,7 +919,7 @@ uword DeoptInstr::GetRetAddress(DeoptInstr* instr,
|
|||
if (!error.IsNull()) {
|
||||
Exceptions::PropagateError(error);
|
||||
}
|
||||
*code ^= function.unoptimized_code();
|
||||
*code = function.unoptimized_code();
|
||||
ASSERT(!code->IsNull());
|
||||
uword res = code->GetPcForDeoptId(ret_address_instr->deopt_id(),
|
||||
RawPcDescriptors::kDeopt);
|
||||
|
|
|
@ -511,7 +511,7 @@ void Dwarf::WriteLines() {
|
|||
String& uri = String::Handle(zone_);
|
||||
for (intptr_t i = 0; i < scripts_.length(); i++) {
|
||||
const Script& script = *(scripts_[i]);
|
||||
uri ^= script.url();
|
||||
uri = script.url();
|
||||
Print(".string \"%s\"\n", uri.ToCString());
|
||||
uleb128(0); // Include directory index.
|
||||
uleb128(0); // File modification time.
|
||||
|
|
|
@ -104,7 +104,7 @@ void PreallocatedStackTraceBuilder::AddFrame(const Object& code,
|
|||
dropped_frames_++;
|
||||
}
|
||||
// Encode the number of dropped frames into the pc offset.
|
||||
frame_offset ^= Smi::New(dropped_frames_);
|
||||
frame_offset = Smi::New(dropped_frames_);
|
||||
stacktrace_.SetPcOffsetAtFrame(null_slot, frame_offset);
|
||||
// Move frames one slot down so that we can accommodate the new frame.
|
||||
for (intptr_t i = start; i < StackTrace::kPreallocatedStackdepth; i++) {
|
||||
|
@ -698,7 +698,7 @@ static void ThrowExceptionHelper(Thread* thread,
|
|||
thread->long_jump_base()->Jump(1, error);
|
||||
UNREACHABLE();
|
||||
}
|
||||
stacktrace ^= isolate->object_store()->preallocated_stack_trace();
|
||||
stacktrace = isolate->object_store()->preallocated_stack_trace();
|
||||
PreallocatedStackTraceBuilder frame_builder(stacktrace);
|
||||
ASSERT(existing_stacktrace.IsNull() ||
|
||||
(existing_stacktrace.raw() == stacktrace.raw()));
|
||||
|
|
|
@ -2463,7 +2463,7 @@ void Isolate::AppendServiceExtensionCall(const Instance& closure,
|
|||
GrowableObjectArray::Handle(pending_service_extension_calls());
|
||||
bool schedule_drain = false;
|
||||
if (calls.IsNull()) {
|
||||
calls ^= GrowableObjectArray::New();
|
||||
calls = GrowableObjectArray::New();
|
||||
ASSERT(!calls.IsNull());
|
||||
set_pending_service_extension_calls(calls);
|
||||
schedule_drain = true;
|
||||
|
@ -2510,7 +2510,7 @@ void Isolate::RegisterServiceExtensionHandler(const String& name,
|
|||
GrowableObjectArray& handlers =
|
||||
GrowableObjectArray::Handle(registered_service_extension_handlers());
|
||||
if (handlers.IsNull()) {
|
||||
handlers ^= GrowableObjectArray::New(Heap::kOld);
|
||||
handlers = GrowableObjectArray::New(Heap::kOld);
|
||||
set_registered_service_extension_handlers(handlers);
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
|
@ -2966,8 +2966,8 @@ IsolateSpawnState::IsolateSpawnState(Dart_Port parent_port,
|
|||
library_url_ = NewConstChar(lib_url.ToCString());
|
||||
|
||||
String& func_name = String::Handle();
|
||||
func_name ^= func.name();
|
||||
func_name ^= String::ScrubName(func_name);
|
||||
func_name = func.name();
|
||||
func_name = String::ScrubName(func_name);
|
||||
function_name_ = NewConstChar(func_name.ToCString());
|
||||
if (!cls.IsTopLevel()) {
|
||||
const String& class_name = String::Handle(cls.Name());
|
||||
|
|
|
@ -172,7 +172,7 @@ void InstanceMorpher::RunNewFieldInitializers() const {
|
|||
// Create a function that returns the expression.
|
||||
const Field* field = new_fields_->At(i);
|
||||
if (field->kernel_offset() > 0) {
|
||||
eval_func ^= kernel::CreateFieldInitializerFunction(thread, zone, *field);
|
||||
eval_func = kernel::CreateFieldInitializerFunction(thread, zone, *field);
|
||||
} else {
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
@ -1090,7 +1090,7 @@ void IsolateReloadContext::FindModifiedSources(
|
|||
scripts = lib.LoadedScripts();
|
||||
for (intptr_t script_idx = 0; script_idx < scripts.Length(); script_idx++) {
|
||||
script ^= scripts.At(script_idx);
|
||||
uri ^= script.url();
|
||||
uri = script.url();
|
||||
if (ContainsScriptUri(modified_sources_uris, uri.ToCString())) {
|
||||
// We've already accounted for this script in a prior library.
|
||||
continue;
|
||||
|
@ -1200,7 +1200,7 @@ BitVector* IsolateReloadContext::FindModifiedLibraries(bool force_reload,
|
|||
if (root_lib_modified) {
|
||||
// The root library was either moved or replaced. Mark it as modified to
|
||||
// force a reload of the potential root library replacement.
|
||||
lib ^= object_store()->root_library();
|
||||
lib = object_store()->root_library();
|
||||
modified_libs->Add(lib.index());
|
||||
}
|
||||
|
||||
|
@ -1958,7 +1958,7 @@ void IsolateReloadContext::RunInvalidationVisitors() {
|
|||
const KernelProgramInfo& info = *kernel_infos[i];
|
||||
// Clear the libraries cache.
|
||||
{
|
||||
data ^= info.libraries_cache();
|
||||
data = info.libraries_cache();
|
||||
ASSERT(!data.IsNull());
|
||||
IntHashMap table(&key, &value, &data);
|
||||
table.Clear();
|
||||
|
@ -1966,7 +1966,7 @@ void IsolateReloadContext::RunInvalidationVisitors() {
|
|||
}
|
||||
// Clear the classes cache.
|
||||
{
|
||||
data ^= info.classes_cache();
|
||||
data = info.classes_cache();
|
||||
ASSERT(!data.IsNull());
|
||||
IntHashMap table(&key, &value, &data);
|
||||
table.Clear();
|
||||
|
@ -2118,7 +2118,7 @@ RawLibrary* IsolateReloadContext::OldLibraryOrNullBaseMoved(
|
|||
if (!old_url.StartsWith(old_url_prefix)) {
|
||||
continue;
|
||||
}
|
||||
old_suffix ^= String::SubString(old_url, old_prefix_length);
|
||||
old_suffix = String::SubString(old_url, old_prefix_length);
|
||||
if (old_suffix.IsNull()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2139,7 +2139,7 @@ void IsolateReloadContext::BuildLibraryMapping() {
|
|||
Library& old = Library::Handle();
|
||||
for (intptr_t i = num_saved_libs_; i < libs.Length(); i++) {
|
||||
replacement_or_new = Library::RawCast(libs.At(i));
|
||||
old ^= OldLibraryOrNull(replacement_or_new);
|
||||
old = OldLibraryOrNull(replacement_or_new);
|
||||
if (old.IsNull()) {
|
||||
if (FLAG_identity_reload) {
|
||||
TIR_Print("Could not find original library for %s\n",
|
||||
|
|
|
@ -1996,14 +1996,14 @@ RawScript* KernelLoader::LoadScriptAt(intptr_t index,
|
|||
wrapper.uri = &uri_string;
|
||||
UriToSourceTableEntry* pair = uri_to_source_table->LookupValue(&wrapper);
|
||||
if (pair != nullptr) {
|
||||
sources ^= pair->sources->raw();
|
||||
line_starts ^= pair->line_starts->raw();
|
||||
sources = pair->sources->raw();
|
||||
line_starts = pair->line_starts->raw();
|
||||
}
|
||||
}
|
||||
|
||||
if (sources.IsNull() || line_starts.IsNull()) {
|
||||
const String& script_source = helper_.GetSourceFor(index);
|
||||
line_starts ^= helper_.GetLineStartsFor(index);
|
||||
line_starts = helper_.GetLineStartsFor(index);
|
||||
|
||||
if (script_source.raw() == Symbols::Empty().raw() &&
|
||||
line_starts.Length() == 0 && uri_string.Length() > 0) {
|
||||
|
@ -2017,8 +2017,8 @@ RawScript* KernelLoader::LoadScriptAt(intptr_t index,
|
|||
lib ^= libs.At(i);
|
||||
script = lib.LookupScript(uri_string, /* useResolvedUri = */ true);
|
||||
if (!script.IsNull() && script.kind() == RawScript::kKernelTag) {
|
||||
sources ^= script.Source();
|
||||
line_starts ^= script.line_starts();
|
||||
sources = script.Source();
|
||||
line_starts = script.line_starts();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ const uint8_t* NativeEntry::ResolveSymbol(uword pc) {
|
|||
Thread* thread = Thread::Current();
|
||||
REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(thread);
|
||||
GrowableObjectArray& libs = reused_growable_object_array_handle.Handle();
|
||||
libs ^= thread->isolate()->object_store()->libraries();
|
||||
libs = thread->isolate()->object_store()->libraries();
|
||||
ASSERT(!libs.IsNull());
|
||||
intptr_t num_libs = libs.Length();
|
||||
for (intptr_t i = 0; i < num_libs; i++) {
|
||||
|
|
|
@ -1507,8 +1507,8 @@ RawError* Object::Init(Isolate* isolate,
|
|||
// declared number of type parameters is still 0. It will become 1 after
|
||||
// patching. The array type allocated below represents the raw type _List
|
||||
// and not _List<E> as we could expect. Use with caution.
|
||||
type ^= Type::New(Class::Handle(zone, cls.raw()),
|
||||
TypeArguments::Handle(zone), TokenPosition::kNoSource);
|
||||
type = Type::New(Class::Handle(zone, cls.raw()),
|
||||
TypeArguments::Handle(zone), TokenPosition::kNoSource);
|
||||
type.SetIsFinalized();
|
||||
type ^= type.Canonicalize();
|
||||
object_store->set_array_type(type);
|
||||
|
@ -2582,13 +2582,13 @@ intptr_t Class::FindImplicitClosureFunctionIndex(const Function& needle) const {
|
|||
REUSABLE_FUNCTION_HANDLESCOPE(thread);
|
||||
Array& funcs = thread->ArrayHandle();
|
||||
Function& function = thread->FunctionHandle();
|
||||
funcs ^= functions();
|
||||
funcs = functions();
|
||||
ASSERT(!funcs.IsNull());
|
||||
Function& implicit_closure = Function::Handle(thread->zone());
|
||||
const intptr_t len = funcs.Length();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
function ^= funcs.At(i);
|
||||
implicit_closure ^= function.implicit_closure_function();
|
||||
implicit_closure = function.implicit_closure_function();
|
||||
if (implicit_closure.IsNull()) {
|
||||
// Skip non-implicit closure functions.
|
||||
continue;
|
||||
|
@ -2611,7 +2611,7 @@ intptr_t Class::FindInvocationDispatcherFunctionIndex(
|
|||
REUSABLE_OBJECT_HANDLESCOPE(thread);
|
||||
Array& funcs = thread->ArrayHandle();
|
||||
Object& object = thread->ObjectHandle();
|
||||
funcs ^= invocation_dispatcher_cache();
|
||||
funcs = invocation_dispatcher_cache();
|
||||
ASSERT(!funcs.IsNull());
|
||||
const intptr_t len = funcs.Length();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
|
@ -2634,7 +2634,7 @@ RawFunction* Class::InvocationDispatcherFunctionFromIndex(intptr_t idx) const {
|
|||
REUSABLE_OBJECT_HANDLESCOPE(thread);
|
||||
Array& dispatcher_cache = thread->ArrayHandle();
|
||||
Object& object = thread->ObjectHandle();
|
||||
dispatcher_cache ^= invocation_dispatcher_cache();
|
||||
dispatcher_cache = invocation_dispatcher_cache();
|
||||
object = dispatcher_cache.At(idx);
|
||||
if (!object.IsFunction()) {
|
||||
return Function::null();
|
||||
|
@ -2810,7 +2810,7 @@ RawTypeParameter* Class::LookupTypeParameter(const String& type_name) const {
|
|||
TypeParameter& type_param = thread->TypeParameterHandle();
|
||||
String& type_param_name = thread->StringHandle();
|
||||
|
||||
type_params ^= type_parameters();
|
||||
type_params = type_parameters();
|
||||
if (!type_params.IsNull()) {
|
||||
const intptr_t num_type_params = type_params.Length();
|
||||
for (intptr_t i = 0; i < num_type_params; i++) {
|
||||
|
@ -2888,7 +2888,7 @@ void Class::AddInvocationDispatcher(const String& target_name,
|
|||
cache.Length() == 0
|
||||
? static_cast<intptr_t>(Class::kInvocationDispatcherEntrySize)
|
||||
: cache.Length() * 2;
|
||||
cache ^= Array::Grow(cache, new_len);
|
||||
cache = Array::Grow(cache, new_len);
|
||||
set_invocation_dispatcher_cache(cache);
|
||||
}
|
||||
auto entry = dispatchers[i];
|
||||
|
@ -3041,7 +3041,7 @@ RawFunction* Function::GetMethodExtractor(const String& getter_name) const {
|
|||
const Class& owner = Class::Handle(closure_function.Owner());
|
||||
Function& result = Function::Handle(owner.LookupDynamicFunction(getter_name));
|
||||
if (result.IsNull()) {
|
||||
result ^= CreateMethodExtractor(getter_name);
|
||||
result = CreateMethodExtractor(getter_name);
|
||||
}
|
||||
ASSERT(result.kind() == RawFunction::kMethodExtractor);
|
||||
return result.raw();
|
||||
|
@ -3479,7 +3479,7 @@ RawObject* Class::InvokeSetter(const String& setter_name,
|
|||
InvocationMirror::kStatic,
|
||||
InvocationMirror::kSetter);
|
||||
}
|
||||
parameter_type ^= setter.ParameterTypeAt(0);
|
||||
parameter_type = setter.ParameterTypeAt(0);
|
||||
if (!argument_type.IsNullType() && !parameter_type.IsDynamicType() &&
|
||||
!value.IsInstanceOf(parameter_type, Object::null_type_arguments(),
|
||||
Object::null_type_arguments())) {
|
||||
|
@ -3502,7 +3502,7 @@ RawObject* Class::InvokeSetter(const String& setter_name,
|
|||
InvocationMirror::kSetter);
|
||||
}
|
||||
|
||||
parameter_type ^= field.type();
|
||||
parameter_type = field.type();
|
||||
if (!argument_type.IsNullType() && !parameter_type.IsDynamicType() &&
|
||||
!value.IsInstanceOf(parameter_type, Object::null_type_arguments(),
|
||||
Object::null_type_arguments())) {
|
||||
|
@ -4556,7 +4556,7 @@ RawFunction* Class::LookupFunction(const String& name, MemberKind kind) const {
|
|||
REUSABLE_ARRAY_HANDLESCOPE(thread);
|
||||
REUSABLE_FUNCTION_HANDLESCOPE(thread);
|
||||
Array& funcs = thread->ArrayHandle();
|
||||
funcs ^= functions();
|
||||
funcs = functions();
|
||||
ASSERT(!funcs.IsNull());
|
||||
const intptr_t len = funcs.Length();
|
||||
Function& function = thread->FunctionHandle();
|
||||
|
@ -4588,7 +4588,7 @@ RawFunction* Class::LookupFunction(const String& name, MemberKind kind) const {
|
|||
String& function_name = thread->StringHandle();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
function ^= funcs.At(i);
|
||||
function_name ^= function.name();
|
||||
function_name = function.name();
|
||||
if (function_name.Equals(name)) {
|
||||
return CheckFunctionType(function, kind);
|
||||
}
|
||||
|
@ -4608,14 +4608,14 @@ RawFunction* Class::LookupFunctionAllowPrivate(const String& name,
|
|||
REUSABLE_FUNCTION_HANDLESCOPE(thread);
|
||||
REUSABLE_STRING_HANDLESCOPE(thread);
|
||||
Array& funcs = thread->ArrayHandle();
|
||||
funcs ^= functions();
|
||||
funcs = functions();
|
||||
ASSERT(!funcs.IsNull());
|
||||
const intptr_t len = funcs.Length();
|
||||
Function& function = thread->FunctionHandle();
|
||||
String& function_name = thread->StringHandle();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
function ^= funcs.At(i);
|
||||
function_name ^= function.name();
|
||||
function_name = function.name();
|
||||
if (String::EqualsIgnoringPrivateKey(function_name, name)) {
|
||||
return CheckFunctionType(function, kind);
|
||||
}
|
||||
|
@ -4643,13 +4643,13 @@ RawFunction* Class::LookupAccessorFunction(const char* prefix,
|
|||
REUSABLE_FUNCTION_HANDLESCOPE(thread);
|
||||
REUSABLE_STRING_HANDLESCOPE(thread);
|
||||
Array& funcs = thread->ArrayHandle();
|
||||
funcs ^= functions();
|
||||
funcs = functions();
|
||||
intptr_t len = funcs.Length();
|
||||
Function& function = thread->FunctionHandle();
|
||||
String& function_name = thread->StringHandle();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
function ^= funcs.At(i);
|
||||
function_name ^= function.name();
|
||||
function_name = function.name();
|
||||
if (MatchesAccessorName(function_name, prefix, prefix_length, name)) {
|
||||
return function.raw();
|
||||
}
|
||||
|
@ -4680,7 +4680,7 @@ RawField* Class::LookupField(const String& name, MemberKind kind) const {
|
|||
REUSABLE_FIELD_HANDLESCOPE(thread);
|
||||
REUSABLE_STRING_HANDLESCOPE(thread);
|
||||
Array& flds = thread->ArrayHandle();
|
||||
flds ^= fields();
|
||||
flds = fields();
|
||||
ASSERT(!flds.IsNull());
|
||||
intptr_t len = flds.Length();
|
||||
Field& field = thread->FieldHandle();
|
||||
|
@ -4702,7 +4702,7 @@ RawField* Class::LookupField(const String& name, MemberKind kind) const {
|
|||
String& field_name = thread->StringHandle();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
field ^= flds.At(i);
|
||||
field_name ^= field.name();
|
||||
field_name = field.name();
|
||||
if (name.Equals(field_name)) {
|
||||
if (kind == kInstance) {
|
||||
return field.is_static() ? Field::null() : field.raw();
|
||||
|
@ -4728,14 +4728,14 @@ RawField* Class::LookupFieldAllowPrivate(const String& name,
|
|||
REUSABLE_FIELD_HANDLESCOPE(thread);
|
||||
REUSABLE_STRING_HANDLESCOPE(thread);
|
||||
Array& flds = thread->ArrayHandle();
|
||||
flds ^= fields();
|
||||
flds = fields();
|
||||
ASSERT(!flds.IsNull());
|
||||
intptr_t len = flds.Length();
|
||||
Field& field = thread->FieldHandle();
|
||||
String& field_name = thread->StringHandle();
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
field ^= flds.At(i);
|
||||
field_name ^= field.name();
|
||||
field_name = field.name();
|
||||
if (field.is_static() && instance_only) {
|
||||
// If we only care about instance fields, skip statics.
|
||||
continue;
|
||||
|
@ -5573,7 +5573,7 @@ RawTypeArguments* TypeArguments::Canonicalize(TrailPtr trail) const {
|
|||
if (this->IsNew()) {
|
||||
result ^= Object::Clone(*this, Heap::kOld);
|
||||
} else {
|
||||
result ^= this->raw();
|
||||
result = this->raw();
|
||||
}
|
||||
ASSERT(result.IsOld());
|
||||
result.SetCanonical(); // Mark object as being canonical.
|
||||
|
@ -6449,7 +6449,7 @@ intptr_t Function::NumParentTypeParameters() const {
|
|||
while (!parent.IsNull()) {
|
||||
num_parent_type_params += parent.NumTypeParameters(thread);
|
||||
if (parent.IsImplicitClosureFunction()) break;
|
||||
parent ^= parent.parent_function();
|
||||
parent = parent.parent_function();
|
||||
}
|
||||
return num_parent_type_params;
|
||||
}
|
||||
|
@ -6462,7 +6462,7 @@ void Function::PrintSignatureTypes() const {
|
|||
THR_Print("%s%s\n",
|
||||
sig_fun.IsImplicitClosureFunction() ? "implicit closure: " : "",
|
||||
sig_type.ToCString());
|
||||
sig_fun ^= sig_fun.parent_function();
|
||||
sig_fun = sig_fun.parent_function();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6480,9 +6480,9 @@ RawTypeParameter* Function::LookupTypeParameter(
|
|||
String& type_param_name = thread->StringHandle();
|
||||
Function& function = thread->FunctionHandle();
|
||||
|
||||
function ^= this->raw();
|
||||
function = this->raw();
|
||||
while (!function.IsNull()) {
|
||||
type_params ^= function.type_parameters();
|
||||
type_params = function.type_parameters();
|
||||
if (!type_params.IsNull()) {
|
||||
const intptr_t num_type_params = type_params.Length();
|
||||
for (intptr_t i = 0; i < num_type_params; i++) {
|
||||
|
@ -6498,7 +6498,7 @@ RawTypeParameter* Function::LookupTypeParameter(
|
|||
// function with identical type parameters.
|
||||
break;
|
||||
}
|
||||
function ^= function.parent_function();
|
||||
function = function.parent_function();
|
||||
if (function_level != NULL) {
|
||||
(*function_level)--;
|
||||
}
|
||||
|
@ -6756,7 +6756,7 @@ bool Function::AreValidArguments(const ArgumentsDescriptor& args_desc,
|
|||
String& argument_name = String::Handle(zone);
|
||||
String& parameter_name = String::Handle(zone);
|
||||
for (intptr_t i = 0; i < num_named_arguments; i++) {
|
||||
argument_name ^= args_desc.NameAt(i);
|
||||
argument_name = args_desc.NameAt(i);
|
||||
ASSERT(argument_name.IsSymbol());
|
||||
bool found = false;
|
||||
const intptr_t num_positional_args = num_arguments - num_named_arguments;
|
||||
|
@ -6795,9 +6795,9 @@ RawObject* Function::DoArgumentTypesMatch(
|
|||
Function& instantiated_func = Function::Handle(zone, raw());
|
||||
|
||||
if (!HasInstantiatedSignature()) {
|
||||
instantiated_func ^= InstantiateSignatureFrom(instantiator_type_args,
|
||||
Object::null_type_arguments(),
|
||||
kAllFree, Heap::kOld);
|
||||
instantiated_func = InstantiateSignatureFrom(instantiator_type_args,
|
||||
Object::null_type_arguments(),
|
||||
kAllFree, Heap::kOld);
|
||||
}
|
||||
AbstractType& argument_type = AbstractType::Handle(zone);
|
||||
AbstractType& parameter_type = AbstractType::Handle(zone);
|
||||
|
@ -6807,8 +6807,8 @@ RawObject* Function::DoArgumentTypesMatch(
|
|||
for (intptr_t i = args_desc.FirstArgIndex(); i < args_desc.PositionalCount();
|
||||
++i) {
|
||||
argument ^= args.At(i);
|
||||
argument_type ^= argument.GetType(Heap::kOld);
|
||||
parameter_type ^= instantiated_func.ParameterTypeAt(i);
|
||||
argument_type = argument.GetType(Heap::kOld);
|
||||
parameter_type = instantiated_func.ParameterTypeAt(i);
|
||||
|
||||
// If the argument type is dynamic or the parameter is null, move on.
|
||||
if (parameter_type.IsDynamicType() || argument_type.IsNullType()) {
|
||||
|
@ -6833,7 +6833,7 @@ RawObject* Function::DoArgumentTypesMatch(
|
|||
|
||||
// Check types of named arguments against expected parameter type.
|
||||
for (intptr_t i = 0; i < num_named_arguments; i++) {
|
||||
argument_name ^= args_desc.NameAt(i);
|
||||
argument_name = args_desc.NameAt(i);
|
||||
ASSERT(argument_name.IsSymbol());
|
||||
bool found = false;
|
||||
const intptr_t num_positional_args = num_arguments - num_named_arguments;
|
||||
|
@ -6847,8 +6847,8 @@ RawObject* Function::DoArgumentTypesMatch(
|
|||
if (argument_name.Equals(parameter_name)) {
|
||||
found = true;
|
||||
argument ^= args.At(args_desc.PositionAt(i));
|
||||
argument_type ^= argument.GetType(Heap::kOld);
|
||||
parameter_type ^= instantiated_func.ParameterTypeAt(j);
|
||||
argument_type = argument.GetType(Heap::kOld);
|
||||
parameter_type = instantiated_func.ParameterTypeAt(j);
|
||||
|
||||
// If the argument type is dynamic or the parameter is null, move on.
|
||||
if (parameter_type.IsDynamicType() || argument_type.IsNullType()) {
|
||||
|
@ -7022,7 +7022,7 @@ RawFunction* Function::InstantiateSignatureFrom(
|
|||
param_name = type_param.name();
|
||||
const bool is_generic_covariant = type_param.IsGenericCovariantImpl();
|
||||
ASSERT(type_param.IsFinalized());
|
||||
type_param ^=
|
||||
type_param =
|
||||
TypeParameter::New(cls, sig, type_param.index(), param_name, type,
|
||||
is_generic_covariant, type_param.token_pos());
|
||||
type_param.SetIsFinalized();
|
||||
|
@ -10397,7 +10397,7 @@ RawObject* Library::LookupEntry(const String& name, intptr_t* index) const {
|
|||
REUSABLE_OBJECT_HANDLESCOPE(thread);
|
||||
REUSABLE_STRING_HANDLESCOPE(thread);
|
||||
Array& dict = thread->ArrayHandle();
|
||||
dict ^= dictionary();
|
||||
dict = dictionary();
|
||||
intptr_t dict_size = dict.Length() - 1;
|
||||
*index = name.Hash() % dict_size;
|
||||
Object& entry = thread->ObjectHandle();
|
||||
|
@ -10491,7 +10491,7 @@ RawArray* Library::LoadedScripts() const {
|
|||
AddScriptIfUnique(scripts, owner_script);
|
||||
}
|
||||
|
||||
cls ^= toplevel_class();
|
||||
cls = toplevel_class();
|
||||
if (!cls.IsNull()) {
|
||||
owner_script = cls.script();
|
||||
AddScriptIfUnique(scripts, owner_script);
|
||||
|
@ -10658,7 +10658,7 @@ RawObject* Library::LookupImportedObject(const String& name) const {
|
|||
String& found_obj_name = String::Handle();
|
||||
ASSERT(!ShouldBePrivate(name));
|
||||
for (intptr_t i = 0; i < num_imports(); i++) {
|
||||
import ^= ImportAt(i);
|
||||
import = ImportAt(i);
|
||||
obj = import.Lookup(name);
|
||||
if (!obj.IsNull()) {
|
||||
import_lib = import.library();
|
||||
|
@ -11103,7 +11103,7 @@ RawObject* Library::InvokeSetter(const String& setter_name,
|
|||
if (check_is_entrypoint) {
|
||||
CHECK_ERROR(field.VerifyEntryPoint(EntryPointPragma::kSetterOnly));
|
||||
}
|
||||
setter_type ^= field.type();
|
||||
setter_type = field.type();
|
||||
if (!argument_type.IsNullType() && !setter_type.IsDynamicType() &&
|
||||
!value.IsInstanceOf(setter_type, Object::null_type_arguments(),
|
||||
Object::null_type_arguments())) {
|
||||
|
@ -11143,7 +11143,7 @@ RawObject* Library::InvokeSetter(const String& setter_name,
|
|||
InvocationMirror::kTopLevel, InvocationMirror::kSetter);
|
||||
}
|
||||
|
||||
setter_type ^= setter.ParameterTypeAt(0);
|
||||
setter_type = setter.ParameterTypeAt(0);
|
||||
if (!argument_type.IsNullType() && !setter_type.IsDynamicType() &&
|
||||
!value.IsInstanceOf(setter_type, Object::null_type_arguments(),
|
||||
Object::null_type_arguments())) {
|
||||
|
@ -11992,12 +11992,12 @@ RawObject* Namespace::Lookup(const String& name,
|
|||
if (!Field::IsGetterName(name) && !Field::IsSetterName(name) &&
|
||||
(obj.IsNull() || obj.IsLibraryPrefix())) {
|
||||
String& accessor_name = String::Handle(zone);
|
||||
accessor_name ^= Field::LookupGetterSymbol(name);
|
||||
accessor_name = Field::LookupGetterSymbol(name);
|
||||
if (!accessor_name.IsNull()) {
|
||||
obj = lib.LookupEntry(accessor_name, &ignore);
|
||||
}
|
||||
if (obj.IsNull()) {
|
||||
accessor_name ^= Field::LookupSetterSymbol(name);
|
||||
accessor_name = Field::LookupSetterSymbol(name);
|
||||
if (!accessor_name.IsNull()) {
|
||||
obj = lib.LookupEntry(accessor_name, &ignore);
|
||||
}
|
||||
|
@ -12128,7 +12128,7 @@ RawLibrary* KernelProgramInfo::LookupLibrary(Thread* thread,
|
|||
{
|
||||
Isolate* isolate = thread->isolate();
|
||||
SafepointMutexLocker ml(isolate->kernel_data_lib_cache_mutex());
|
||||
data ^= libraries_cache();
|
||||
data = libraries_cache();
|
||||
ASSERT(!data.IsNull());
|
||||
IntHashMap table(&key, &value, &data);
|
||||
result ^= table.GetOrNull(name_index);
|
||||
|
@ -12151,7 +12151,7 @@ RawLibrary* KernelProgramInfo::InsertLibrary(Thread* thread,
|
|||
{
|
||||
Isolate* isolate = thread->isolate();
|
||||
SafepointMutexLocker ml(isolate->kernel_data_lib_cache_mutex());
|
||||
data ^= libraries_cache();
|
||||
data = libraries_cache();
|
||||
ASSERT(!data.IsNull());
|
||||
IntHashMap table(&key, &value, &data);
|
||||
result ^= table.InsertOrGetValue(name_index, lib);
|
||||
|
@ -12177,7 +12177,7 @@ RawClass* KernelProgramInfo::LookupClass(Thread* thread,
|
|||
{
|
||||
Isolate* isolate = thread->isolate();
|
||||
SafepointMutexLocker ml(isolate->kernel_data_class_cache_mutex());
|
||||
data ^= classes_cache();
|
||||
data = classes_cache();
|
||||
ASSERT(!data.IsNull());
|
||||
IntHashMap table(&key, &value, &data);
|
||||
result ^= table.GetOrNull(name_index);
|
||||
|
@ -12200,7 +12200,7 @@ RawClass* KernelProgramInfo::InsertClass(Thread* thread,
|
|||
{
|
||||
Isolate* isolate = thread->isolate();
|
||||
SafepointMutexLocker ml(isolate->kernel_data_class_cache_mutex());
|
||||
data ^= classes_cache();
|
||||
data = classes_cache();
|
||||
ASSERT(!data.IsNull());
|
||||
IntHashMap table(&key, &value, &data);
|
||||
result ^= table.InsertOrGetValue(name_index, klass);
|
||||
|
@ -14868,7 +14868,7 @@ RawCode* Code::FindCode(uword pc, int64_t timestamp) {
|
|||
// Found code in isolate.
|
||||
return code.raw();
|
||||
}
|
||||
code ^= Code::LookupCodeInVmIsolate(pc);
|
||||
code = Code::LookupCodeInVmIsolate(pc);
|
||||
if (!code.IsNull() && (code.compile_timestamp() == timestamp) &&
|
||||
(code.PayloadStart() == pc)) {
|
||||
// Found code in VM isolate.
|
||||
|
@ -15660,12 +15660,12 @@ void SubtypeTestCache::GetCheck(
|
|||
SubtypeTestCacheTable entries(data);
|
||||
auto entry = entries[ix];
|
||||
*instance_class_id_or_function = entry.Get<kInstanceClassIdOrFunction>();
|
||||
*instance_type_arguments ^= entry.Get<kInstanceTypeArguments>();
|
||||
*instantiator_type_arguments ^= entry.Get<kInstantiatorTypeArguments>();
|
||||
*function_type_arguments ^= entry.Get<kFunctionTypeArguments>();
|
||||
*instance_parent_function_type_arguments ^=
|
||||
*instance_type_arguments = entry.Get<kInstanceTypeArguments>();
|
||||
*instantiator_type_arguments = entry.Get<kInstantiatorTypeArguments>();
|
||||
*function_type_arguments = entry.Get<kFunctionTypeArguments>();
|
||||
*instance_parent_function_type_arguments =
|
||||
entry.Get<kInstanceParentFunctionTypeArguments>();
|
||||
*instance_delayed_type_arguments ^=
|
||||
*instance_delayed_type_arguments =
|
||||
entry.Get<kInstanceDelayedFunctionTypeArguments>();
|
||||
*test_result ^= entry.Get<kTestResult>();
|
||||
}
|
||||
|
@ -15969,7 +15969,7 @@ RawObject* Instance::InvokeGetter(const String& getter_name,
|
|||
Class& klass = Class::Handle(zone, clazz());
|
||||
TypeArguments& type_args = TypeArguments::Handle(zone);
|
||||
if (klass.NumTypeArguments() > 0) {
|
||||
type_args ^= GetTypeArguments();
|
||||
type_args = GetTypeArguments();
|
||||
}
|
||||
|
||||
const String& internal_getter_name =
|
||||
|
@ -16027,7 +16027,7 @@ RawObject* Instance::InvokeSetter(const String& setter_name,
|
|||
const Class& klass = Class::Handle(zone, clazz());
|
||||
TypeArguments& type_args = TypeArguments::Handle(zone);
|
||||
if (klass.NumTypeArguments() > 0) {
|
||||
type_args ^= GetTypeArguments();
|
||||
type_args = GetTypeArguments();
|
||||
}
|
||||
|
||||
const String& internal_setter_name =
|
||||
|
@ -16083,7 +16083,7 @@ RawObject* Instance::Invoke(const String& function_name,
|
|||
|
||||
TypeArguments& type_args = TypeArguments::Handle(zone);
|
||||
if (klass.NumTypeArguments() > 0) {
|
||||
type_args ^= GetTypeArguments();
|
||||
type_args = GetTypeArguments();
|
||||
}
|
||||
|
||||
if (function.IsNull()) {
|
||||
|
@ -16284,7 +16284,7 @@ RawInstance* Instance::CheckAndCanonicalize(Thread* thread,
|
|||
const Class& cls = Class::Handle(zone, this->clazz());
|
||||
{
|
||||
SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
|
||||
result ^= cls.LookupCanonicalInstance(zone, *this);
|
||||
result = cls.LookupCanonicalInstance(zone, *this);
|
||||
if (!result.IsNull()) {
|
||||
return result.raw();
|
||||
}
|
||||
|
@ -16293,7 +16293,7 @@ RawInstance* Instance::CheckAndCanonicalize(Thread* thread,
|
|||
// Create a canonical object in old space.
|
||||
result ^= Object::Clone(*this, Heap::kOld);
|
||||
} else {
|
||||
result ^= this->raw();
|
||||
result = this->raw();
|
||||
}
|
||||
ASSERT(result.IsOld());
|
||||
result.SetCanonical();
|
||||
|
@ -17293,8 +17293,8 @@ RawType* Type::NewNonParameterizedType(const Class& type_class) {
|
|||
// yet, so do not call DeclarationType().
|
||||
Type& type = Type::Handle(type_class.declaration_type());
|
||||
if (type.IsNull()) {
|
||||
type ^= Type::New(Class::Handle(type_class.raw()),
|
||||
Object::null_type_arguments(), TokenPosition::kNoSource);
|
||||
type = Type::New(Class::Handle(type_class.raw()),
|
||||
Object::null_type_arguments(), TokenPosition::kNoSource);
|
||||
type.SetIsFinalized();
|
||||
type ^= type.Canonicalize();
|
||||
type_class.set_declaration_type(type);
|
||||
|
@ -17654,7 +17654,7 @@ RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
|
|||
if (this->IsNew()) {
|
||||
type ^= Object::Clone(*this, Heap::kOld);
|
||||
} else {
|
||||
type ^= this->raw();
|
||||
type = this->raw();
|
||||
}
|
||||
ASSERT(type.IsOld());
|
||||
type.ComputeHash();
|
||||
|
@ -17729,7 +17729,7 @@ RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
|
|||
if (this->IsNew()) {
|
||||
type ^= Object::Clone(*this, Heap::kOld);
|
||||
} else {
|
||||
type ^= this->raw();
|
||||
type = this->raw();
|
||||
}
|
||||
ASSERT(type.IsOld());
|
||||
type.SetCanonical(); // Mark object as being canonical.
|
||||
|
@ -18674,7 +18674,7 @@ RawMint* Mint::NewCanonical(int64_t value) {
|
|||
Isolate* isolate = thread->isolate();
|
||||
const Class& cls = Class::Handle(zone, isolate->object_store()->mint_class());
|
||||
Mint& canonical_value = Mint::Handle(zone);
|
||||
canonical_value ^= cls.LookupCanonicalMint(zone, value);
|
||||
canonical_value = cls.LookupCanonicalMint(zone, value);
|
||||
if (!canonical_value.IsNull()) {
|
||||
return canonical_value.raw();
|
||||
}
|
||||
|
@ -18682,7 +18682,7 @@ RawMint* Mint::NewCanonical(int64_t value) {
|
|||
SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
|
||||
// Retry lookup.
|
||||
{
|
||||
canonical_value ^= cls.LookupCanonicalMint(zone, value);
|
||||
canonical_value = cls.LookupCanonicalMint(zone, value);
|
||||
if (!canonical_value.IsNull()) {
|
||||
return canonical_value.raw();
|
||||
}
|
||||
|
@ -18807,7 +18807,7 @@ RawDouble* Double::NewCanonical(double value) {
|
|||
// list of canonicalized constants.
|
||||
Double& canonical_value = Double::Handle(zone);
|
||||
|
||||
canonical_value ^= cls.LookupCanonicalDouble(zone, value);
|
||||
canonical_value = cls.LookupCanonicalDouble(zone, value);
|
||||
if (!canonical_value.IsNull()) {
|
||||
return canonical_value.raw();
|
||||
}
|
||||
|
@ -18815,7 +18815,7 @@ RawDouble* Double::NewCanonical(double value) {
|
|||
SafepointMutexLocker ml(isolate->constant_canonicalization_mutex());
|
||||
// Retry lookup.
|
||||
{
|
||||
canonical_value ^= cls.LookupCanonicalDouble(zone, value);
|
||||
canonical_value = cls.LookupCanonicalDouble(zone, value);
|
||||
if (!canonical_value.IsNull()) {
|
||||
return canonical_value.raw();
|
||||
}
|
||||
|
@ -21178,7 +21178,7 @@ RawPointer* Pointer::New(const AbstractType& type_arg,
|
|||
TypeArguments& type_args = TypeArguments::Handle(zone);
|
||||
type_args = TypeArguments::New(1);
|
||||
type_args.SetTypeAt(Pointer::kNativeTypeArgPos, type_arg);
|
||||
type_args ^= type_args.Canonicalize();
|
||||
type_args = type_args.Canonicalize();
|
||||
|
||||
const Class& cls = Class::Handle(Isolate::Current()->class_table()->At(cid));
|
||||
cls.EnsureIsFinalized(Thread::Current());
|
||||
|
@ -21224,9 +21224,9 @@ bool Pointer::IsPointer(const Instance& obj) {
|
|||
Isolate::Current()->object_store()->ffi_pointer_class());
|
||||
AbstractType& pointer_type =
|
||||
AbstractType::Handle(pointer_class.DeclarationType());
|
||||
pointer_type ^= pointer_type.InstantiateFrom(Object::null_type_arguments(),
|
||||
Object::null_type_arguments(),
|
||||
kNoneFree, NULL, Heap::kNew);
|
||||
pointer_type = pointer_type.InstantiateFrom(Object::null_type_arguments(),
|
||||
Object::null_type_arguments(),
|
||||
kNoneFree, NULL, Heap::kNew);
|
||||
AbstractType& type = AbstractType::Handle(obj.GetType(Heap::kNew));
|
||||
return type.IsSubtypeOf(pointer_type, Heap::kNew);
|
||||
}
|
||||
|
@ -21624,7 +21624,7 @@ const char* StackTrace::ToDartCString(const StackTrace& stack_trace_in) {
|
|||
}
|
||||
}
|
||||
// Follow the link.
|
||||
stack_trace ^= stack_trace.async_link();
|
||||
stack_trace = stack_trace.async_link();
|
||||
} while (!stack_trace.IsNull());
|
||||
|
||||
return buffer.buffer();
|
||||
|
@ -21694,7 +21694,7 @@ const char* StackTrace::ToDwarfCString(const StackTrace& stack_trace_in) {
|
|||
}
|
||||
}
|
||||
// Follow the link.
|
||||
stack_trace ^= stack_trace.async_link();
|
||||
stack_trace = stack_trace.async_link();
|
||||
} while (!stack_trace.IsNull());
|
||||
|
||||
return buffer.buffer();
|
||||
|
@ -21953,7 +21953,7 @@ RawUserTag* UserTag::FindTagInIsolate(Thread* thread, const String& label) {
|
|||
for (intptr_t i = 0; i < tag_table.Length(); i++) {
|
||||
other ^= tag_table.At(i);
|
||||
ASSERT(!other.IsNull());
|
||||
tag_label ^= other.label();
|
||||
tag_label = other.label();
|
||||
ASSERT(!tag_label.IsNull());
|
||||
if (tag_label.Equals(label)) {
|
||||
return other.raw();
|
||||
|
|
|
@ -763,7 +763,7 @@ void ICData::Reset(Zone* zone) const {
|
|||
} else {
|
||||
// Super call.
|
||||
Function& caller = Function::Handle(zone);
|
||||
caller ^= Owner();
|
||||
caller = Owner();
|
||||
ASSERT(!caller.is_static());
|
||||
Class& cls = Class::Handle(zone, caller.Owner());
|
||||
cls = cls.SuperClass();
|
||||
|
|
|
@ -273,7 +273,7 @@ void Function::PrintJSONImpl(JSONStream* stream, bool ref) const {
|
|||
Class& cls = Class::Handle(Owner());
|
||||
if (!cls.IsNull()) {
|
||||
Error& err = Error::Handle();
|
||||
err ^= cls.EnsureIsFinalized(Thread::Current());
|
||||
err = cls.EnsureIsFinalized(Thread::Current());
|
||||
ASSERT(err.IsNull());
|
||||
} else {
|
||||
ASSERT(IsSignatureFunction());
|
||||
|
@ -394,7 +394,7 @@ void Field::PrintJSONImpl(JSONStream* stream, bool ref) const {
|
|||
} else {
|
||||
ClassTable* table = Isolate::Current()->class_table();
|
||||
ASSERT(table->IsValidIndex(guarded_cid()));
|
||||
cls ^= table->At(guarded_cid());
|
||||
cls = table->At(guarded_cid());
|
||||
jsobj.AddProperty("_guardClass", cls);
|
||||
}
|
||||
if (guarded_list_length() == kUnknownFixedLength) {
|
||||
|
@ -785,7 +785,7 @@ void ICData::PrintToJSONArray(const JSONArray& jsarray,
|
|||
intptr_t count = GetCountAt(i);
|
||||
if (!is_static_call()) {
|
||||
intptr_t cid = GetReceiverClassIdAt(i);
|
||||
cls ^= isolate->class_table()->At(cid);
|
||||
cls = isolate->class_table()->At(cid);
|
||||
cache_entry.AddProperty("receiver", cls);
|
||||
}
|
||||
cache_entry.AddProperty("target", func);
|
||||
|
|
|
@ -157,35 +157,31 @@ void ObjectStore::InitKnownObjects() {
|
|||
|
||||
String& function_name = String::Handle(zone);
|
||||
Function& function = Function::Handle(zone);
|
||||
function_name ^= async_lib.PrivateName(Symbols::SetAsyncThreadStackTrace());
|
||||
function_name = async_lib.PrivateName(Symbols::SetAsyncThreadStackTrace());
|
||||
ASSERT(!function_name.IsNull());
|
||||
function ^=
|
||||
Resolver::ResolveStatic(async_lib, Object::null_string(), function_name,
|
||||
0, 1, Object::null_array());
|
||||
function = Resolver::ResolveStatic(async_lib, Object::null_string(),
|
||||
function_name, 0, 1, Object::null_array());
|
||||
ASSERT(!function.IsNull());
|
||||
set_async_set_thread_stack_trace(function);
|
||||
|
||||
function_name ^= async_lib.PrivateName(Symbols::ClearAsyncThreadStackTrace());
|
||||
function_name = async_lib.PrivateName(Symbols::ClearAsyncThreadStackTrace());
|
||||
ASSERT(!function_name.IsNull());
|
||||
function ^=
|
||||
Resolver::ResolveStatic(async_lib, Object::null_string(), function_name,
|
||||
0, 0, Object::null_array());
|
||||
function = Resolver::ResolveStatic(async_lib, Object::null_string(),
|
||||
function_name, 0, 0, Object::null_array());
|
||||
ASSERT(!function.IsNull());
|
||||
set_async_clear_thread_stack_trace(function);
|
||||
|
||||
function_name ^= async_lib.PrivateName(Symbols::AsyncStarMoveNextHelper());
|
||||
function_name = async_lib.PrivateName(Symbols::AsyncStarMoveNextHelper());
|
||||
ASSERT(!function_name.IsNull());
|
||||
function ^=
|
||||
Resolver::ResolveStatic(async_lib, Object::null_string(), function_name,
|
||||
0, 1, Object::null_array());
|
||||
function = Resolver::ResolveStatic(async_lib, Object::null_string(),
|
||||
function_name, 0, 1, Object::null_array());
|
||||
ASSERT(!function.IsNull());
|
||||
set_async_star_move_next_helper(function);
|
||||
|
||||
function_name ^= async_lib.PrivateName(Symbols::_CompleteOnAsyncReturn());
|
||||
function_name = async_lib.PrivateName(Symbols::_CompleteOnAsyncReturn());
|
||||
ASSERT(!function_name.IsNull());
|
||||
function ^=
|
||||
Resolver::ResolveStatic(async_lib, Object::null_string(), function_name,
|
||||
0, 2, Object::null_array());
|
||||
function = Resolver::ResolveStatic(async_lib, Object::null_string(),
|
||||
function_name, 0, 2, Object::null_array());
|
||||
ASSERT(!function.IsNull());
|
||||
set_complete_on_async_return(function);
|
||||
if (FLAG_async_debugger) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class ClassFunctionVisitor : public ClassVisitor {
|
|||
for (intptr_t j = 0; j < fields_.Length(); j++) {
|
||||
field_ ^= fields_.At(j);
|
||||
if (field_.is_static() && field_.HasInitializerFunction()) {
|
||||
function_ ^= field_.InitializerFunction();
|
||||
function_ = field_.InitializerFunction();
|
||||
visitor_->Visit(function_);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ RawClass* Class::ReadFrom(SnapshotReader* reader,
|
|||
ASSERT(reader != NULL);
|
||||
|
||||
Class& cls = Class::ZoneHandle(reader->zone(), Class::null());
|
||||
cls ^= reader->ReadClassId(object_id);
|
||||
cls = reader->ReadClassId(object_id);
|
||||
return cls.raw();
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ RawTypeArguments* TypeArguments::ReadFrom(SnapshotReader* reader,
|
|||
|
||||
// Set the canonical bit.
|
||||
if (is_canonical) {
|
||||
type_arguments ^= type_arguments.Canonicalize();
|
||||
type_arguments = type_arguments.Canonicalize();
|
||||
}
|
||||
|
||||
return type_arguments.raw();
|
||||
|
@ -738,7 +738,7 @@ RawContext* Context::ReadFrom(SnapshotReader* reader,
|
|||
Context& context = Context::ZoneHandle(reader->zone());
|
||||
reader->AddBackRef(object_id, &context, kIsDeserialized);
|
||||
if (num_vars != 0) {
|
||||
context ^= Context::New(num_vars);
|
||||
context = Context::New(num_vars);
|
||||
|
||||
// Set all the object fields.
|
||||
// TODO(5411462): Need to assert No GC can happen here, even though
|
||||
|
@ -1226,7 +1226,7 @@ void String::ReadFromImpl(SnapshotReader* reader,
|
|||
for (intptr_t i = 0; i < len; i++) {
|
||||
ptr[i] = reader->Read<CharacterType>();
|
||||
}
|
||||
*str_obj ^= (*new_symbol)(reader->thread(), ptr, len);
|
||||
*str_obj = (*new_symbol)(reader->thread(), ptr, len);
|
||||
} else {
|
||||
// Set up the string object.
|
||||
*str_obj = StringType::New(len, Heap::kNew);
|
||||
|
|
|
@ -75,12 +75,11 @@ RawFunction* Resolver::ResolveDynamicAnyArgs(Zone* zone,
|
|||
|
||||
const bool is_getter = Field::IsGetterName(function_name);
|
||||
if (is_getter) {
|
||||
demangled ^= Field::NameFromGetter(function_name);
|
||||
demangled = Field::NameFromGetter(function_name);
|
||||
}
|
||||
|
||||
if (Function::IsDynamicInvocationForwarderName(function_name)) {
|
||||
demangled ^=
|
||||
Function::DemangleDynamicInvocationForwarderName(function_name);
|
||||
demangled = Function::DemangleDynamicInvocationForwarderName(function_name);
|
||||
#ifdef DART_PRECOMPILED_RUNTIME
|
||||
// In precompiled mode, the non-dynamic version of the function may be
|
||||
// tree-shaken away, so can't necessarily resolve the demanged name.
|
||||
|
@ -112,20 +111,20 @@ RawFunction* Resolver::ResolveDynamicAnyArgs(Zone* zone,
|
|||
// Now look for an instance function whose name matches function_name
|
||||
// in the class.
|
||||
while (!cls.IsNull()) {
|
||||
function ^= cls.LookupDynamicFunction(function_name);
|
||||
function = cls.LookupDynamicFunction(function_name);
|
||||
if (!function.IsNull()) {
|
||||
return function.raw();
|
||||
}
|
||||
// Getter invocation might actually be a method extraction.
|
||||
if (FLAG_lazy_dispatchers) {
|
||||
if (is_getter && function.IsNull()) {
|
||||
function ^= cls.LookupDynamicFunction(demangled);
|
||||
function = cls.LookupDynamicFunction(demangled);
|
||||
if (!function.IsNull() && allow_add) {
|
||||
// We were looking for the getter but found a method with the same
|
||||
// name. Create a method extractor and return it.
|
||||
// The extractor does not exist yet, so using GetMethodExtractor is
|
||||
// not necessary here.
|
||||
function ^= function.CreateMethodExtractor(function_name);
|
||||
function = function.CreateMethodExtractor(function_name);
|
||||
return function.raw();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1717,7 +1717,7 @@ DEFINE_RUNTIME_ENTRY(NoSuchMethodFromCallStub, 4) {
|
|||
String& field_name =
|
||||
String::Handle(zone, Field::NameFromGetter(target_name));
|
||||
while (!cls.IsNull()) {
|
||||
function ^= cls.LookupDynamicFunction(field_name);
|
||||
function = cls.LookupDynamicFunction(field_name);
|
||||
if (!function.IsNull()) {
|
||||
CLOSURIZE(function);
|
||||
return;
|
||||
|
@ -1745,12 +1745,12 @@ DEFINE_RUNTIME_ENTRY(NoSuchMethodFromCallStub, 4) {
|
|||
String::Handle(zone, Field::GetterName(target_name));
|
||||
ArgumentsDescriptor args_desc(orig_arguments_desc);
|
||||
while (!cls.IsNull()) {
|
||||
function ^= cls.LookupDynamicFunction(target_name);
|
||||
function = cls.LookupDynamicFunction(target_name);
|
||||
if (!function.IsNull()) {
|
||||
ASSERT(!function.AreValidArguments(args_desc, NULL));
|
||||
break; // mismatch, invoke noSuchMethod
|
||||
}
|
||||
function ^= cls.LookupDynamicFunction(getter_name);
|
||||
function = cls.LookupDynamicFunction(getter_name);
|
||||
if (!function.IsNull()) {
|
||||
const Array& getter_arguments = Array::Handle(Array::New(1));
|
||||
getter_arguments.SetAt(0, receiver);
|
||||
|
|
|
@ -1412,7 +1412,7 @@ static bool GetScripts(Thread* thread, JSONStream* js) {
|
|||
for (intptr_t i = 0; i < num_libs; i++) {
|
||||
lib ^= libs.At(i);
|
||||
ASSERT(!lib.IsNull());
|
||||
scripts ^= lib.LoadedScripts();
|
||||
scripts = lib.LoadedScripts();
|
||||
for (intptr_t j = 0; j < scripts.Length(); j++) {
|
||||
script ^= scripts.At(j);
|
||||
ASSERT(!script.IsNull());
|
||||
|
@ -1671,7 +1671,7 @@ static RawObject* LookupHeapObjectLibraries(Isolate* isolate,
|
|||
for (intptr_t i = 0; i < libs.Length(); i++) {
|
||||
lib ^= libs.At(i);
|
||||
ASSERT(!lib.IsNull());
|
||||
private_key ^= lib.private_key();
|
||||
private_key = lib.private_key();
|
||||
if (private_key.Equals(id)) {
|
||||
lib_found = true;
|
||||
break;
|
||||
|
@ -1707,7 +1707,7 @@ static RawObject* LookupHeapObjectLibraries(Isolate* isolate,
|
|||
for (i = 0; i < loaded_scripts.Length(); i++) {
|
||||
script ^= loaded_scripts.At(i);
|
||||
ASSERT(!script.IsNull());
|
||||
script_url ^= script.url();
|
||||
script_url = script.url();
|
||||
if (script_url.Equals(requested_url) &&
|
||||
(timestamp == script.load_timestamp())) {
|
||||
return script.raw();
|
||||
|
@ -1747,7 +1747,7 @@ static RawObject* LookupHeapObjectClasses(Thread* thread,
|
|||
return Object::sentinel().raw();
|
||||
}
|
||||
Function& func = Function::Handle(zone);
|
||||
func ^= isolate->ClosureFunctionFromIndex(id);
|
||||
func = isolate->ClosureFunctionFromIndex(id);
|
||||
if (func.IsNull()) {
|
||||
return Object::sentinel().raw();
|
||||
}
|
||||
|
@ -1797,7 +1797,7 @@ static RawObject* LookupHeapObjectClasses(Thread* thread,
|
|||
return Object::sentinel().raw();
|
||||
}
|
||||
Function& func = Function::Handle(zone);
|
||||
func ^= cls.ImplicitClosureFunctionFromIndex(id);
|
||||
func = cls.ImplicitClosureFunctionFromIndex(id);
|
||||
if (func.IsNull()) {
|
||||
return Object::sentinel().raw();
|
||||
}
|
||||
|
@ -1813,7 +1813,7 @@ static RawObject* LookupHeapObjectClasses(Thread* thread,
|
|||
return Object::sentinel().raw();
|
||||
}
|
||||
Function& func = Function::Handle(zone);
|
||||
func ^= cls.InvocationDispatcherFunctionFromIndex(id);
|
||||
func = cls.InvocationDispatcherFunctionFromIndex(id);
|
||||
if (func.IsNull()) {
|
||||
return Object::sentinel().raw();
|
||||
}
|
||||
|
@ -2084,7 +2084,7 @@ static bool PrintInboundReferences(Thread* thread,
|
|||
slot_offset.Value() - (Array::element_offset(0) >> kWordSizeLog2);
|
||||
jselement.AddProperty("parentListIndex", element_index);
|
||||
} else if (source.IsInstance()) {
|
||||
source_class ^= source.clazz();
|
||||
source_class = source.clazz();
|
||||
parent_field_map = source_class.OffsetToFieldMap();
|
||||
intptr_t offset = slot_offset.Value();
|
||||
if (offset > 0 && offset < parent_field_map.Length()) {
|
||||
|
@ -2195,7 +2195,7 @@ static bool PrintRetainingPath(Thread* thread,
|
|||
}
|
||||
}
|
||||
} else if (element.IsInstance()) {
|
||||
element_class ^= element.clazz();
|
||||
element_class = element.clazz();
|
||||
element_field_map = element_class.OffsetToFieldMap();
|
||||
intptr_t offset = slot_offset.Value();
|
||||
if (offset > 0 && offset < element_field_map.Length()) {
|
||||
|
@ -2639,14 +2639,14 @@ static bool BuildExpressionEvaluationScope(Thread* thread, JSONStream* js) {
|
|||
if (frame->function().is_static()) {
|
||||
const Class& cls = Class::Handle(zone, frame->function().Owner());
|
||||
if (!cls.IsTopLevel()) {
|
||||
klass_name ^= cls.UserVisibleName();
|
||||
klass_name = cls.UserVisibleName();
|
||||
}
|
||||
library_uri ^= Library::Handle(zone, cls.library()).url();
|
||||
library_uri = Library::Handle(zone, cls.library()).url();
|
||||
isStatic = !cls.IsTopLevel();
|
||||
} else {
|
||||
const Class& method_cls = Class::Handle(zone, frame->function().origin());
|
||||
library_uri ^= Library::Handle(zone, method_cls.library()).url();
|
||||
klass_name ^= method_cls.UserVisibleName();
|
||||
library_uri = Library::Handle(zone, method_cls.library()).url();
|
||||
klass_name = method_cls.UserVisibleName();
|
||||
}
|
||||
} else {
|
||||
// building scope in the context of a given object
|
||||
|
@ -2666,7 +2666,7 @@ static bool BuildExpressionEvaluationScope(Thread* thread, JSONStream* js) {
|
|||
}
|
||||
if (obj.IsLibrary()) {
|
||||
const Library& lib = Library::Cast(obj);
|
||||
library_uri ^= lib.url();
|
||||
library_uri = lib.url();
|
||||
} else if (obj.IsClass() || ((obj.IsInstance() || obj.IsNull()) &&
|
||||
!ContainsNonInstance(obj))) {
|
||||
Class& cls = Class::Handle(zone);
|
||||
|
@ -2675,7 +2675,7 @@ static bool BuildExpressionEvaluationScope(Thread* thread, JSONStream* js) {
|
|||
} else {
|
||||
Instance& instance = Instance::Handle(zone);
|
||||
instance ^= obj.raw();
|
||||
cls ^= instance.clazz();
|
||||
cls = instance.clazz();
|
||||
}
|
||||
if (cls.id() < kInstanceCid || cls.id() == kTypeArgumentsCid) {
|
||||
js->PrintError(
|
||||
|
@ -2685,9 +2685,9 @@ static bool BuildExpressionEvaluationScope(Thread* thread, JSONStream* js) {
|
|||
}
|
||||
|
||||
if (!cls.IsTopLevel()) {
|
||||
klass_name ^= cls.UserVisibleName();
|
||||
klass_name = cls.UserVisibleName();
|
||||
}
|
||||
library_uri ^= Library::Handle(zone, cls.library()).url();
|
||||
library_uri = Library::Handle(zone, cls.library()).url();
|
||||
} else {
|
||||
js->PrintError(kInvalidParams,
|
||||
"%s: invalid 'targetId' parameter: "
|
||||
|
@ -2741,7 +2741,7 @@ static bool ParseCSVList(const char* csv_list,
|
|||
c++;
|
||||
}
|
||||
if (c > value) {
|
||||
s ^= String::New(zone->MakeCopyOfStringN(value, c - value));
|
||||
s = String::New(zone->MakeCopyOfStringN(value, c - value));
|
||||
values.Add(s);
|
||||
}
|
||||
switch (*c) {
|
||||
|
|
|
@ -181,9 +181,9 @@ RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
|
|||
compiler::StubCodeCompiler::GenerateAllocationStubForClass(&assembler, cls);
|
||||
|
||||
if (thread->IsMutatorThread()) {
|
||||
stub ^= Code::FinalizeCodeAndNotify(name, nullptr, &assembler,
|
||||
pool_attachment,
|
||||
/*optimized1*/ false);
|
||||
stub = Code::FinalizeCodeAndNotify(name, nullptr, &assembler,
|
||||
pool_attachment,
|
||||
/*optimized1*/ false);
|
||||
// Check if background compilation thread has not already added the stub.
|
||||
if (cls.allocation_stub() == Code::null()) {
|
||||
stub.set_owner(cls);
|
||||
|
@ -207,8 +207,8 @@ RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
|
|||
// Do not Garbage collect during this stage and instead allow the
|
||||
// heap to grow.
|
||||
NoHeapGrowthControlScope no_growth_control;
|
||||
stub ^= Code::FinalizeCode(nullptr, &assembler, pool_attachment,
|
||||
/*optimized=*/false, /*stats=*/nullptr);
|
||||
stub = Code::FinalizeCode(nullptr, &assembler, pool_attachment,
|
||||
/*optimized=*/false, /*stats=*/nullptr);
|
||||
stub.set_owner(cls);
|
||||
cls.set_allocation_stub(stub);
|
||||
}
|
||||
|
|
|
@ -573,7 +573,7 @@ RawString* Symbols::NewSymbol(Thread* thread, const StringType& str) {
|
|||
Array& data = thread->ArrayHandle();
|
||||
{
|
||||
Isolate* vm_isolate = Dart::vm_isolate();
|
||||
data ^= vm_isolate->object_store()->symbol_table();
|
||||
data = vm_isolate->object_store()->symbol_table();
|
||||
SymbolTable table(&key, &value, &data);
|
||||
symbol ^= table.GetOrNull(str);
|
||||
table.Release();
|
||||
|
@ -581,7 +581,7 @@ RawString* Symbols::NewSymbol(Thread* thread, const StringType& str) {
|
|||
if (symbol.IsNull()) {
|
||||
Isolate* isolate = thread->isolate();
|
||||
SafepointMutexLocker ml(isolate->symbols_mutex());
|
||||
data ^= isolate->object_store()->symbol_table();
|
||||
data = isolate->object_store()->symbol_table();
|
||||
SymbolTable table(&key, &value, &data);
|
||||
symbol ^= table.InsertNewOrGet(str);
|
||||
isolate->object_store()->set_symbol_table(table.Release());
|
||||
|
@ -602,7 +602,7 @@ RawString* Symbols::Lookup(Thread* thread, const StringType& str) {
|
|||
Array& data = thread->ArrayHandle();
|
||||
{
|
||||
Isolate* vm_isolate = Dart::vm_isolate();
|
||||
data ^= vm_isolate->object_store()->symbol_table();
|
||||
data = vm_isolate->object_store()->symbol_table();
|
||||
SymbolTable table(&key, &value, &data);
|
||||
symbol ^= table.GetOrNull(str);
|
||||
table.Release();
|
||||
|
@ -610,7 +610,7 @@ RawString* Symbols::Lookup(Thread* thread, const StringType& str) {
|
|||
if (symbol.IsNull()) {
|
||||
Isolate* isolate = thread->isolate();
|
||||
SafepointMutexLocker ml(isolate->symbols_mutex());
|
||||
data ^= isolate->object_store()->symbol_table();
|
||||
data = isolate->object_store()->symbol_table();
|
||||
SymbolTable table(&key, &value, &data);
|
||||
symbol ^= table.GetOrNull(str);
|
||||
table.Release();
|
||||
|
|
|
@ -814,7 +814,7 @@ void TypeUsageInfo::UpdateAssertAssignableTypes(
|
|||
// We only add instantiated types to the set (and dynamic/Object were
|
||||
// already handled above).
|
||||
if (!(*ta)->IsNull()) {
|
||||
type ^= (*ta)->TypeAt(i);
|
||||
type = (*ta)->TypeAt(i);
|
||||
if (type.IsInstantiated()) {
|
||||
UseTypeInAssertAssignable(type);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue