| Index: vm/object.cc
|
| ===================================================================
|
| --- vm/object.cc (revision 17436)
|
| +++ vm/object.cc (working copy)
|
| @@ -244,16 +244,16 @@
|
| Smi::handle_vtable_ = fake_smi.vtable();
|
| }
|
|
|
| + Isolate* isolate = Isolate::Current();
|
| + Heap* heap = isolate->heap();
|
| +
|
| // Allocate the read only object handles here.
|
| - empty_array_ = reinterpret_cast<Array*>(Dart::AllocateReadOnlyHandle());
|
| - sentinel_ = reinterpret_cast<Instance*>(Dart::AllocateReadOnlyHandle());
|
| - transition_sentinel_ =
|
| - reinterpret_cast<Instance*>(Dart::AllocateReadOnlyHandle());
|
| - bool_true_ = reinterpret_cast<Bool*>(Dart::AllocateReadOnlyHandle());
|
| - bool_false_ = reinterpret_cast<Bool*>(Dart::AllocateReadOnlyHandle());
|
| + empty_array_ = Array::ReadOnlyHandle(isolate);
|
| + sentinel_ = Instance::ReadOnlyHandle(isolate);
|
| + transition_sentinel_ = Instance::ReadOnlyHandle(isolate);
|
| + bool_true_ = Bool::ReadOnlyHandle(isolate);
|
| + bool_false_ = Bool::ReadOnlyHandle(isolate);
|
|
|
| - Isolate* isolate = Isolate::Current();
|
| - Heap* heap = isolate->heap();
|
| // Allocate and initialize the null instance.
|
| // 'null_' must be the first object allocated as it is used in allocation to
|
| // clear the object.
|
| @@ -1450,7 +1450,7 @@
|
| const Array& field_array = Array::Handle(fields());
|
| Field& field = Field::Handle();
|
| for (intptr_t i = 0; i < field_array.Length(); ++i) {
|
| - field |= field_array.At(i);
|
| + field ^= field_array.At(i);
|
| if (!field.is_static()) {
|
| return true;
|
| }
|
| @@ -1466,7 +1466,7 @@
|
| Function& func = Function::Handle();
|
| intptr_t len = value.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - func |= value.At(i);
|
| + func ^= value.At(i);
|
| ASSERT(func.Owner() == raw());
|
| }
|
| #endif
|
| @@ -1506,7 +1506,7 @@
|
| intptr_t best_fit_token_pos = -1;
|
| intptr_t best_fit_index = -1;
|
| for (intptr_t i = 0; i < num_closures; i++) {
|
| - closure |= closures.At(i);
|
| + closure ^= closures.At(i);
|
| ASSERT(!closure.IsNull());
|
| if ((closure.token_pos() <= token_pos) &&
|
| (token_pos < closure.end_token_pos()) &&
|
| @@ -1517,7 +1517,7 @@
|
| }
|
| closure = Function::null();
|
| if (best_fit_index >= 0) {
|
| - closure |= closures.At(best_fit_index);
|
| + closure ^= closures.At(best_fit_index);
|
| }
|
| return closure.raw();
|
| }
|
| @@ -1674,7 +1674,7 @@
|
| Field& field = Field::Handle();
|
| intptr_t len = flds.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - field |= flds.At(i);
|
| + field ^= flds.At(i);
|
| // Offset is computed only for instance fields.
|
| if (!field.is_static()) {
|
| ASSERT(field.Offset() == 0);
|
| @@ -1730,8 +1730,8 @@
|
| const GrowableObjectArray& new_functions = GrowableObjectArray::Handle(
|
| GrowableObjectArray::New(orig_len));
|
| for (intptr_t i = 0; i < orig_len; i++) {
|
| - orig_func |= orig_list.At(i);
|
| - member_name = orig_func.name();
|
| + orig_func ^= orig_list.At(i);
|
| + member_name ^= orig_func.name();
|
| func = patch.LookupFunction(member_name);
|
| if (func.IsNull()) {
|
| // Non-patched function is preserved, all patched functions are added in
|
| @@ -1745,7 +1745,7 @@
|
| }
|
| }
|
| for (intptr_t i = 0; i < patch_len; i++) {
|
| - func |= patch_list.At(i);
|
| + func ^= patch_list.At(i);
|
| func.set_owner(patch_class);
|
| new_functions.Add(func);
|
| }
|
| @@ -1763,20 +1763,20 @@
|
| Field& orig_field = Field::Handle();
|
| new_list = Array::New(patch_len + orig_len);
|
| for (intptr_t i = 0; i < patch_len; i++) {
|
| - field |= patch_list.At(i);
|
| + field ^= patch_list.At(i);
|
| field.set_owner(*this);
|
| member_name = field.name();
|
| // TODO(iposva): Verify non-public fields only.
|
|
|
| // Verify no duplicate additions.
|
| - orig_field = LookupField(member_name);
|
| + orig_field ^= LookupField(member_name);
|
| if (!orig_field.IsNull()) {
|
| return FormatPatchError("duplicate field: %s", member_name);
|
| }
|
| new_list.SetAt(i, field);
|
| }
|
| for (intptr_t i = 0; i < orig_len; i++) {
|
| - field |= orig_list.At(i);
|
| + field ^= orig_list.At(i);
|
| new_list.SetAt(patch_len + i, field);
|
| }
|
| SetFields(new_list);
|
| @@ -1791,7 +1791,7 @@
|
| Field& field = Field::Handle();
|
| intptr_t len = value.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - field |= value.At(i);
|
| + field ^= value.At(i);
|
| ASSERT(field.owner() == raw());
|
| }
|
| #endif
|
| @@ -2322,7 +2322,7 @@
|
| // Quick Symbol compare.
|
| NoGCScope no_gc;
|
| for (intptr_t i = 0; i < len; i++) {
|
| - function |= funcs.At(i);
|
| + function ^= funcs.At(i);
|
| if (function.name() == name.raw()) {
|
| return function.raw();
|
| }
|
| @@ -2330,8 +2330,8 @@
|
| } else {
|
| String& function_name = String::Handle(isolate, String::null());
|
| for (intptr_t i = 0; i < len; i++) {
|
| - function |= funcs.At(i);
|
| - function_name |= function.name();
|
| + function ^= funcs.At(i);
|
| + function_name ^= function.name();
|
| if (function_name.Equals(name)) {
|
| return function.raw();
|
| }
|
| @@ -2354,8 +2354,8 @@
|
| String& function_name = String::Handle(isolate, String::null());
|
| intptr_t len = funcs.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - function |= funcs.At(i);
|
| - function_name |= function.name();
|
| + function ^= funcs.At(i);
|
| + function_name ^= function.name();
|
| if (OneByteString::EqualsIgnoringPrivateKey(function_name, name)) {
|
| return function.raw();
|
| }
|
| @@ -2384,8 +2384,8 @@
|
| String& function_name = String::Handle(isolate, String::null());
|
| intptr_t len = funcs.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - function |= funcs.At(i);
|
| - function_name |= function.name();
|
| + function ^= funcs.At(i);
|
| + function_name ^= function.name();
|
| if (MatchesAccessorName(function_name, prefix, prefix_length, name)) {
|
| return function.raw();
|
| }
|
| @@ -2407,7 +2407,7 @@
|
| Array& funcs = Array::Handle(functions());
|
| intptr_t len = funcs.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - func |= funcs.At(i);
|
| + func ^= funcs.At(i);
|
| if ((func.token_pos() <= token_pos) &&
|
| (token_pos <= func.end_token_pos())) {
|
| return func.raw();
|
| @@ -2456,8 +2456,8 @@
|
| String& field_name = String::Handle(isolate, String::null());
|
| intptr_t len = flds.Length();
|
| for (intptr_t i = 0; i < len; i++) {
|
| - field |= flds.At(i);
|
| - field_name |= field.name();
|
| + field ^= flds.At(i);
|
| + field_name ^= field.name();
|
| if (OneByteString::EqualsIgnoringPrivateKey(field_name, name)) {
|
| return field.raw();
|
| }
|
| @@ -3008,7 +3008,7 @@
|
| // Last element of the array is the number of used elements.
|
| intptr_t table_size = table.Length() - 1;
|
| Smi& used = Smi::Handle(isolate);
|
| - used |= table.At(table_size);
|
| + used ^= table.At(table_size);
|
| intptr_t used_elements = used.Value() + 1;
|
| used = Smi::New(used_elements);
|
| table.SetAt(table_size, used);
|
| @@ -3511,7 +3511,7 @@
|
| RawString* Function::ParameterNameAt(intptr_t index) const {
|
| const Array& parameter_names = Array::Handle(raw_ptr()->parameter_names_);
|
| String& parameter_name = String::Handle();
|
| - parameter_name |= parameter_names.At(index);
|
| + parameter_name ^= parameter_names.At(index);
|
| return parameter_name.raw();
|
| }
|
|
|
| @@ -3730,13 +3730,13 @@
|
| String& argument_name = String::Handle();
|
| String& parameter_name = String::Handle();
|
| for (int i = 0; i < num_named_arguments; i++) {
|
| - argument_name |= argument_names.At(i);
|
| + argument_name ^= argument_names.At(i);
|
| ASSERT(argument_name.IsSymbol());
|
| bool found = false;
|
| const int num_positional_args = num_arguments - num_named_arguments;
|
| const int num_parameters = NumParameters();
|
| for (int j = num_positional_args; !found && (j < num_parameters); j++) {
|
| - parameter_name |= ParameterNameAt(j);
|
| + parameter_name = ParameterNameAt(j);
|
| ASSERT(argument_name.IsSymbol());
|
| if (argument_name.Equals(parameter_name)) {
|
| found = true;
|
| @@ -4096,9 +4096,9 @@
|
| // Set closure function's context scope.
|
| ContextScope& context_scope = ContextScope::Handle();
|
| if (is_static()) {
|
| - context_scope |= ContextScope::New(0);
|
| + context_scope = ContextScope::New(0);
|
| } else {
|
| - context_scope |= LocalScope::CreateImplicitClosureScope(*this);
|
| + context_scope = LocalScope::CreateImplicitClosureScope(*this);
|
| }
|
| closure_function.set_context_scope(context_scope);
|
|
|
| @@ -5212,7 +5212,7 @@
|
| const Array& symbols = Array::Handle(isolate,
|
| object_store->keyword_symbols());
|
| ASSERT(!symbols.IsNull());
|
| - str |= symbols.At(kind - Token::kFirstKeyword);
|
| + str ^= symbols.At(kind - Token::kFirstKeyword);
|
| ASSERT(!str.IsNull());
|
| return str.raw();
|
| }
|
| @@ -5595,7 +5595,7 @@
|
| // Insert the object at the empty slot.
|
| dict.SetAt(index, obj);
|
| Smi& used = Smi::Handle();
|
| - used |= dict.At(dict_size);
|
| + used ^= dict.At(dict_size);
|
| intptr_t used_elements = used.Value() + 1; // One more element added.
|
| used = Smi::New(used_elements);
|
| dict.SetAt(dict_size, used); // Update used count.
|
| @@ -5619,7 +5619,7 @@
|
| Namespace& ns = Namespace::Handle();
|
| Object& obj = Object::Handle();
|
| for (int i = 0; i < exports.Length(); i++) {
|
| - ns |= exports.At(i);
|
| + ns ^= exports.At(i);
|
| obj = ns.Lookup(name);
|
| if (!obj.IsNull()) {
|
| return obj.raw();
|
| @@ -5701,7 +5701,7 @@
|
| }
|
| bool is_unique = true;
|
| for (int i = 0; i < scripts.Length(); i++) {
|
| - script_obj |= scripts.At(i);
|
| + script_obj ^= scripts.At(i);
|
| if (script_obj.raw() == owner_script.raw()) {
|
| // We already have a reference to this script.
|
| is_unique = false;
|
| @@ -5729,7 +5729,7 @@
|
| String& script_url = String::Handle();
|
| intptr_t num_scripts = scripts.Length();
|
| for (int i = 0; i < num_scripts; i++) {
|
| - script |= scripts.At(i);
|
| + script ^= scripts.At(i);
|
| script_url = script.url();
|
| if (script_url.Equals(url)) {
|
| return script.raw();
|
| @@ -5783,7 +5783,7 @@
|
| Array& anon_classes = Array::Handle(this->raw_ptr()->anonymous_classes_);
|
| intptr_t num_anonymous = raw_ptr()->num_anonymous_;
|
| for (int i = 0; i < num_anonymous; i++) {
|
| - cls |= anon_classes.At(i);
|
| + cls ^= anon_classes.At(i);
|
| ASSERT(!cls.IsNull());
|
| if (script.raw() == cls.script()) {
|
| func = cls.LookupFunctionAtToken(token_pos);
|
| @@ -5832,10 +5832,10 @@
|
| Namespace& import = Namespace::Handle();
|
| Object& obj = Object::Handle();
|
| for (intptr_t j = 0; j < this->num_imports(); j++) {
|
| - import |= imports.At(j);
|
| + import ^= imports.At(j);
|
| obj = import.Lookup(name);
|
| if (!obj.IsNull() && obj.IsField()) {
|
| - field |= obj.raw();
|
| + field ^= obj.raw();
|
| return field.raw();
|
| }
|
| }
|
| @@ -5854,7 +5854,7 @@
|
| }
|
| if (!obj.IsNull()) {
|
| if (obj.IsField()) {
|
| - field |= obj.raw();
|
| + field ^= obj.raw();
|
| return field.raw();
|
| }
|
| }
|
| @@ -5881,10 +5881,10 @@
|
| Namespace& import = Namespace::Handle();
|
| Object& obj = Object::Handle();
|
| for (intptr_t j = 0; j < this->num_imports(); j++) {
|
| - import |= imports.At(j);
|
| + import ^= imports.At(j);
|
| obj = import.Lookup(name);
|
| if (!obj.IsNull() && obj.IsFunction()) {
|
| - function |= obj.raw();
|
| + function ^= obj.raw();
|
| return function.raw();
|
| }
|
| }
|
| @@ -5919,7 +5919,7 @@
|
| const Array& imports = Array::Handle(this->imports());
|
| Namespace& import = Namespace::Handle();
|
| for (intptr_t j = 0; j < this->num_imports(); j++) {
|
| - import |= imports.At(j);
|
| + import ^= imports.At(j);
|
| obj = import.Lookup(name);
|
| if (!obj.IsNull()) {
|
| return obj.raw();
|
| @@ -6008,7 +6008,7 @@
|
| }
|
| const Array& import_list = Array::Handle(imports());
|
| Namespace& import = Namespace::Handle();
|
| - import |= import_list.At(index);
|
| + import ^= import_list.At(index);
|
| return import.raw();
|
| }
|
|
|
| @@ -6289,8 +6289,8 @@
|
| GrowableObjectArray& libs = GrowableObjectArray::Handle(
|
| isolate, isolate->object_store()->libraries());
|
| for (int i = 0; i < libs.Length(); i++) {
|
| - lib |= libs.At(i);
|
| - lib_url = lib.url();
|
| + lib ^= libs.At(i);
|
| + lib_url ^= lib.url();
|
| if (lib_url.Equals(url)) {
|
| return lib.raw();
|
| }
|
| @@ -6312,8 +6312,8 @@
|
| Library& lib = Library::Handle();
|
| String& lib_url = String::Handle();
|
| for (int i = 0; i < libs.Length(); i++) {
|
| - lib |= libs.At(i);
|
| - lib_url |= lib.url();
|
| + lib ^= libs.At(i);
|
| + lib_url ^= lib.url();
|
| lib_key = lib_url.Hash();
|
| if (lib_key == key) {
|
| return true;
|
| @@ -6343,7 +6343,7 @@
|
| ASSERT(IsPrivate(name));
|
| // ASSERT(strchr(name, '@') == NULL);
|
| String& str = String::Handle();
|
| - str |= name.raw();
|
| + str = name.raw();
|
| str = String::Concat(str, String::Handle(this->private_key()));
|
| str = Symbols::New(str);
|
| return str.raw();
|
| @@ -6357,7 +6357,7 @@
|
| ASSERT(!libs.IsNull());
|
| if ((0 <= index) && (index < libs.Length())) {
|
| Library& lib = Library::Handle();
|
| - lib |= libs.At(index);
|
| + lib ^= libs.At(index);
|
| return lib.raw();
|
| }
|
| return Library::null();
|
| @@ -6434,7 +6434,7 @@
|
| if ((index >= 0) || (index < num_imports())) {
|
| const Array& imports = Array::Handle(this->imports());
|
| Namespace& import = Namespace::Handle();
|
| - import |= imports.At(index);
|
| + import ^= imports.At(index);
|
| return import.library();
|
| }
|
| return Library::null();
|
| @@ -6482,7 +6482,7 @@
|
| Object& obj = Object::Handle();
|
| Namespace& import = Namespace::Handle();
|
| for (intptr_t i = 0; i < num_imports(); i++) {
|
| - import |= imports.At(i);
|
| + import ^= imports.At(i);
|
| obj = import.Lookup(class_name);
|
| if (!obj.IsNull() && obj.IsClass()) {
|
| // TODO(hausner):
|
| @@ -6556,7 +6556,7 @@
|
| String& hidden = String::Handle();
|
| intptr_t num_names = names.Length();
|
| for (intptr_t i = 0; i < num_names; i++) {
|
| - hidden |= names.At(i);
|
| + hidden ^= names.At(i);
|
| if (name.Equals(hidden)) {
|
| return true;
|
| }
|
| @@ -6569,7 +6569,7 @@
|
| String& shown = String::Handle();
|
| intptr_t num_names = names.Length();
|
| for (intptr_t i = 0; i < num_names; i++) {
|
| - shown |= names.At(i);
|
| + shown ^= names.At(i);
|
| if (name.Equals(shown)) {
|
| return false;
|
| }
|
| @@ -6628,10 +6628,10 @@
|
| Library& lib = Library::Handle();
|
| Class& cls = Class::Handle();
|
| for (int i = 0; i < libs.Length(); i++) {
|
| - lib |= libs.At(i);
|
| + lib ^= libs.At(i);
|
| ClassDictionaryIterator it(lib);
|
| while (it.HasNext()) {
|
| - cls |= it.GetNextClass();
|
| + cls = it.GetNextClass();
|
| error = Compiler::CompileAllFunctions(cls);
|
| if (!error.IsNull()) {
|
| return error.raw();
|
| @@ -6639,7 +6639,7 @@
|
| }
|
| Array& anon_classes = Array::Handle(lib.raw_ptr()->anonymous_classes_);
|
| for (int i = 0; i < lib.raw_ptr()->num_anonymous_; i++) {
|
| - cls |= anon_classes.At(i);
|
| + cls ^= anon_classes.At(i);
|
| error = Compiler::CompileAllFunctions(cls);
|
| if (!error.IsNull()) {
|
| return error.raw();
|
| @@ -6968,7 +6968,7 @@
|
| const Array& names = Array::Handle(raw_ptr()->names_);
|
| ASSERT(Length() == names.Length());
|
| String& name = String::Handle();
|
| - name |= names.At(var_index);
|
| + name ^= names.At(var_index);
|
| return name.raw();
|
| }
|
|
|
| @@ -7301,7 +7301,7 @@
|
|
|
| intptr_t Code::Comments::PCOffsetAt(intptr_t idx) const {
|
| Smi& result = Smi::Handle();
|
| - result |= comments_.At(idx * kNumberOfEntries + kPCOffsetEntry);
|
| + result ^= comments_.At(idx * kNumberOfEntries + kPCOffsetEntry);
|
| return result.Value();
|
| }
|
|
|
| @@ -7314,7 +7314,7 @@
|
|
|
| RawString* Code::Comments::CommentAt(intptr_t idx) const {
|
| String& result = String::Handle();
|
| - result |= comments_.At(idx * kNumberOfEntries + kCommentEntry);
|
| + result ^= comments_.At(idx * kNumberOfEntries + kCommentEntry);
|
| return result.raw();
|
| }
|
|
|
| @@ -7381,7 +7381,7 @@
|
| for (intptr_t i = 0; i < array.Length(); i += kSCallTableEntryLength) {
|
| if (array.At(i) == raw_code_offset) {
|
| Function& function = Function::Handle();
|
| - function |= array.At(i + kSCallTableFunctionEntry);
|
| + function ^= array.At(i + kSCallTableFunctionEntry);
|
| return function.raw();
|
| }
|
| }
|
| @@ -7666,7 +7666,7 @@
|
| *maps = stackmaps();
|
| *map = Stackmap::null();
|
| for (intptr_t i = 0; i < maps->Length(); i++) {
|
| - *map |= maps->At(i);
|
| + *map ^= maps->At(i);
|
| ASSERT(!map->IsNull());
|
| if (map->PC() == pc) {
|
| return map->raw(); // We found a stack map for this frame.
|
| @@ -7981,10 +7981,10 @@
|
| intptr_t data_pos = index * TestEntryLength();
|
| Smi& smi = Smi::Handle();
|
| for (intptr_t i = 0; i < num_args_tested(); i++) {
|
| - smi |= data.At(data_pos++);
|
| + smi ^= data.At(data_pos++);
|
| class_ids->Add(smi.Value());
|
| }
|
| - (*target) |= data.At(data_pos++);
|
| + (*target) ^= data.At(data_pos++);
|
| }
|
|
|
|
|
| @@ -7997,9 +7997,9 @@
|
| const Array& data = Array::Handle(ic_data());
|
| intptr_t data_pos = index * TestEntryLength();
|
| Smi& smi = Smi::Handle();
|
| - smi |= data.At(data_pos);
|
| + smi ^= data.At(data_pos);
|
| *class_id = smi.Value();
|
| - *target |= data.At(data_pos + 1);
|
| + *target ^= data.At(data_pos + 1);
|
| }
|
|
|
|
|
| @@ -8016,7 +8016,7 @@
|
| const Array& data = Array::Handle(ic_data());
|
| const intptr_t data_pos = index * TestEntryLength();
|
| Smi& smi = Smi::Handle();
|
| - smi |= data.At(data_pos);
|
| + smi ^= data.At(data_pos);
|
| return smi.Value();
|
| }
|
|
|
| @@ -8034,7 +8034,7 @@
|
| const intptr_t data_pos = index * TestEntryLength() +
|
| CountIndexFor(num_args_tested());
|
| Smi& smi = Smi::Handle();
|
| - smi |= data.At(data_pos);
|
| + smi ^= data.At(data_pos);
|
| return smi.Value();
|
| }
|
|
|
| @@ -8266,9 +8266,9 @@
|
|
|
| // Rehash the valid entries.
|
| for (intptr_t i = 0; i < old_capacity; ++i) {
|
| - class_id |= GetClassId(old_buckets, i);
|
| + class_id ^= GetClassId(old_buckets, i);
|
| if (class_id.Value() != kIllegalCid) {
|
| - target |= GetTargetFunction(old_buckets, i);
|
| + target ^= GetTargetFunction(old_buckets, i);
|
| Insert(class_id, target);
|
| }
|
| }
|
| @@ -8286,7 +8286,7 @@
|
| Smi& probe = Smi::Handle();
|
| intptr_t i = index;
|
| do {
|
| - probe |= GetClassId(backing_array, i);
|
| + probe ^= GetClassId(backing_array, i);
|
| if (probe.Value() == kIllegalCid) {
|
| SetEntry(backing_array, i, class_id, target);
|
| set_filled_entry_count(filled_entry_count() + 1);
|
| @@ -8361,12 +8361,12 @@
|
| Array& data = Array::Handle(cache());
|
| intptr_t data_pos = ix * kTestEntryLength;
|
| Smi& instance_class_id_handle = Smi::Handle();
|
| - instance_class_id_handle |= data.At(data_pos + kInstanceClassId);
|
| + instance_class_id_handle ^= data.At(data_pos + kInstanceClassId);
|
| *instance_class_id = instance_class_id_handle.Value();
|
| *instance_type_arguments ^= data.At(data_pos + kInstanceTypeArguments);
|
| *instantiator_type_arguments ^=
|
| data.At(data_pos + kInstantiatorTypeArguments);
|
| - *test_result |= data.At(data_pos + kTestResult);
|
| + *test_result ^= data.At(data_pos + kTestResult);
|
| }
|
|
|
|
|
| @@ -9682,7 +9682,7 @@
|
| if (IsSmi()) return raw();
|
| if (IsMint()) {
|
| Mint& mint = Mint::Handle();
|
| - mint |= raw();
|
| + mint ^= raw();
|
| if (Smi::IsValid64(mint.value())) {
|
| return Smi::New(mint.value());
|
| } else {
|
| @@ -9691,7 +9691,7 @@
|
| }
|
| ASSERT(IsBigint());
|
| Bigint& big_value = Bigint::Handle();
|
| - big_value |= raw();
|
| + big_value ^= raw();
|
| if (BigintOperations::FitsIntoSmi(big_value)) {
|
| return BigintOperations::ToSmi(big_value);
|
| } else if (BigintOperations::FitsIntoMint(big_value)) {
|
| @@ -9712,8 +9712,8 @@
|
| if (IsSmi() && other.IsSmi()) {
|
| Smi& left_smi = Smi::Handle();
|
| Smi& right_smi = Smi::Handle();
|
| - left_smi |= raw();
|
| - right_smi |= other.raw();
|
| + left_smi ^= raw();
|
| + right_smi ^= other.raw();
|
| const intptr_t left_value = left_smi.Value();
|
| const intptr_t right_value = right_smi.Value();
|
| switch (operation) {
|
| @@ -9810,8 +9810,8 @@
|
| if (IsSmi() && other.IsSmi()) {
|
| Smi& op1 = Smi::Handle();
|
| Smi& op2 = Smi::Handle();
|
| - op1 |= raw();
|
| - op2 |= other.raw();
|
| + op1 ^= raw();
|
| + op2 ^= other.raw();
|
| intptr_t result = 0;
|
| switch (kind) {
|
| case Token::kBIT_AND:
|
| @@ -10005,7 +10005,7 @@
|
| Mint& canonical_value = Mint::Handle();
|
| intptr_t index = 0;
|
| while (index < constants_len) {
|
| - canonical_value |= constants.At(index);
|
| + canonical_value ^= constants.At(index);
|
| if (canonical_value.IsNull()) {
|
| break;
|
| }
|
| @@ -10159,7 +10159,7 @@
|
| Double& canonical_value = Double::Handle();
|
| intptr_t index = 0;
|
| while (index < constants_len) {
|
| - canonical_value |= constants.At(index);
|
| + canonical_value ^= constants.At(index);
|
| if (canonical_value.IsNull()) {
|
| break;
|
| }
|
| @@ -10205,16 +10205,16 @@
|
| ASSERT(!IsNull());
|
| if (IsSmi()) {
|
| Smi& smi = Smi::Handle();
|
| - smi |= raw();
|
| + smi ^= raw();
|
| return BigintOperations::NewFromSmi(smi);
|
| } else if (IsMint()) {
|
| Mint& mint = Mint::Handle();
|
| - mint |= raw();
|
| + mint ^= raw();
|
| return BigintOperations::NewFromInt64(mint.value());
|
| } else {
|
| ASSERT(IsBigint());
|
| Bigint& big = Bigint::Handle();
|
| - big |= raw();
|
| + big ^= raw();
|
| ASSERT(!BigintOperations::FitsIntoSmi(big));
|
| return big.raw();
|
| }
|
| @@ -10292,7 +10292,7 @@
|
| Bigint& canonical_value = Bigint::Handle();
|
| intptr_t index = 0;
|
| while (index < constants_len) {
|
| - canonical_value |= constants.At(index);
|
| + canonical_value ^= constants.At(index);
|
| if (canonical_value.IsNull()) {
|
| break;
|
| }
|
| @@ -10688,10 +10688,10 @@
|
| String& result = String::Handle();
|
| intptr_t char_size = str.CharSize();
|
| if (char_size == kOneByteChar) {
|
| - result |= OneByteString::New(len, space);
|
| + result = OneByteString::New(len, space);
|
| } else {
|
| ASSERT(char_size == kTwoByteChar);
|
| - result |= TwoByteString::New(len, space);
|
| + result = TwoByteString::New(len, space);
|
| }
|
| String::Copy(result, 0, str, 0, len);
|
| return result.raw();
|
| @@ -10860,7 +10860,7 @@
|
| String& str = String::Handle();
|
| intptr_t char_size = kOneByteChar;
|
| for (intptr_t i = 0; i < strings_len; i++) {
|
| - str |= strings.At(i);
|
| + str ^= strings.At(i);
|
| result_len += str.Length();
|
| char_size = Utils::Maximum(char_size, str.CharSize());
|
| }
|
| @@ -10908,9 +10908,9 @@
|
| }
|
| }
|
| if (is_one_byte_string) {
|
| - result |= OneByteString::New(length, space);
|
| + result = OneByteString::New(length, space);
|
| } else {
|
| - result |= TwoByteString::New(length, space);
|
| + result = TwoByteString::New(length, space);
|
| }
|
| String::Copy(result, 0, str, begin_index, length);
|
| return result.raw();
|
| @@ -11272,7 +11272,7 @@
|
| intptr_t strings_len = strings.Length();
|
| intptr_t pos = 0;
|
| for (intptr_t i = 0; i < strings_len; i++) {
|
| - str |= strings.At(i);
|
| + str ^= strings.At(i);
|
| intptr_t str_len = str.Length();
|
| String::Copy(result, pos, str, 0, str_len);
|
| pos += str_len;
|
| @@ -11441,7 +11441,7 @@
|
| intptr_t strings_len = strings.Length();
|
| intptr_t pos = 0;
|
| for (intptr_t i = 0; i < strings_len; i++) {
|
| - str |= strings.At(i);
|
| + str ^= strings.At(i);
|
| intptr_t str_len = str.Length();
|
| String::Copy(result, pos, str, 0, str_len);
|
| pos += str_len;
|
| @@ -12625,7 +12625,7 @@
|
| RawJSRegExp* JSRegExp::FromDataStartAddress(void* data) {
|
| JSRegExp& regexp = JSRegExp::Handle();
|
| intptr_t addr = reinterpret_cast<intptr_t>(data) - sizeof(RawJSRegExp);
|
| - regexp |= RawObject::FromAddr(addr);
|
| + regexp ^= RawObject::FromAddr(addr);
|
| return regexp.raw();
|
| }
|
|
|
|
|