Fix a bunch of spelling mistakes :\
authordeanm@chromium.org <deanm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 15 Jan 2009 19:08:34 +0000 (19:08 +0000)
committerdeanm@chromium.org <deanm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 15 Jan 2009 19:08:34 +0000 (19:08 +0000)
Review URL: http://codereview.chromium.org/18094

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

49 files changed:
src/api.cc
src/assembler-arm.cc
src/assembler-arm.h
src/assembler-ia32.cc
src/assembler-ia32.h
src/bootstrapper.cc
src/bootstrapper.h
src/builtins-arm.cc
src/d8-readline.cc
src/debug.h
src/factory.cc
src/factory.h
src/frames.h
src/handles.h
src/hashmap.h
src/heap.cc
src/heap.h
src/ic-arm.cc
src/ic.cc
src/jsregexp.cc
src/jsregexp.h
src/macro-assembler-arm.cc
src/macro-assembler-ia32.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/parser.cc
src/parser.h
src/platform-macos.cc
src/platform-win32.cc
src/platform.h
src/property.h
src/regexp-macro-assembler-ia32.cc
src/rewriter.cc
src/runtime.cc
src/scanner.cc
src/scopes.cc
src/serialize.cc
src/serialize.h
src/simulator-arm.cc
src/simulator-arm.h
src/spaces.h
src/stub-cache-arm.cc
src/stub-cache-ia32.cc
src/top.cc
src/top.h
src/utils.h
src/v8threads.h
src/zone.h

index 92ee573..2529002 100644 (file)
@@ -140,7 +140,7 @@ static inline bool ApiCheck(bool condition,
 
 static bool ReportV8Dead(const char* location) {
   FatalErrorCallback callback = GetFatalErrorHandler();
-  callback(location, "V8 is no longer useable");
+  callback(location, "V8 is no longer usable");
   return true;
 }
 
@@ -153,7 +153,7 @@ static bool ReportEmptyHandle(const char* location) {
 
 
 /**
- * IsDeadCheck checks that the vm is useable.  If, for instance, the vm has been
+ * IsDeadCheck checks that the vm is usable.  If, for instance, the vm has been
  * out of memory at some point this check will fail.  It should be called on
  * entry to all methods that touch anything in the heap, except destructors
  * which you sometimes can't avoid calling after the vm has crashed.  Functions
index 4e3ae1a..f7725f6 100644 (file)
@@ -1331,7 +1331,7 @@ void Assembler::WriteRecordedPositions() {
   }
 
   // Write the position if it is different from what was written last time and
-  // also diferent from the written statement position.
+  // also different from the written statement position.
   if (current_position_ != written_position_ &&
       current_position_ != written_statement_position_) {
     CheckBuffer();
index faf402a..d8aa068 100644 (file)
@@ -389,7 +389,7 @@ class Assembler : public Malloced {
 
   // GetCode emits any pending (non-emitted) code and fills the descriptor
   // desc. GetCode() is idempotent; it returns the same result if no other
-  // Assembler functions are invoked inbetween GetCode() calls.
+  // Assembler functions are invoked in between GetCode() calls.
   void GetCode(CodeDesc* desc);
 
   // Label operations & relative jumps (PPUM Appendix D)
index f487c41..3f663df 100644 (file)
@@ -1990,7 +1990,7 @@ void Assembler::WriteRecordedPositions() {
   }
 
   // Write the position if it is different from what was written last time and
-  // also diferent from the written statement position.
+  // also different from the written statement position.
   if (current_position_ != written_position_ &&
       current_position_ != written_statement_position_) {
     EnsureSpace ensure_space(this);
index 7db218e..cb273c0 100644 (file)
@@ -405,7 +405,7 @@ class Assembler : public Malloced {
 
   // GetCode emits any pending (non-emitted) code and fills the descriptor
   // desc. GetCode() is idempotent; it returns the same result if no other
-  // Assembler functions are invoked inbetween GetCode() calls.
+  // Assembler functions are invoked in between GetCode() calls.
   void GetCode(CodeDesc* desc);
 
   // Read/Modify the code target in the branch/call instruction at pc.
@@ -430,10 +430,10 @@ class Assembler : public Malloced {
   // in the sense that some operations (e.g. mov()) can be called in more
   // the one way to generate the same instruction: The Register argument
   // can in some cases be replaced with an Operand(Register) argument.
-  // This should be cleaned up and made more othogonal. The questions
+  // This should be cleaned up and made more orthogonal. The questions
   // is: should we always use Operands instead of Registers where an
   // Operand is possible, or should we have a Register (overloaded) form
-  // instead? We must be carefull to make sure that the selected instruction
+  // instead? We must be careful to make sure that the selected instruction
   // is obvious from the parameters to avoid hard-to-find code generation
   // bugs.
 
index 8d54187..970acd3 100644 (file)
@@ -1083,7 +1083,7 @@ bool Genesis::InstallNatives() {
     call->shared()->DontAdaptArguments();
     ASSERT(call->is_compiled());
 
-    // Set the expected paramters for apply to 2; required by builtin.
+    // Set the expected parameters for apply to 2; required by builtin.
     apply->shared()->set_formal_parameter_count(2);
 
     // Set the lengths for the functions to satisfy ECMA-262.
@@ -1437,7 +1437,7 @@ Genesis::Genesis(Handle<Object> global_object,
                  v8::Handle<v8::ObjectTemplate> global_template,
                  v8::ExtensionConfiguration* extensions) {
   // Link this genesis object into the stacked genesis chain. This
-  // must be done before any early exits because the deconstructor
+  // must be done before any early exits because the destructor
   // will always do unlinking.
   previous_ = current_;
   current_  = this;
index 908217d..1314bfd 100644 (file)
@@ -49,7 +49,7 @@ class Bootstrapper : public AllStatic {
   // Detach the environment from its outer global object.
   static void DetachGlobal(Handle<Context> env);
 
-  // Traverses the pointers for memory manangment.
+  // Traverses the pointers for memory management.
   static void Iterate(ObjectVisitor* v);
 
   // Accessors for the native scripts cache. Used in lazy loading.
@@ -61,7 +61,7 @@ class Bootstrapper : public AllStatic {
   // Append code that needs fixup at the end of boot strapping.
   static void AddFixup(Code* code, MacroAssembler* masm);
 
-  // Tells whether boostrapping is active.
+  // Tells whether bootstrapping is active.
   static bool IsActive();
 
   // Encoding/decoding support for fixup flags.
index caddfb9..2e6f255 100644 (file)
@@ -565,7 +565,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
   __ cmp(r2, Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel));
   __ b(eq, &dont_adapt_arguments);
 
-  {  // Enough parameters: actual >= excpected
+  {  // Enough parameters: actual >= expected
     __ bind(&enough);
     EnterArgumentsAdaptorFrame(masm);
 
index b81a616..b86648d 100644 (file)
@@ -35,7 +35,7 @@
 
 
 // There are incompatibilities between different versions and different
-// implementations of readline.  This smoothes out one known incompatibility.
+// implementations of readline.  This smooths out one known incompatibility.
 #if RL_READLINE_VERSION >= 0x0500
 #define completion_matches rl_completion_matches
 #endif
index 56b8026..df24ec5 100644 (file)
@@ -179,7 +179,7 @@ class Debug {
   static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared);
   static bool HasDebugInfo(Handle<SharedFunctionInfo> shared);
 
-  // Returns whether the operation succedded.
+  // Returns whether the operation succeeded.
   static bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared);
 
   static bool IsDebugBreak(Address addr);
@@ -283,7 +283,7 @@ class Debug {
   static void ActivateStepIn(StackFrame* frame);
   static void ClearStepIn();
   static void ClearStepNext();
-  // Returns whether the compile succedded.
+  // Returns whether the compile succeeded.
   static bool EnsureCompiled(Handle<SharedFunctionInfo> shared);
   static void RemoveDebugInfo(Handle<DebugInfo> debug_info);
   static void SetAfterBreakTarget(JavaScriptFrame* frame);
index e24a941..c49f58a 100644 (file)
@@ -822,7 +822,7 @@ Handle<Map> Factory::ObjectLiteralMapFromCache(Handle<Context> context,
     Handle<MapCache> new_cache = NewMapCache(24);
     context->set_map_cache(*new_cache);
   }
-  // Check to see whether there is a maching element in the cache.
+  // Check to see whether there is a matching element in the cache.
   Handle<MapCache> cache =
       Handle<MapCache>(MapCache::cast(context->map_cache()));
   Handle<Object> result = Handle<Object>(cache->Lookup(*keys));
index 4ada152..f34997d 100644 (file)
@@ -129,7 +129,7 @@ class Factory : public AllStatic {
                                         Handle<JSObject> extension,
                                         bool is_catch_context);
 
-  // Return the Symbol maching the passed in string.
+  // Return the Symbol matching the passed in string.
   static Handle<String> SymbolFromString(Handle<String> value);
 
   // Allocate a new struct.  The struct is pretenured (allocated directly in
@@ -293,7 +293,7 @@ class Factory : public AllStatic {
 
   // Installs interceptors on the instance.  'desc' is a function template,
   // and instance is an object instance created by the function of this
-  // function tempalte.
+  // function template.
   static void ConfigureInstance(Handle<FunctionTemplateInfo> desc,
                                 Handle<JSObject> instance,
                                 bool* pending_exception);
index 662d237..ea82cc6 100644 (file)
@@ -261,7 +261,7 @@ class ExitFrame: public StackFrame {
 
   virtual Code* FindCode() const;
 
-  // Garbage colletion support.
+  // Garbage collection support.
   virtual void Iterate(ObjectVisitor* v) const;
 
   static ExitFrame* cast(StackFrame* frame) {
@@ -390,7 +390,7 @@ class JavaScriptFrame: public StandardFrame {
   // frame below it on the stack.
   inline bool has_adapted_arguments() const;
 
-  // Garbage colletion support.
+  // Garbage collection support.
   virtual void Iterate(ObjectVisitor* v) const;
 
   // Printing support.
@@ -459,7 +459,7 @@ class InternalFrame: public StandardFrame {
  public:
   virtual Type type() const { return INTERNAL; }
 
-  // Garbage colletion support.
+  // Garbage collection support.
   virtual void Iterate(ObjectVisitor* v) const;
 
   // Determine the code for the frame.
index 23709bb..ec0614b 100644 (file)
@@ -94,7 +94,7 @@ class Handle {
 // Handle operations.
 // They might invoke garbage collection. The result is an handle to
 // an object of expected type, or the handle is an error if running out
-// of space or encounting an internal error.
+// of space or encountering an internal error.
 
 void NormalizeProperties(Handle<JSObject> object,
                          PropertyNormalizationMode mode);
index 7826311..fabf3dc 100644 (file)
@@ -59,7 +59,7 @@ class HashMap {
 
   ~HashMap();
 
-  // HashMap entries are (key, value, hash) tripplets.
+  // HashMap entries are (key, value, hash) triplets.
   // Some clients may not need to use the value slot
   // (e.g. implementers of sets, where the key is the value).
   struct Entry {
index ba157fe..f8caa49 100644 (file)
@@ -1904,7 +1904,7 @@ Object* Heap::CopyJSObject(JSObject* source) {
     if (clone->IsFailure()) return clone;
     ASSERT(Heap::InNewSpace(clone));
     // Since we know the clone is allocated in new space, we can copy
-    // the contents without worring about updating the write barrier.
+    // the contents without worrying about updating the write barrier.
     CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(clone)->address()),
               reinterpret_cast<Object**>(source->address()),
               object_size);
index 3754c0b..46c6b0e 100644 (file)
@@ -734,7 +734,7 @@ class Heap : public AllStatic {
   static void TracePathToGlobal();
 #endif
 
-  // Callback function pased to Heap::Iterate etc.  Copies an object if
+  // Callback function passed to Heap::Iterate etc.  Copies an object if
   // necessary, the object might be promoted to an old space.  The caller must
   // ensure the precondition that the object is (a) a heap object and (b) in
   // the heap's from space.
index 4ccefa1..4db3980 100644 (file)
@@ -699,7 +699,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
 
   // Check the key against the length in the array, compute the
   // address to store into and fall through to fast case.
-  __ ldr(r1, MemOperand(sp));  // resotre key
+  __ ldr(r1, MemOperand(sp));  // restore key
   // r0 == value, r1 == key, r2 == elements, r3 == object.
   __ ldr(ip, FieldMemOperand(r3, JSArray::kLengthOffset));
   __ cmp(r1, Operand(ip));
index b28d6f6..d7bd764 100644 (file)
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -121,7 +121,7 @@ Address IC::OriginalCodeAddress() {
   // normally would be.
   Address addr = pc() - Assembler::kTargetAddrToReturnAddrDist;
   // Return the address in the original code. This is the place where
-  // the call which has been overwriten by the DebugBreakXXX resides
+  // the call which has been overwritten by the DebugBreakXXX resides
   // and the place where the inline cache system should look.
   int delta = original_code->instruction_start() - code->instruction_start();
   return addr + delta;
@@ -1162,7 +1162,7 @@ Object* SharedStoreIC_ExtendStorage(Arguments args) {
   FixedArray* new_storage = FixedArray::cast(result);
   new_storage->set(old_storage->length(), value);
 
-  // Set the new property value and do the map tranistion.
+  // Set the new property value and do the map transition.
   object->set_properties(new_storage);
   object->set_map(transition);
 
index 27e2bb6..aa11a69 100644 (file)
@@ -1462,7 +1462,7 @@ void Trace::PerformDeferredActions(RegExpMacroAssembler* assembler,
 
 
 // This is called as we come into a loop choice node and some other tricky
-// nodes.  It normalises the state of the code generator to ensure we can
+// nodes.  It normalizes the state of the code generator to ensure we can
 // generate generic code.
 bool Trace::Flush(RegExpCompiler* compiler, RegExpNode* successor) {
   RegExpMacroAssembler* assembler = compiler->macro_assembler();
index b0d9450..bf3bdb7 100644 (file)
@@ -657,7 +657,7 @@ class RegExpNode: public ZoneObject {
 
   // Returns a clone of this node initialized using the copy constructor
   // of its concrete class.  Note that the node may have to be pre-
-  // processed before it is on a useable state.
+  // processed before it is on a usable state.
   virtual RegExpNode* Clone() = 0;
 
  private:
index 5cbeae9..dc6d40f 100644 (file)
@@ -913,7 +913,7 @@ void MacroAssembler::Abort(const char* msg) {
   // We want to pass the msg string like a smi to avoid GC
   // problems, however msg is not guaranteed to be aligned
   // properly. Instead, we pass an aligned pointer that is
-  // a proper v8 smi, but also pass the aligment difference
+  // a proper v8 smi, but also pass the alignment difference
   // from the real pointer as a smi.
   intptr_t p1 = reinterpret_cast<intptr_t>(msg);
   intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag;
index fd7e4d9..80e4d3e 100644 (file)
@@ -975,7 +975,7 @@ void MacroAssembler::Abort(const char* msg) {
   // We want to pass the msg string like a smi to avoid GC
   // problems, however msg is not guaranteed to be aligned
   // properly. Instead, we pass an aligned pointer that is
-  // a proper v8 smi, but also pass the aligment difference
+  // a proper v8 smi, but also pass the alignment difference
   // from the real pointer as a smi.
   intptr_t p1 = reinterpret_cast<intptr_t>(msg);
   intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag;
@@ -996,7 +996,7 @@ void MacroAssembler::Abort(const char* msg) {
 
 CodePatcher::CodePatcher(byte* address, int size)
   : address_(address), size_(size), masm_(address, size + Assembler::kGap) {
-  // Create a new macro assembler pointing to the assress of the code to patch.
+  // Create a new macro assembler pointing to the address of the code to patch.
   // The size is adjusted with kGap on order for the assembler to generate size
   // bytes of instructions without failing with buffer size constraints.
   ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
index 01d897d..43f1a04 100644 (file)
@@ -27,7 +27,7 @@
 //
 // Review notes:
 //
-// - The use of macros in these inline fuctions may seem superfluous
+// - The use of macros in these inline functions may seem superfluous
 // but it is absolutely needed to make sure gcc generates optimal
 // code. gcc is not happy when attempting to inline too deep.
 //
index 137fed0..352f5bd 100644 (file)
@@ -1947,7 +1947,7 @@ Object* JSObject::NormalizeProperties(PropertyNormalizationMode mode) {
   }
   new_map->set_unused_property_fields(0);
 
-  // We have now sucessfully allocated all the necessary objects.
+  // We have now successfully allocated all the necessary objects.
   // Changes can now be made with the guarantee that all of them take effect.
   set_map(new_map);
   map()->set_instance_descriptors(Heap::empty_descriptor_array());
@@ -2424,7 +2424,7 @@ Object* JSObject::DefineGetterSetter(String* name,
   // callback overwriting in this object or it's prototype chain.
   // This mechanism is needed for instance in a browser setting, where
   // certain accessors such as window.location should not be allowed
-  // to be overwriten because allowing overwriting could potentially
+  // to be overwritten because allowing overwriting could potentially
   // cause security problems.
   LookupResult callback_result;
   LookupCallback(name, &callback_result);
index 60e6d75..b77c0b2 100644 (file)
@@ -1656,7 +1656,7 @@ class DescriptorArray: public FixedArray {
   int BinarySearch(String* name, int low, int high);
 
   // Perform a linear search in the instance descriptors represented
-  // by this fixed array.  len is the number of descriptor indeces that are
+  // by this fixed array.  len is the number of descriptor indices that are
   // valid.  Does not require the descriptors to be sorted.
   int LinearSearch(String* name, int len);
 
@@ -1793,7 +1793,7 @@ class HashTable: public FixedArray {
   // Returns the key at entry.
   Object* KeyAt(int entry) { return get(EntryToIndex(entry)); }
 
-  // Tells wheter k is a real key.  Null and undefined are not allowed
+  // Tells whether k is a real key.  Null and undefined are not allowed
   // as keys and can be used to indicate missing or deleted elements.
   bool IsKey(Object* k) {
     return !k->IsNull() && !k->IsUndefined();
@@ -2060,7 +2060,7 @@ class Dictionary: public DictionaryBase {
 
   void UpdateMaxNumberKey(uint32_t key);
 
-  // Generate new enumneration indices to avoid enumeration insdex overflow.
+  // Generate new enumeration indices to avoid enumeration index overflow.
   Object* GenerateNewEnumerationIndices();
 
   static const int kMaxNumberKeyIndex = kPrefixStartIndex;
@@ -2233,7 +2233,7 @@ class Code: public HeapObject {
   // Returns true if pc is inside this object's instructions.
   inline bool contains(byte* pc);
 
-  // Returns the adddress of the scope information.
+  // Returns the address of the scope information.
   inline byte* sinfo_start();
 
   // Convert inline cache target from address to code object before GC.
@@ -3774,7 +3774,7 @@ class JSArray: public JSObject {
 };
 
 
-// An accesor must have a getter, but can have no setter.
+// An accessor must have a getter, but can have no setter.
 //
 // When setting a property, V8 searches accessors in prototypes.
 // If an accessor was found and it does not have a setter,
@@ -4037,11 +4037,11 @@ class TypeSwitchInfo: public Struct {
 };
 
 
-// The DebugInfo class holds additional information for a function beeing
+// The DebugInfo class holds additional information for a function being
 // debugged.
 class DebugInfo: public Struct {
  public:
-  // The shared function info for the source beeing debugged.
+  // The shared function info for the source being debugged.
   DECL_ACCESSORS(shared, SharedFunctionInfo)
   // Code object for the original code.
   DECL_ACCESSORS(original_code, Code)
index 488389b..60861fc 100644 (file)
@@ -640,7 +640,7 @@ class ZoneListWrapper {
 // Allocation macro that should be used to allocate objects that must
 // only be allocated in real parsing mode.  Note that in preparse mode
 // not only is the syntax tree not created but the constructor
-// arguments are not evaulated.
+// arguments are not evaluated.
 #define NEW(expr) (is_pre_parsing_ ? NULL : new expr)
 
 
@@ -1254,7 +1254,7 @@ Statement* Parser::ParseStatement(ZoneStringList* labels, bool* ok) {
   // statements, which themselves are only valid within blocks,
   // iterations or 'switch' statements (i.e., BreakableStatements),
   // labels can be simply ignored in all other cases; except for
-  // trivial labelled break statements 'label: break label' which is
+  // trivial labeled break statements 'label: break label' which is
   // parsed into an empty statement.
 
   // Keep the source position of the statement
@@ -1869,7 +1869,7 @@ Statement* Parser::ParseBreakStatement(ZoneStringList* labels, bool* ok) {
       tok != Token::SEMICOLON && tok != Token::RBRACE && tok != Token::EOS) {
     label = ParseIdentifier(CHECK_OK);
   }
-  // Parse labelled break statements that target themselves into
+  // Parse labeled break statements that target themselves into
   // empty statements, e.g. 'l1: l2: l3: break l2;'
   if (!label.is_null() && ContainsLabel(labels, label)) {
     return factory()->EmptyStatement();
index 6e86f09..ee303b4 100644 (file)
@@ -153,7 +153,7 @@ bool ParseRegExp(FlatStringReader* input,
 // Support for doing lazy compilation. The script is the script containing full
 // source of the script where the function is declared. The start_position and
 // end_position specifies the part of the script source which has the source
-// for the function decleration in the form:
+// for the function declaration in the form:
 //
 //    (<formal parameters>) { <function body> }
 //
index 122e7fa..f625174 100644 (file)
@@ -259,8 +259,8 @@ void OS::Free(void* buf, const size_t length) {
 }
 
 
-void OS::Sleep(int miliseconds) {
-  usleep(1000 * miliseconds);
+void OS::Sleep(int milliseconds) {
+  usleep(1000 * milliseconds);
 }
 
 
index ada090a..92fb536 100644 (file)
@@ -61,7 +61,7 @@
 #include <dbghelp.h>  // For SymLoadModule64 and al.
 #include <tlhelp32.h>  // For Module32First and al.
 
-// These aditional WIN32 includes have to be right here as the #undef's below
+// These additional WIN32 includes have to be right here as the #undef's below
 // makes it impossible to have them elsewhere.
 #include <winsock2.h>
 #include <process.h>  // for _beginthreadex()
@@ -490,7 +490,7 @@ bool Time::InDST() {
 }
 
 
-// Return the dalight savings time offset for this time.
+// Return the daylight savings time offset for this time.
 int64_t Time::DaylightSavingsOffset() {
   return InDST() ? 60 * kMsPerMinute : 0;
 }
@@ -859,7 +859,7 @@ Win32MemoryMappedFile::~Win32MemoryMappedFile() {
 
 
 // The following code loads functions defined in DbhHelp.h and TlHelp32.h
-// dynamically. This is to avoid beeing depending on dbghelp.dll and
+// dynamically. This is to avoid being depending on dbghelp.dll and
 // tlhelp32.dll when running (the functions in tlhelp32.dll have been moved to
 // kernel32.dll at some point so loading functions defines in TlHelp32.h
 // dynamically might not be necessary any more - for some versions of Windows?).
@@ -1013,7 +1013,7 @@ TLHELP32_FUNCTION_LIST(DLL_FUNC_LOADED)
 
   dbghelp_loaded = result;
   return result;
-  // NOTE: The modules are never unloaded and will stay arround until the
+  // NOTE: The modules are never unloaded and will stay around until the
   // application is closed.
 }
 
index 8d62efd..0e42ba6 100644 (file)
@@ -33,7 +33,7 @@
 // implementation for a particular platform is put in platform_<os>.cc.
 // The build system then uses the implementation for the target platform.
 //
-// This design has been choosen because it is simple and fast. Alternatively,
+// This design has been chosen because it is simple and fast. Alternatively,
 // the platform dependent classes could have been implemented using abstract
 // superclasses with virtual methods and having specializations for each
 // platform. This design was rejected because it was more complicated and
@@ -145,7 +145,7 @@ class OS {
   static void PrintError(const char* format, ...);
   static void VPrintError(const char* format, va_list args);
 
-  // Allocate/Free memory used by JS heap. Pages are readable/writeable, but
+  // Allocate/Free memory used by JS heap. Pages are readable/writable, but
   // they are not guaranteed to be executable unless 'executable' is true.
   // Returns the address of allocated memory, or NULL if failed.
   static void* Allocate(const size_t requested,
@@ -162,8 +162,8 @@ class OS {
   // heap corruption.
   static bool IsOutsideAllocatedSpace(void* pointer);
 
-  // Sleep for a number of miliseconds.
-  static void Sleep(const int miliseconds);
+  // Sleep for a number of milliseconds.
+  static void Sleep(const int milliseconds);
 
   // Abort the current process.
   static void Abort();
index 9af6cbb..914b8dd 100644 (file)
@@ -324,7 +324,7 @@ class DescriptorStream BASE_EMBEDDED {
  protected:
   DescriptorArray* descriptors_;
   int pos_;   // Current position.
-  int limit_;  // Limit for posistion.
+  int limit_;  // Limit for position.
 };
 
 
index 35a6e52..824a297 100644 (file)
@@ -732,7 +732,7 @@ Handle<Object> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
   __ pop(ebx);
   __ pop(edi);
   __ pop(esi);
-  // Exit function frame, restore previus one.
+  // Exit function frame, restore previous one.
   __ pop(ebp);
   __ ret(0);
 
index f0d53b8..956d3cb 100644 (file)
@@ -282,7 +282,7 @@ void AstOptimizer::VisitAssignment(Assignment* node) {
     case Token::INIT_VAR:
     case Token::INIT_CONST:
     case Token::ASSIGN:
-      // Pure assigment copies the type from the value.
+      // Pure assignment copies the type from the value.
       node->type()->CopyFrom(node->value()->type());
       break;
     case Token::ASSIGN_BIT_OR:
@@ -420,7 +420,7 @@ void AstOptimizer::VisitBinaryOperation(BinaryOperation* node) {
       node->type()->SetAsLikelySmi();
     }
     if (node->type()->IsLikelySmi()) {
-      // The type of this node changed to LIKELY_SMI. Propagate this knowlege
+      // The type of this node changed to LIKELY_SMI. Propagate this knowledge
       // down through the nodes.
       if (node->left()->type()->IsUnknown()) {
         node->left()->type()->SetAsLikelySmi();
@@ -455,7 +455,7 @@ void AstOptimizer::VisitCompareOperation(CompareOperation* node) {
       node->type()->SetAsLikelySmi();
     }
     if (node->type()->IsLikelySmi()) {
-      // The type of this node changed to LIKELY_SMI. Propagate this knowlege
+      // The type of this node changed to LIKELY_SMI. Propagate this knowledge
       // down through the nodes.
       if (node->left()->type()->IsUnknown()) {
         node->left()->type()->SetAsLikelySmi();
index f75aecf..25afe28 100644 (file)
@@ -154,7 +154,7 @@ static Object* Runtime_CreateObjectLiteralBoilerplate(Arguments args) {
                                             &is_result_from_cache);
 
   Handle<JSObject> boilerplate = Factory::NewJSObjectFromMap(map);
-  {  // Add the constant propeties to the boilerplate.
+  {  // Add the constant properties to the boilerplate.
     int length = constant_properties->length();
     OptimizedObjectForAddingMultipleProperties opt(boilerplate,
                                                    !is_result_from_cache);
@@ -1735,7 +1735,7 @@ Object* Runtime::GetObjectProperty(Handle<Object> object, Handle<Object> key) {
     name = Handle<String>::cast(converted);
   }
 
-  // Check if the name is trivially convertable to an index and get
+  // Check if the name is trivially convertible to an index and get
   // the element if so.
   if (name->AsArrayIndex(&index)) {
     return GetElementOrCharAt(object, index);
@@ -1767,7 +1767,7 @@ static Object* Runtime_KeyedGetProperty(Arguments args) {
   // itself.
   //
   // The global proxy objects has to be excluded since LocalLookup on
-  // the global proxy object can return a valid result eventhough the
+  // the global proxy object can return a valid result even though the
   // global proxy object never has properties.  This is the case
   // because the global proxy object forwards everything to its hidden
   // prototype including local lookups.
@@ -3003,7 +3003,7 @@ static Object* Runtime_SmiLexicographicCompare(Arguments args) {
   // same as the lexicographic order of the string representations.
   if (x_value == 0 || y_value == 0) return Smi::FromInt(x_value - y_value);
 
-  // If only one of the intergers is negative the negative number is
+  // If only one of the integers is negative the negative number is
   // smallest because the char code of '-' is less than the char code
   // of any digit.  Otherwise, we make both values positive.
   if (x_value < 0 || y_value < 0) {
@@ -3341,7 +3341,7 @@ static Object* Runtime_NewObject(Arguments args) {
   if (constructor->IsJSFunction()) {
     JSFunction* function = JSFunction::cast(constructor);
 
-    // Handle steping into constructors if step into is active.
+    // Handle stepping into constructors if step into is active.
     if (Debug::StepInActive()) {
       HandleScope scope;
       Debug::HandleStepIn(Handle<JSFunction>(function), 0, true);
@@ -4528,7 +4528,7 @@ static Object* DebugLookupResultValue(Object* obj, String* name,
     case CONSTANT_FUNCTION:
       return obj->GetProperty(name);
     case CALLBACKS: {
-      // Get the property value. If there is an exception it must be thown from
+      // Get the property value. If there is an exception it must be thrown from
       // a JavaScript getter.
       Object* value;
       value = obj->GetProperty(name);
@@ -5107,7 +5107,7 @@ static Object* FindSharedFunctionInfoInScript(Handle<Script> script,
           }
           if (start_position <= position &&
               position <= shared->end_position()) {
-            // If there is no candidate or this function is within the currrent
+            // If there is no candidate or this function is within the current
             // candidate this is the new candidate.
             if (target.is_null()) {
               target_start_position = start_position;
@@ -5325,7 +5325,7 @@ static Handle<Object> GetArgumentsObject(JavaScriptFrame* frame,
 
 
 // Evaluate a piece of JavaScript in the context of a stack frame for
-// debugging. This is acomplished by creating a new context which in its
+// debugging. This is accomplished by creating a new context which in its
 // extension part has all the parameters and locals of the function on the
 // stack frame. A function which calls eval with the code to evaluate is then
 // compiled in this context and called in this context. As this context
@@ -5436,7 +5436,7 @@ static Object* Runtime_DebugEvaluate(Arguments args) {
   // Wrap the evaluation statement in a new function compiled in the newly
   // created context. The function has one parameter which has to be called
   // 'arguments'. This it to have access to what would have been 'arguments' in
-  // the function beeing debugged.
+  // the function being debugged.
   // function(arguments,__source__) {return eval(__source__);}
   static const char* source_str =
       "function(arguments,__source__){return eval(__source__);}";
@@ -5551,7 +5551,7 @@ static Object* Runtime_DebugGetLoadedScripts(Arguments args) {
   ASSERT(args.length() == 0);
 
   // Perform two GCs to get rid of all unreferenced scripts. The first GC gets
-  // rid of all the cached script wrappes and the second gets rid of the
+  // rid of all the cached script wrappers and the second gets rid of the
   // scripts which is no longer referenced.
   Heap::CollectAllGarbage();
   Heap::CollectAllGarbage();
index 3ae6936..8585e38 100644 (file)
@@ -777,7 +777,7 @@ Token::Value Scanner::ScanIdentifier() {
 
 
 bool Scanner::IsIdentifier(unibrow::CharacterStream* buffer) {
-  // Checks whether the buffer contains an identifier (no escapse).
+  // Checks whether the buffer contains an identifier (no escape).
   if (!buffer->has_more()) return false;
   if (!kIsIdentifierStart.get(buffer->GetNext())) return false;
   while (buffer->has_more()) {
index fcdc577..b198d96 100644 (file)
@@ -542,7 +542,7 @@ Variable* Scope::LookupRecursive(Handle<String> name, bool inner_lookup) {
     // This lookup corresponds to a lookup in the "intermediate" scope sitting
     // between this scope and the outer scope. (ECMA-262, 3rd., requires that
     // the name of named function literal is kept in an intermediate scope
-    // inbetween this scope and the next outer scope.)
+    // in between this scope and the next outer scope.)
     if (function_ != NULL && function_->name().is_identical_to(name)) {
       var = function_;
 
index 557e633..4e1529c 100644 (file)
@@ -743,7 +743,7 @@ class SnapshotWriter {
 
  private:
   char* str_;  // the snapshot
-  int len_;   // the curent length of str_
+  int len_;   // the current length of str_
   int max_;   // the allocated size of str_
 };
 
index e17ee15..0679ecc 100644 (file)
@@ -262,7 +262,7 @@ class Deserializer: public ObjectVisitor {
   virtual ~Deserializer();
 
   // Read the flags from the header of the file, and set those that
-  // should be inhereted from the snapshot.
+  // should be inherited from the snapshot.
   void GetFlags();
 
   // Read saved profiling information from the file and log it if required.
index 4203ad3..7047e9c 100644 (file)
@@ -45,7 +45,7 @@ using ::v8::internal::ReadLine;
 using ::v8::internal::DeleteArray;
 
 // This macro provides a platform independent use of sscanf. The reason for
-// SScanF not beeing implemented in a platform independent was through
+// SScanF not being implemented in a platform independent was through
 // ::v8::internal::OS in the same way as SNPrintF is that the Windows C Run-Time
 // Library does not provide vsscanf.
 #define SScanF sscanf  // NOLINT
index ccb3e80..4f3c53d 100644 (file)
@@ -106,7 +106,7 @@ class Simulator {
   void Execute();
 
   // V8 generally calls into generated code with 5 parameters. This is a
-  // convenience funtion, which sets up the simulator state and grabs the
+  // convenience function, which sets up the simulator state and grabs the
   // result on return.
   v8::internal::Object* Call(int32_t entry, int32_t p0, int32_t p1,
                              int32_t p2, int32_t p3, int32_t p4);
index 718f888..3d13219 100644 (file)
@@ -800,7 +800,7 @@ class PagedSpace : public Space {
 
   // Expands the space by allocating a fixed number of pages. Returns false if
   // it cannot allocate requested number of pages from OS. Newly allocated
-  // pages are appened to the last_page;
+  // pages are append to the last_page;
   bool Expand(Page* last_page);
 
   // Generic fast case allocation function that tries linear allocation in
@@ -896,7 +896,7 @@ class SemiSpace : public Space {
 
   // Double the size of the semispace by committing extra virtual memory.
   // Assumes that the caller has checked that the semispace has not reached
-  // its maxmimum capacity (and thus there is space available in the reserved
+  // its maximum capacity (and thus there is space available in the reserved
   // address range to grow).
   bool Double();
 
@@ -922,7 +922,7 @@ class SemiSpace : public Space {
     return (reinterpret_cast<uint32_t>(o) & object_mask_) == object_expected_;
   }
 
-  // The offset of an address from the begining of the space.
+  // The offset of an address from the beginning of the space.
   int SpaceOffsetForAddress(Address addr) { return addr - low(); }
 
   // If we don't have this here then SemiSpace will be abstract.  However
@@ -1526,11 +1526,11 @@ class LargeObjectChunk {
   // Returns the object in this chunk.
   inline HeapObject* GetObject();
 
-  // Given a requested size (including any extra remembereed set words),
+  // Given a requested size (including any extra remembered set words),
   // returns the physical size of a chunk to be allocated.
   static int ChunkSizeFor(int size_in_bytes);
 
-  // Given a chunk size, returns the object size it can accomodate (not
+  // Given a chunk size, returns the object size it can accommodate (not
   // including any extra remembered set words).  Used by
   // LargeObjectSpace::Available.  Note that this can overestimate the size
   // of object that will fit in a chunk---if the object requires extra
index 4470822..732d292 100644 (file)
@@ -384,7 +384,7 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
   // Perform map transition for the receiver if necessary.
   if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) {
     // The properties must be extended before we can store the value.
-    // We jump to a runtime call that extends the propeties array.
+    // We jump to a runtime call that extends the properties array.
     __ mov(r2, Operand(Handle<Map>(transition)));
     // Please note, if we implement keyed store for arm we need
     // to call the Builtins::KeyedStoreIC_ExtendStorage.
index f35877f..5acc1df 100644 (file)
@@ -394,7 +394,7 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
   // Perform map transition for the receiver if necessary.
   if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) {
     // The properties must be extended before we can store the value.
-    // We jump to a runtime call that extends the propeties array.
+    // We jump to a runtime call that extends the properties array.
     __ mov(ecx, Immediate(Handle<Map>(transition)));
     Handle<Code> ic(Builtins::builtin(storage_extend));
     __ jmp(ic, RelocInfo::CODE_TARGET);
index be8c39b..d339591 100644 (file)
@@ -644,7 +644,7 @@ Failure* Top::Throw(Object* exception, MessageLocation* location) {
 
 
 Failure* Top::ReThrow(Object* exception, MessageLocation* location) {
-  // Set the exception beeing re-thrown.
+  // Set the exception being re-thrown.
   set_pending_exception(exception);
   return Failure::Exception();
 }
@@ -705,7 +705,7 @@ void Top::PrintCurrentStackTrace(FILE* out) {
     Handle<Object> is_top_level = it.done()
         ? Factory::true_value()
         : Factory::false_value();
-    // Generate and print strack trace line.
+    // Generate and print stack trace line.
     Handle<String> line =
         Execution::GetStackTraceLine(recv, fun, pos_obj, is_top_level);
     if (line->length() > 0) {
index 7fe735c..0a3bec3 100644 (file)
--- a/src/top.h
+++ b/src/top.h
@@ -38,7 +38,7 @@ namespace v8 { namespace internal {
 
 // Top has static variables used for JavaScript execution.
 
-class SaveContext;  // Forward decleration.
+class SaveContext;  // Forward declaration.
 
 class ThreadLocalTop BASE_EMBEDDED {
  public:
@@ -318,7 +318,7 @@ class Top {
 
 
 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the
-// class as a workarround for a bug in the generated code found with these
+// class as a work around for a bug in the generated code found with these
 // versions of GCC. See V8 issue 122 for details.
 class SaveContext BASE_EMBEDDED {
  public:
index c8a4386..9861246 100644 (file)
@@ -421,7 +421,7 @@ inline Vector< Handle<Object> > HandleVector(v8::internal::Handle<T>* elms,
 
 // Simple support to read a file into a 0-terminated C-string.
 // The returned buffer must be freed by the caller.
-// On return, *exits tells whether the file exisited.
+// On return, *exits tells whether the file existed.
 Vector<const char> ReadFile(const char* filename,
                             bool* exists,
                             bool verbose = true);
index 557a8f1..b86df73 100644 (file)
@@ -99,7 +99,7 @@ class ContextSwitcher: public Thread {
   // Stop sending preemption requests to threads.
   static void StopPreemption();
 
-  // Preempted thread needs to call back to the ContextSwitcher to acknowlege
+  // Preempted thread needs to call back to the ContextSwitcher to acknowledge
   // the handling of a preemption request.
   static void PreemptionReceived();
 
index 5a8b0fe..45c52a2 100644 (file)
@@ -117,7 +117,7 @@ class ZoneObject {
   void* operator new(size_t size) { return Zone::New(size); }
 
   // Ideally, the delete operator should be private instead of
-  // public, but unfortuately the compiler sometimes synthesizes
+  // public, but unfortunately the compiler sometimes synthesizes
   // (unused) destructors for classes derived from ZoneObject, which
   // require the operator to be visible. MSVC requires the delete
   // operator to be public.