1. Andrew Sutherland
  2. jsprobes-patches

Commits

Andrew Sutherland  committed 052fe74

uintN bitrot fixes, pre-fold

  • Participants
  • Parent commits 8528bc3
  • Branches default

Comments (0)

Files changed (2)

File series

View file
 js-run-probes
 provide-all-compartment-ptrs
 jetpack-scriptcontext-naked-jscontext
+uintn
 
 
 

File uintn

View file
+# HG changeset patch
+# Parent 2a5105beb48d8558c21e40e3d2711db3038cdd1e
+
+diff --git a/js/src/jsprobemgr.cpp b/js/src/jsprobemgr.cpp
+--- a/js/src/jsprobemgr.cpp
++++ b/js/src/jsprobemgr.cpp
+@@ -143,9 +143,9 @@
+ static JSBool ItemBuilder_initItem(JSContext *cx, JSObject *obj, 
+                                    ProbePoint probe, int argn);
+ static JSBool OrderBuilder_initOrder(JSContext *cx, JSObject *obj, PickOrder *order);
+-static JSBool OrderBuilder_call(JSContext *cx, uintN argc, jsval *vp);
++static JSBool OrderBuilder_call(JSContext *cx, unsigned argc, jsval *vp);
+ 
+-static JSBool script_postMessage(JSContext *cx, uintN argc, jsval *vp);
++static JSBool script_postMessage(JSContext *cx, unsigned argc, jsval *vp);
+ 
+ static PickOrder *createOrderFromSpec(JSContext *cx, ProbePoint probe,
+                                       ScriptDescriptor &specInfo);
+@@ -342,7 +342,7 @@
+    and add it to the current PickOrder. */
+ 
+ JSBool
+-OrderBuilder_call(JSContext *cx, uintN argc, jsval *vp)
++OrderBuilder_call(JSContext *cx, unsigned argc, jsval *vp)
+ {
+     PickOrder *order;
+     PickItem *item;
+@@ -521,7 +521,7 @@
+ }
+ 
+ JSBool
+-script_postMessage(JSContext *cx, uintN argc, jsval *vp)
++script_postMessage(JSContext *cx, unsigned argc, jsval *vp)
+ {
+     ProbeManager *mgr = static_cast<ProbeManager *>(JS_GetContextPrivate(cx));
+     JS_ASSERT(mgr != NULL);
+@@ -551,8 +551,8 @@
+ createOrderFromSpec(JSContext *cx, ProbePoint probe, ScriptDescriptor &specInfo)
+ {
+     /* extra args for OrderBuilder instance, env vars */
+-    uintN argc = 1 + ProbePointData[GLOBAL_PROBE_ARGS].argc + ProbePointData[probe].argc;
+-    uintN curOffset = 0;
++    unsigned argc = 1 + ProbePointData[GLOBAL_PROBE_ARGS].argc + ProbePointData[probe].argc;
++    uint32_t curOffset = 0;
+     const char **argNames;
+     jsval *args;
+     PickOrder *order;
+@@ -791,7 +791,7 @@
+     jschar *mBody;
+     size_t mBodyLength;
+     char *mFilename;
+-    uintN mLineno;
++    uint32_t mLineno;
+     ScriptCookie mCookie;
+ 
+     static RunScriptEvent *create(const ScriptDescriptor &fdesc, ScriptCookie cookie) {
+@@ -890,7 +890,7 @@
+ };
+ 
+ static const JSErrorFormatString *
+-my_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber);
++my_GetErrorMessage(void *userRef, const char *locale, const unsigned errorNumber);
+ 
+ typedef enum JSErrNum {
+ #define MSG_DEF(name, number, count, exception, format)                        \
+@@ -923,10 +923,10 @@
+ }
+ 
+ static JSBool
+-Print(JSContext *cx, uintN argc, jsval *vp)
++Print(JSContext *cx, unsigned argc, jsval *vp)
+ {
+     jsval *argv;
+-    uintN i;
++    unsigned i;
+     JSString *str;
+     char *bytes;
+ 
+@@ -950,7 +950,7 @@
+ }
+ 
+ JSBool
+-Serialize(JSContext *cx, uintN argc, jsval *vp)
++Serialize(JSContext *cx, unsigned argc, jsval *vp)
+ {
+     jsval v = argc > 0 ? JS_ARGV(cx, vp)[0] : JSVAL_VOID;
+     uint64_t *datap;
+@@ -972,7 +972,7 @@
+ }
+ 
+ JSBool
+-Deserialize(JSContext *cx, uintN argc, jsval *vp)
++Deserialize(JSContext *cx, unsigned argc, jsval *vp)
+ {
+     jsval v = argc > 0 ? JS_ARGV(cx, vp)[0] : JSVAL_VOID;
+     JSObject *obj;
+@@ -1006,7 +1006,7 @@
+ };
+ 
+ static const JSErrorFormatString *
+-my_GetErrorMessage(void *userRef, const char *locale, const uintN errorNumber)
++my_GetErrorMessage(void *userRef, const char *locale, const unsigned errorNumber)
+ {
+     if ((errorNumber > 0) && (errorNumber < JSErr_Limit))
+         return &js_ErrorFormatString[errorNumber];
+@@ -1387,7 +1387,7 @@
+            this item is for a global arg */
+         int offset = ((*it)->probe == GLOBAL_PROBE_ARGS) ? argn + ProbePointData[probe].argc : argn;
+         jsval curObj = argv[offset];
+-        uintN transformCount = (*it)->transforms.size();
++        unsigned transformCount = (*it)->transforms.size();
+ 
+         /* corner case: there are no transforms (i.e., we are unpacking an actual arg to the probe) */
+         if (transformCount == 0) {
+@@ -1395,7 +1395,7 @@
+             continue;
+         }
+ 
+-        for (uintN i = 0; i < transformCount; i++) {
++        for (unsigned i = 0; i < transformCount; i++) {
+             ProbeTransform curTransform = (*it)->transforms[i];
+             const char *nextPropName = ProbeFunctionData[curTransform].api_name;
+             JSBool propExists;
+@@ -1518,7 +1518,7 @@
+     JSObject *globalObj;
+     PickOrder *order;
+     const char **argnames;
+-    uintN argc = ProbePointData[probe].argc + ProbePointData[GLOBAL_PROBE_ARGS].argc;
++    unsigned argc = ProbePointData[probe].argc + ProbePointData[GLOBAL_PROBE_ARGS].argc;
+ 
+     globalObj = JS_GetGlobalObject(adminCx);
+     JS_ASSERT(globalObj != NULL);
+diff --git a/js/src/jsprobemgr.h b/js/src/jsprobemgr.h
+--- a/js/src/jsprobemgr.h
++++ b/js/src/jsprobemgr.h
+@@ -58,7 +58,7 @@
+     const jschar *body;
+     size_t length;
+     const char *filename;
+-    uintN lineno;
++    uint32_t lineno;
+ };
+ 
+ struct HandlerDescriptor {
+@@ -68,7 +68,7 @@
+     JSObject   *handlerFunObj;
+     /* the script info to be used to compile handlerFun */
+     ScriptDescriptor handlerDef;
+-    uintN argc;
++    unsigned argc;
+     const char **argnames;
+     ProbePoint probe;
+     PickOrder *order;