Bug 1223006 - Fix some typo in spidermonkey's comments. r=nbp
authorWei Wu <lazyparser>
Thu, 16 Jul 2015 11:09:15 +0800
changeset 308271 804cf01901fd5ccd909bf1599db4b41f54305336
parent 308270 1754ba366bf83ad961b1c85e5d84ad2a75e17539
child 308272 f700456549b2fd1eb65eb523cee73af26e69fb61
push id7450
push userahalberstadt@mozilla.com
push dateWed, 11 Nov 2015 20:09:05 +0000
reviewersnbp
bugs1223006
milestone45.0a1
Bug 1223006 - Fix some typo in spidermonkey's comments. r=nbp commit 9e5745f3e270e2c50bfcdcaa2951db229553d96c Author: lazyparser <lazyparser@gmail.com> Bug xxx: Fix a few typos in comments. r?
js/src/gc/Tracer.h
js/src/vm/ArgumentsObject.h
js/src/vm/PIC.h
js/src/vm/Runtime.cpp
js/src/vm/Runtime.h
js/src/vm/TraceLogging.h
js/src/vm/TypedArrayObject.cpp
--- a/js/src/gc/Tracer.h
+++ b/js/src/gc/Tracer.h
@@ -118,17 +118,17 @@ TraceProcessGlobalRoot(JSTracer* trc, T*
 void
 TraceGenericPointerRoot(JSTracer* trc, gc::Cell** thingp, const char* name);
 
 // Trace a non-root edge that uses the base GC thing type, instead of a more
 // specific type.
 void
 TraceManuallyBarrieredGenericPointerEdge(JSTracer* trc, gc::Cell** thingp, const char* name);
 
-// Depricated. Please use one of the strongly typed variants above.
+// Deprecated. Please use one of the strongly typed variants above.
 void
 TraceChildren(JSTracer* trc, void* thing, JS::TraceKind kind);
 
 namespace gc {
 
 // Trace through a shape or group iteratively during cycle collection to avoid
 // deep or infinite recursion.
 void
--- a/js/src/vm/ArgumentsObject.h
+++ b/js/src/vm/ArgumentsObject.h
@@ -71,17 +71,17 @@ struct ArgumentsData
     const HeapValue* begin() const { return args; }
     HeapValue* end() { return args + numArgs; }
     const HeapValue* end() const { return args + numArgs; }
 };
 
 // Maximum supported value of arguments.length. This bounds the maximum
 // number of arguments that can be supplied to Function.prototype.apply.
 // This value also bounds the number of elements parsed in an array
-// initialiser.
+// initializer.
 static const unsigned ARGS_LENGTH_MAX = 500 * 1000;
 
 /*
  * ArgumentsObject instances represent |arguments| objects created to store
  * function arguments when a function is called.  It's expensive to create such
  * objects if they're never used, so they're only created when they are
  * potentially used.
  *
--- a/js/src/vm/PIC.h
+++ b/js/src/vm/PIC.h
@@ -161,22 +161,22 @@ struct ForOfPIC
      *      To ensure that Array.prototype has not been modified.
      *
      *  ArrayIterator.prototype (arrayIteratorProto_)
      *  ArrayIterator.prototype's shape (arrayIteratorProtoShape_)
      *      To ensure that an ArrayIterator.prototype has not been modified.
      *
      *  Array.prototype's slot number for @@iterator (arrayProtoIteratorSlot_)
      *  Array.prototype's canonical value for @@iterator (canonicalIteratorFunc_)
-     *      To quickly retreive and ensure that the iterator constructor
+     *      To quickly retrieve and ensure that the iterator constructor
      *      stored in the slot has not changed.
      *
      *  ArrayIterator.prototype's slot number for 'next' (arrayIteratorProtoNextSlot_)
      *  ArrayIterator.prototype's canonical value for 'next' (canonicalNextFunc_)
-     *      To quickly retreive and ensure that the 'next' method for ArrayIterator
+     *      To quickly retrieve and ensure that the 'next' method for ArrayIterator
      *      objects has not changed.
      */
     class Chain : public BaseChain
     {
       private:
         // Pointer to canonical Array.prototype and ArrayIterator.prototype
         HeapPtrNativeObject arrayProto_;
         HeapPtrNativeObject arrayIteratorProto_;
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -612,17 +612,17 @@ InvokeInterruptCallback(JSContext* cx)
     return false;
 }
 
 void
 JSRuntime::resetJitStackLimit()
 {
     // Note that, for now, we use the untrusted limit for ion. This is fine,
     // because it's the most conservative limit, and if we hit it, we'll bail
-    // out of ion into the interpeter, which will do a proper recursion check.
+    // out of ion into the interpreter, which will do a proper recursion check.
 #ifdef JS_SIMULATOR
     jitStackLimit_ = jit::Simulator::StackLimit();
 #else
     jitStackLimit_ = mainThread.nativeStackLimit[StackForUntrustedScript];
 #endif
     jitStackLimitNoInterrupt_ = jitStackLimit_;
 }
 
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -1027,17 +1027,17 @@ struct JSRuntime : public JS::shadow::Ru
      * duty (in debug builds) to verify that it matches the cx being used.
      */
     JSContext*         activeContext;
 #endif
 
     /* Garbage collector state, used by jsgc.c. */
     js::gc::GCRuntime   gc;
 
-    /* Garbage collector state has been sucessfully initialized. */
+    /* Garbage collector state has been successfully initialized. */
     bool                gcInitialized;
 
     int gcZeal() { return gc.zeal(); }
 
     void lockGC() {
         assertCanLock(js::GCLock);
         gc.lockGC();
     }
@@ -1097,17 +1097,17 @@ struct JSRuntime : public JS::shadow::Ru
     }
     void enableProfilerSampling() {
         suppressProfilerSampling = false;
     }
 
     /* Had an out-of-memory error which did not populate an exception. */
     bool                hadOutOfMemory;
 
-    /* We are curently deleting an object due to an initialization failure. */
+    /* We are currently deleting an object due to an initialization failure. */
     mozilla::DebugOnly<bool> handlingInitFailure;
 
     /* A context has been created on this runtime. */
     bool                haveCreatedContext;
 
     /*
      * Allow relazifying functions in compartments that are active. This is
      * only used by the relazifyFunctions() testing function.
--- a/js/src/vm/TraceLogging.h
+++ b/js/src/vm/TraceLogging.h
@@ -30,39 +30,39 @@ class PerThreadData;
 
 namespace jit {
     class CompileRuntime;
 } // namespace jit
 
 /*
  * Tracelogging overview.
  *
- * Tracelogging makes it possible to trace the occurence of a single event and/or
+ * Tracelogging makes it possible to trace the occurrence of a single event and/or
  * the start and stop of an event. This is implemented to give an as low overhead as
  * possible so it doesn't interfere with running.
  *
  *
  * Logging something is done in 3 stages.
  * 1) Get the tracelogger of the current thread.
  *     - TraceLoggerForMainThread(JSRuntime*)
  *     - TraceLoggerForCurrentThread(); // Should NOT be used for the mainthread.
  *
  * 2) Optionally create a TraceLoggerEvent for the text that needs to get logged. This
  *    step takes some time, so try to do this beforehand, outside the hot
- *    path and don't do unnecessary repetitions, since it will criple
+ *    path and don't do unnecessary repetitions, since it will cripple
  *    performance.
  *     - TraceLoggerEvent event(logger, "foo");
  *
  *    There are also some predefined events. They are located in
  *    TraceLoggerTextId. They don't require to create an TraceLoggerEvent and
  *    can also be used as an argument to these functions.
- * 3) Log the occurence of a single event:
+ * 3) Log the occurrence of a single event:
  *    - TraceLogTimestamp(logger, TraceLoggerTextId);
  *      Note: it is temporarily not supported to provide an TraceLoggerEvent as
- *            argument to log the occurence of a single event.
+ *            argument to log the occurrence of a single event.
  *
  *    or log the start and stop of an event:
  *    - TraceLogStartEvent(logger, TraceLoggerTextId);
  *    - TraceLogStartEvent(logger, TraceLoggerEvent);
  *    - TraceLogStopEvent(logger, TraceLoggerTextId);
  *    - TraceLogStopEvent(logger, TraceLoggerEvent);
  *
  *    or the start/stop of an event with a RAII class:
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -1826,17 +1826,17 @@ const Class TypedArrayObject::classes[Sc
 // Thus we need one class with cached prototype per kind of typed array, with a
 // delegated ClassSpec.
 #define IMPL_TYPED_ARRAY_PROTO_CLASS(typedArray, i) \
 { \
     /*
      * Actually ({}).toString.call(Uint8Array.prototype) should throw, because
      * Uint8Array.prototype lacks the the typed array internal slots.  (Same as
      * with %TypedArray%.prototype.)  It's not clear this is desirable (see
-     * above), but it's what we've always done, so keep doing it til we
+     * above), but it's what we've always done, so keep doing it till we
      * implement @@toStringTag or ES6 changes.
      */ \
     #typedArray "Prototype", \
     JSCLASS_HAS_CACHED_PROTO(JSProto_##typedArray), \
     nullptr, /* addProperty */ \
     nullptr, /* delProperty */ \
     nullptr, /* getProperty */ \
     nullptr, /* setProperty */ \