]> git.saurik.com Git - cycript.git/blobdiff - Execute.cpp
Use Object.defineProperty as ES6 class visibility.
[cycript.git] / Execute.cpp
index 9f4535433acb4340d29087524c1cc3ba6ede9226..80b9e63dca37cc87e7b52ec960553a086a76be19 100644 (file)
 **/
 /* }}} */
 
-#include "Internal.hpp"
+#include "cycript.hpp"
+
+#include <iostream>
+#include <set>
+#include <map>
+#include <iomanip>
+#include <sstream>
+#include <cmath>
 
 #include <dlfcn.h>
 #include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
 
-#include "cycript.hpp"
-
-#include "sig/parse.hpp"
-#include "sig/ffi_type.hpp"
-
-#include "Pooling.hpp"
-#include "Execute.hpp"
-
 #include <sys/mman.h>
 #include <sys/stat.h>
 
-#include <iostream>
-#include <set>
-#include <map>
-#include <iomanip>
-#include <sstream>
-#include <cmath>
+#include "sig/parse.hpp"
+#include "sig/ffi_type.hpp"
 
 #include "Code.hpp"
 #include "Decode.hpp"
 #include "Error.hpp"
+#include "Execute.hpp"
+#include "Internal.hpp"
 #include "JavaScript.hpp"
+#include "Pooling.hpp"
 #include "String.hpp"
 
 static std::vector<CYHook *> &GetHooks() {
@@ -358,14 +356,6 @@ static JSValueRef System_print(JSContextRef context, JSObjectRef object, JSObjec
     return CYJSUndefined(context);
 } CYCatch(NULL) }
 
-static size_t Nonce_(0);
-
-static JSValueRef $cyq(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry {
-    CYPool pool;
-    const char *name(pool.strcat(CYPoolCString(pool, context, arguments[0]), pool.itoa(Nonce_++), NULL));
-    return CYCastJSValue(context, name);
-} CYCatch(NULL) }
-
 static void (*JSSynchronousGarbageCollectForDebugging$)(JSContextRef);
 
 _visible void CYGarbageCollect(JSContextRef context) {
@@ -1927,8 +1917,6 @@ extern "C" void CYSetupContext(JSGlobalContextRef context) {
         CYSetPrototype(context, last, all);
     }
 
-    CYSetProperty(context, global, CYJSString("$cyq"), &$cyq, kJSPropertyAttributeDontEnum);
-
     JSObjectRef System(JSObjectMake(context, NULL, NULL));
     CYSetProperty(context, cy, CYJSString("System"), System);