Revision: 15551
Author: [email protected]
Date: Mon Jul 8 06:07:41 2013
Log: Add Type::cast
[email protected]
BUG=
Review URL: https://codereview.chromium.org/18843002
http://code.google.com/p/v8/source/detail?r=15551
Modified:
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/types.h
=======================================
--- /branches/bleeding_edge/src/objects.cc Mon Jul 8 03:02:16 2013
+++ /branches/bleeding_edge/src/objects.cc Mon Jul 8 06:07:41 2013
@@ -15850,8 +15850,8 @@
&PropertyCell::UpdateType,
Handle<PropertyCell>(this),
Handle<Object>(value, GetIsolate()));
- if (maybe_type->IsFailure()) return maybe_type;
- Type* new_type = static_cast<Type*>(maybe_type);
+ Type* new_type;
+ if (maybe_type->To(&new_type)) return maybe_type;
set_type(new_type);
}
return value;
=======================================
--- /branches/bleeding_edge/src/types.h Thu Jun 27 08:31:49 2013
+++ /branches/bleeding_edge/src/types.h Mon Jul 8 06:07:41 2013
@@ -183,6 +183,13 @@
if (this->is_bitset()) return Iterator<v8::internal::Object>();
return Iterator<v8::internal::Object>(this->handle());
}
+
+ static Type* cast(v8::internal::Object* object) {
+ Type* t = static_cast<Type*>(object);
+ ASSERT(t->is_bitset() || t->is_class() ||
+ t->is_constant() || t->is_union());
+ return t;
+ }
private:
// A union is a fixed array containing types. Invariants:
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.