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

Unified Diff: vm/parser.cc

Issue 12052033: Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | « vm/object.cc ('k') | vm/resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 17436)
+++ vm/parser.cc (working copy)
@@ -362,14 +362,14 @@
String* Parser::CurrentLiteral() const {
String& result = String::ZoneHandle();
- result |= tokens_iterator_.CurrentLiteral();
+ result = tokens_iterator_.CurrentLiteral();
return &result;
}
RawDouble* Parser::CurrentDoubleLiteral() const {
LiteralToken& token = LiteralToken::Handle();
- token |= tokens_iterator_.CurrentToken();
+ token ^= tokens_iterator_.CurrentToken();
ASSERT(token.kind() == Token::kDOUBLE);
return reinterpret_cast<RawDouble*>(token.value());
}
@@ -377,7 +377,7 @@
RawInteger* Parser::CurrentIntegerLiteral() const {
LiteralToken& token = LiteralToken::Handle();
- token |= tokens_iterator_.CurrentToken();
+ token ^= tokens_iterator_.CurrentToken();
ASSERT(token.kind() == Token::kINTEGER);
return reinterpret_cast<RawInteger*>(token.value());
}
@@ -624,7 +624,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;
}
@@ -658,7 +658,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;
@@ -675,7 +675,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;
@@ -1767,7 +1767,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;
}
@@ -1799,10 +1799,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
@@ -3139,7 +3139,7 @@
ErrorMsg(classname_pos, "'%s' is already defined",
class_name.ToCString());
}
- cls |= obj.raw();
+ cls ^= obj.raw();
if (is_patch) {
String& patch = String::Handle(
String::Concat(Symbols::PatchSpace(), class_name));
@@ -7114,7 +7114,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");
}
@@ -7403,7 +7403,7 @@
if (primary_node->primary().IsClass()) {
// If the primary node referred to a class we are loading a
// qualified static field.
- cls |= primary_node->primary().raw();
+ cls ^= primary_node->primary().raw();
}
}
if (cls.IsNull()) {
@@ -8136,7 +8136,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());
@@ -8239,7 +8239,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();
@@ -9126,7 +9126,7 @@
// Call interpolation function.
String& concatenated = String::ZoneHandle();
- concatenated |= DartEntry::InvokeStatic(func, interpolate_arg);
+ concatenated ^= DartEntry::InvokeStatic(func, interpolate_arg);
if (concatenated.IsUnhandledException()) {
ErrorMsg("Exception thrown in Parser::Interpolate");
}
« no previous file with comments | « vm/object.cc ('k') | vm/resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698