Chromium Code Reviews| 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 |