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

Unified Diff: src/runtime.cc

Issue 7289010: exposing some methods from objects.h (alternative to counters) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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
« src/runtime.h ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index a6c238c23a21a853af476346a6f79e9c45298aae..e795b20b9c3c8011fd712cc1c9fce27002e3d738 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -12476,6 +12476,28 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_IS_VAR) {
}
Yang 2011/06/30 08:54:49 I hope adding yet another macro is alright. Saves
danno 2011/06/30 17:24:04 The macro is OK. I would prefer to make this spec
+#define OBJECT_HAS(Name) \
+ RUNTIME_FUNCTION(MaybeObject*, Runtime_Object##Name) { \
+ CONVERT_CHECKED(JSObject, obj, args[0]); \
+ return isolate->heap()->ToBoolean(obj->Name()); \
+ }
+
+OBJECT_HAS(HasFastElements)
+OBJECT_HAS(HasFastDoubleElements)
+OBJECT_HAS(HasDictionaryElements)
+OBJECT_HAS(HasExternalPixelElements)
+OBJECT_HAS(HasExternalArrayElements)
+OBJECT_HAS(HasExternalByteElements)
+OBJECT_HAS(HasExternalUnsignedByteElements)
+OBJECT_HAS(HasExternalShortElements)
+OBJECT_HAS(HasExternalUnsignedShortElements)
+OBJECT_HAS(HasExternalIntElements)
+OBJECT_HAS(HasExternalUnsignedIntElements)
+OBJECT_HAS(HasExternalFloatElements)
+OBJECT_HAS(HasExternalDoubleElements)
+
+#undef OBJECT_HAS
+
// ----------------------------------------------------------------------------
// Implementation of Runtime
« src/runtime.h ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698