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

Unified Diff: lib/isolate.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 | « lib/integers.cc ('k') | lib/string.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate.cc
===================================================================
--- lib/isolate.cc (revision 17436)
+++ lib/isolate.cc (working copy)
@@ -44,9 +44,7 @@
static void StoreError(Isolate* isolate, const Object& obj) {
ASSERT(obj.IsError());
- Error& error = Error::Handle();
- error |= obj.raw();
- isolate->object_store()->set_sticky_error(error);
+ isolate->object_store()->set_sticky_error(Error::Cast(obj));
}
@@ -191,9 +189,7 @@
uri.ToCString(), error_obj.ToErrorCString());
return false;
} else if (obj.IsString()) {
- String& string_obj = String::Handle();
- string_obj |= obj.raw();
- *canonical_uri = zone->MakeCopyOfString(string_obj.ToCString());
+ *canonical_uri = zone->MakeCopyOfString(String::Cast(obj).ToCString());
return true;
} else {
*error = zone->PrintToString("Unable to canonicalize uri '%s': "
@@ -377,7 +373,7 @@
}
ASSERT(result.IsFunction());
Function& func = Function::Handle(isolate);
- func |= result.raw();
+ func ^= result.raw();
result = DartEntry::InvokeStatic(func, Object::empty_array());
if (result.IsError()) {
StoreError(isolate, result);
@@ -422,7 +418,7 @@
bool throw_exception = false;
Function& func = Function::Handle();
if (closure.IsClosure()) {
- func |= Closure::function(closure);
+ func = Closure::function(closure);
const Class& cls = Class::Handle(func.Owner());
if (!func.IsClosureFunction() || !func.is_static() || !cls.IsTopLevel()) {
throw_exception = true;
@@ -440,7 +436,7 @@
GET_NATIVE_ARGUMENT(Instance, callback, arguments->NativeArgAt(1));
Function& callback_func = Function::Handle();
if (callback.IsClosure()) {
- callback_func |= Closure::function(callback);
+ callback_func = Closure::function(callback);
const Class& cls = Class::Handle(callback_func.Owner());
if (!callback_func.IsClosureFunction() || !callback_func.is_static() ||
!cls.IsTopLevel()) {
« no previous file with comments | « lib/integers.cc ('k') | lib/string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698