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

Unified Diff: runtime/vm/parser.cc

Issue 11941005: Use new |= operator instead of ^= where it is possible to do so. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 17246)
+++ runtime/vm/parser.cc (working copy)
@@ -626,7 +626,7 @@
bool has_constructor() const {
Function& func = Function::Handle();
for (int i = 0; i < functions_.Length(); i++) {
- func ^= functions_.At(i);
+ func |= functions_.At(i);
if (func.kind() == RawFunction::kConstructor) {
return true;
}
@@ -660,7 +660,7 @@
String& test_name = String::Handle();
Field& field = Field::Handle();
for (int i = 0; i < fields_.Length(); i++) {
- field ^= fields_.At(i);
+ field |= fields_.At(i);
test_name = field.name();
if (name.Equals(test_name)) {
return &field;
@@ -677,7 +677,7 @@
String& test_name = String::Handle();
Function& func = Function::Handle();
for (int i = 0; i < functions_.Length(); i++) {
- func ^= functions_.At(i);
+ func |= functions_.At(i);
test_name = func.name();
if (name.Equals(test_name)) {
return &func;
@@ -1732,7 +1732,7 @@
Field& field = Field::Handle();
SequenceNode* initializers = current_block_->statements;
for (int field_num = 0; field_num < fields.Length(); field_num++) {
- field ^= fields.At(field_num);
+ field |= fields.At(field_num);
if (field.is_static() || !field.is_final()) {
continue;
}
@@ -1764,10 +1764,10 @@
Field& f = Field::Handle();
const intptr_t saved_pos = TokenPos();
for (int i = 0; i < fields.Length(); i++) {
- f ^= fields.At(i);
+ f |= fields.At(i);
if (!f.is_static() && f.has_initializer()) {
Field& field = Field::ZoneHandle();
- field ^= fields.At(i);
+ field |= fields.At(i);
if (field.is_final()) {
// Final fields with initializer expression may not be initialized
// again by constructors. Remember that this field is already
@@ -7079,7 +7079,7 @@
// canonicalized strings.
ASSERT(CurrentLiteral()->IsSymbol());
for (int i = 0; i < names.Length(); i++) {
- arg_name ^= names.At(i);
+ arg_name |= names.At(i);
if (CurrentLiteral()->Equals(arg_name)) {
ErrorMsg("duplicate named argument");
}
@@ -8101,7 +8101,7 @@
intptr_t num_imports = library_.num_imports();
Object& imported_obj = Object::Handle();
for (int i = 0; i < num_imports; i++) {
- import ^= library_.ImportAt(i);
+ import |= library_.ImportAt(i);
imported_obj = LookupNameInImport(import, name);
if (!imported_obj.IsNull()) {
const Library& lib = Library::Handle(import.library());
@@ -8204,7 +8204,7 @@
Object& resolved_obj = Object::Handle();
const Array& imports = Array::Handle(prefix.imports());
for (intptr_t i = 0; i < prefix.num_imports(); i++) {
- import ^= imports.At(i);
+ import |= imports.At(i);
resolved_obj = LookupNameInImport(import, name);
if (!resolved_obj.IsNull()) {
obj = resolved_obj.raw();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698