Implement structural function and array types
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 16 Apr 2014 16:36:27 +0000 (16:36 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 16 Apr 2014 16:36:27 +0000 (16:36 +0000)
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

src/types-inl.h
src/types.h

index 0fabbb3..ca4f120 100644 (file)
@@ -17,22 +17,6 @@ namespace internal {
 // 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>
 TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) {
   TypeImpl* t = static_cast<TypeImpl*>(object);
   ASSERT(t->IsBitset() || t->IsClass() || t->IsConstant() ||
index 363d45f..3fb5927 100644 (file)
@@ -337,8 +337,14 @@ class TypeImpl : public Config::Base {
   int NumConstants();
 
   template<class T> class Iterator;
-  inline Iterator<i::Map> Classes();
-  inline Iterator<i::Object> Constants();
+  Iterator<i::Map> Classes() {
+    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);