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

Unified Diff: runtime/vm/object.cc

Issue 22389004: Allows compiler bailout to handle errors of any type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 25961)
+++ runtime/vm/object.cc (working copy)
@@ -88,6 +88,7 @@
Bool* Object::bool_false_ = NULL;
Smi* Object::smi_illegal_cid_ = NULL;
LanguageError* Object::snapshot_writer_error_ = NULL;
+LanguageError* Object::branch_offset_error_ = NULL;
RawObject* Object::null_ = reinterpret_cast<RawObject*>(RAW_NULL);
RawClass* Object::class_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
@@ -360,7 +361,9 @@
bool_false_ = Bool::ReadOnlyHandle();
smi_illegal_cid_ = Smi::ReadOnlyHandle();
snapshot_writer_error_ = LanguageError::ReadOnlyHandle();
+ branch_offset_error_ = LanguageError::ReadOnlyHandle();
+
// Allocate and initialize the null instance.
// 'null_' must be the first object allocated as it is used in allocation to
// clear the object.
@@ -573,6 +576,8 @@
*smi_illegal_cid_ = Smi::New(kIllegalCid);
siva 2013/08/09 18:54:03 String& error_str = String::Handle(); error_str =
zra 2013/08/09 19:50:36 Done.
*snapshot_writer_error_ =
LanguageError::New(String::Handle(String::New("SnapshotWriter Error")));
+ *branch_offset_error_ =
+ LanguageError::New(String::Handle(String::New("Branch offset overflow")));
ASSERT(!null_object_->IsSmi());
ASSERT(!null_array_->IsSmi());
@@ -600,6 +605,8 @@
ASSERT(smi_illegal_cid_->IsSmi());
ASSERT(!snapshot_writer_error_->IsSmi());
ASSERT(snapshot_writer_error_->IsLanguageError());
+ ASSERT(!branch_offset_error_->IsSmi());
+ ASSERT(branch_offset_error_->IsLanguageError());
}
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698