Implement structural function and array types
Just wanted to add two constructors to a datatype, how ugly can it get? R=bmeurer@chromium.org, jarin@chromium.org BUG= Committed: https://code.google.com/p/v8/source/detail?r=20809 Committed: https://code.google.com/p/v8/source/detail?r=20815 Committed: https://code.google.com/p/v8/source/detail?r=20818 Review URL: https://codereview.chromium.org/228263005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
02687c790f
commit
28912cae37
@ -16,22 +16,6 @@ namespace internal {
|
|||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
// TypeImpl
|
// TypeImpl
|
||||||
|
|
||||||
template<class Config>
|
|
||||||
typename v8::internal::TypeImpl<Config>::template Iterator<i::Map>
|
|
||||||
TypeImpl<Config>::Classes() {
|
|
||||||
if (this->IsBitset()) return Iterator<i::Map>();
|
|
||||||
return Iterator<i::Map>(Config::handle(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Config>
|
|
||||||
typename v8::internal::TypeImpl<Config>::template Iterator<i::Object>
|
|
||||||
TypeImpl<Config>::Constants() {
|
|
||||||
if (this->IsBitset()) return Iterator<i::Object>();
|
|
||||||
return Iterator<i::Object>(Config::handle(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Config>
|
template<class Config>
|
||||||
TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) {
|
TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) {
|
||||||
TypeImpl* t = static_cast<TypeImpl*>(object);
|
TypeImpl* t = static_cast<TypeImpl*>(object);
|
||||||
|
10
src/types.h
10
src/types.h
@ -337,8 +337,14 @@ class TypeImpl : public Config::Base {
|
|||||||
int NumConstants();
|
int NumConstants();
|
||||||
|
|
||||||
template<class T> class Iterator;
|
template<class T> class Iterator;
|
||||||
inline Iterator<i::Map> Classes();
|
Iterator<i::Map> Classes() {
|
||||||
inline Iterator<i::Object> Constants();
|
if (this->IsBitset()) return Iterator<i::Map>();
|
||||||
|
return Iterator<i::Map>(Config::handle(this));
|
||||||
|
}
|
||||||
|
Iterator<i::Object> Constants() {
|
||||||
|
if (this->IsBitset()) return Iterator<i::Object>();
|
||||||
|
return Iterator<i::Object>(Config::handle(this));
|
||||||
|
}
|
||||||
|
|
||||||
static inline TypeImpl* cast(typename Config::Base* object);
|
static inline TypeImpl* cast(typename Config::Base* object);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user