Replace JS_Enumerate with manual enumeration, to avoid its memory allocations.

Use LookupProperty to avoid having to check for getters.
Add a quicker method of rooting many script values.

This was SVN commit r7579.
This commit is contained in:
Ykkrosh
2010-05-25 18:24:12 +00:00
parent 121d1ead20
commit 47a03c3397
8 changed files with 158 additions and 51 deletions
+4 -1
View File
@@ -29,6 +29,8 @@
#include "ScriptTypes.h"
#include "ScriptVal.h"
class AutoGCRooter;
namespace boost { class rand48; }
// Set the maximum number of function arguments that can be handled
@@ -37,7 +39,6 @@ namespace boost { class rand48; }
#define SCRIPT_INTERFACE_MAX_ARGS 6
struct ScriptInterface_impl;
class ScriptClass;
class ScriptInterface
{
public:
@@ -181,6 +182,8 @@ public:
bool AddRoot(void* ptr, const char* name);
bool RemoveRoot(void* ptr);
AutoGCRooter* ReplaceAutoGCRooter(AutoGCRooter* rooter);
/**
* Dump some memory heap debugging information to stderr.
*/