From b7c1200462e5ed5ff4270e021cf8ea2870945419 Mon Sep 17 00:00:00 2001 From: "deanm@chromium.org" Date: Thu, 15 Jan 2009 19:08:34 +0000 Subject: [PATCH] Fix a bunch of spelling mistakes :\ Review URL: http://codereview.chromium.org/18094 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/api.cc | 4 ++-- src/assembler-arm.cc | 2 +- src/assembler-arm.h | 2 +- src/assembler-ia32.cc | 2 +- src/assembler-ia32.h | 6 +++--- src/bootstrapper.cc | 4 ++-- src/bootstrapper.h | 4 ++-- src/builtins-arm.cc | 2 +- src/d8-readline.cc | 2 +- src/debug.h | 4 ++-- src/factory.cc | 2 +- src/factory.h | 4 ++-- src/frames.h | 6 +++--- src/handles.h | 2 +- src/hashmap.h | 2 +- src/heap.cc | 2 +- src/heap.h | 2 +- src/ic-arm.cc | 2 +- src/ic.cc | 4 ++-- src/jsregexp.cc | 2 +- src/jsregexp.h | 2 +- src/macro-assembler-arm.cc | 2 +- src/macro-assembler-ia32.cc | 4 ++-- src/objects-inl.h | 2 +- src/objects.cc | 4 ++-- src/objects.h | 14 +++++++------- src/parser.cc | 6 +++--- src/parser.h | 2 +- src/platform-macos.cc | 4 ++-- src/platform-win32.cc | 8 ++++---- src/platform.h | 8 ++++---- src/property.h | 2 +- src/regexp-macro-assembler-ia32.cc | 2 +- src/rewriter.cc | 6 +++--- src/runtime.cc | 20 ++++++++++---------- src/scanner.cc | 2 +- src/scopes.cc | 2 +- src/serialize.cc | 2 +- src/serialize.h | 2 +- src/simulator-arm.cc | 2 +- src/simulator-arm.h | 2 +- src/spaces.h | 10 +++++----- src/stub-cache-arm.cc | 2 +- src/stub-cache-ia32.cc | 2 +- src/top.cc | 4 ++-- src/top.h | 4 ++-- src/utils.h | 2 +- src/v8threads.h | 2 +- src/zone.h | 2 +- 49 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/api.cc b/src/api.cc index 92ee5730f..252900290 100644 --- a/src/api.cc +++ b/src/api.cc @@ -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 diff --git a/src/assembler-arm.cc b/src/assembler-arm.cc index 4e3ae1afc..f7725f669 100644 --- a/src/assembler-arm.cc +++ b/src/assembler-arm.cc @@ -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(); diff --git a/src/assembler-arm.h b/src/assembler-arm.h index faf402a7f..d8aa0681b 100644 --- a/src/assembler-arm.h +++ b/src/assembler-arm.h @@ -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) diff --git a/src/assembler-ia32.cc b/src/assembler-ia32.cc index f487c418d..3f663df20 100644 --- a/src/assembler-ia32.cc +++ b/src/assembler-ia32.cc @@ -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); diff --git a/src/assembler-ia32.h b/src/assembler-ia32.h index 7db218ef4..cb273c0d9 100644 --- a/src/assembler-ia32.h +++ b/src/assembler-ia32.h @@ -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. diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 8d5418782..970acd38c 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -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 global_object, v8::Handle 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; diff --git a/src/bootstrapper.h b/src/bootstrapper.h index 908217d02..1314bfdca 100644 --- a/src/bootstrapper.h +++ b/src/bootstrapper.h @@ -49,7 +49,7 @@ class Bootstrapper : public AllStatic { // Detach the environment from its outer global object. static void DetachGlobal(Handle 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. diff --git a/src/builtins-arm.cc b/src/builtins-arm.cc index caddfb9d0..2e6f25518 100644 --- a/src/builtins-arm.cc +++ b/src/builtins-arm.cc @@ -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); diff --git a/src/d8-readline.cc b/src/d8-readline.cc index b81a6165a..b86648d00 100644 --- a/src/d8-readline.cc +++ b/src/d8-readline.cc @@ -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 diff --git a/src/debug.h b/src/debug.h index 56b802622..df24ec550 100644 --- a/src/debug.h +++ b/src/debug.h @@ -179,7 +179,7 @@ class Debug { static Handle GetDebugInfo(Handle shared); static bool HasDebugInfo(Handle shared); - // Returns whether the operation succedded. + // Returns whether the operation succeeded. static bool EnsureDebugInfo(Handle 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 shared); static void RemoveDebugInfo(Handle debug_info); static void SetAfterBreakTarget(JavaScriptFrame* frame); diff --git a/src/factory.cc b/src/factory.cc index e24a941b8..c49f58a93 100644 --- a/src/factory.cc +++ b/src/factory.cc @@ -822,7 +822,7 @@ Handle Factory::ObjectLiteralMapFromCache(Handle context, Handle 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 cache = Handle(MapCache::cast(context->map_cache())); Handle result = Handle(cache->Lookup(*keys)); diff --git a/src/factory.h b/src/factory.h index 4ada152a3..f34997d0e 100644 --- a/src/factory.h +++ b/src/factory.h @@ -129,7 +129,7 @@ class Factory : public AllStatic { Handle extension, bool is_catch_context); - // Return the Symbol maching the passed in string. + // Return the Symbol matching the passed in string. static Handle SymbolFromString(Handle 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 desc, Handle instance, bool* pending_exception); diff --git a/src/frames.h b/src/frames.h index 662d2373f..ea82cc694 100644 --- a/src/frames.h +++ b/src/frames.h @@ -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. diff --git a/src/handles.h b/src/handles.h index 23709bbbd..ec0614b5e 100644 --- a/src/handles.h +++ b/src/handles.h @@ -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 object, PropertyNormalizationMode mode); diff --git a/src/hashmap.h b/src/hashmap.h index 78263111b..fabf3dc3e 100644 --- a/src/hashmap.h +++ b/src/hashmap.h @@ -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 { diff --git a/src/heap.cc b/src/heap.cc index ba157fe25..f8caa493a 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -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(HeapObject::cast(clone)->address()), reinterpret_cast(source->address()), object_size); diff --git a/src/heap.h b/src/heap.h index 3754c0b2a..46c6b0e31 100644 --- a/src/heap.h +++ b/src/heap.h @@ -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. diff --git a/src/ic-arm.cc b/src/ic-arm.cc index 4ccefa11b..4db3980c5 100644 --- a/src/ic-arm.cc +++ b/src/ic-arm.cc @@ -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)); diff --git a/src/ic.cc b/src/ic.cc index b28d6f681..d7bd76440 100644 --- 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); diff --git a/src/jsregexp.cc b/src/jsregexp.cc index 27e2bb6e1..aa11a6950 100644 --- a/src/jsregexp.cc +++ b/src/jsregexp.cc @@ -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(); diff --git a/src/jsregexp.h b/src/jsregexp.h index b0d945046..bf3bdb777 100644 --- a/src/jsregexp.h +++ b/src/jsregexp.h @@ -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: diff --git a/src/macro-assembler-arm.cc b/src/macro-assembler-arm.cc index 5cbeae912..dc6d40fe3 100644 --- a/src/macro-assembler-arm.cc +++ b/src/macro-assembler-arm.cc @@ -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(msg); intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; diff --git a/src/macro-assembler-ia32.cc b/src/macro-assembler-ia32.cc index fd7e4d9cd..80e4d3e72 100644 --- a/src/macro-assembler-ia32.cc +++ b/src/macro-assembler-ia32.cc @@ -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(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); diff --git a/src/objects-inl.h b/src/objects-inl.h index 01d897d33..43f1a04c2 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -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. // diff --git a/src/objects.cc b/src/objects.cc index 137fed0d5..352f5bd7b 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -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); diff --git a/src/objects.h b/src/objects.h index 60e6d753e..b77c0b2fd 100644 --- a/src/objects.h +++ b/src/objects.h @@ -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) diff --git a/src/parser.cc b/src/parser.cc index 488389b27..60861fcdc 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -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(); diff --git a/src/parser.h b/src/parser.h index 6e86f0961..ee303b402 100644 --- a/src/parser.h +++ b/src/parser.h @@ -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: // // () { } // diff --git a/src/platform-macos.cc b/src/platform-macos.cc index 122e7fa6d..f625174cd 100644 --- a/src/platform-macos.cc +++ b/src/platform-macos.cc @@ -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); } diff --git a/src/platform-win32.cc b/src/platform-win32.cc index ada090ac5..92fb53664 100644 --- a/src/platform-win32.cc +++ b/src/platform-win32.cc @@ -61,7 +61,7 @@ #include // For SymLoadModule64 and al. #include // 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 #include // 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. } diff --git a/src/platform.h b/src/platform.h index 8d62efdea..0e42ba66f 100644 --- a/src/platform.h +++ b/src/platform.h @@ -33,7 +33,7 @@ // implementation for a particular platform is put in platform_.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(); diff --git a/src/property.h b/src/property.h index 9af6cbb43..914b8dd59 100644 --- a/src/property.h +++ b/src/property.h @@ -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. }; diff --git a/src/regexp-macro-assembler-ia32.cc b/src/regexp-macro-assembler-ia32.cc index 35a6e5290..824a297dc 100644 --- a/src/regexp-macro-assembler-ia32.cc +++ b/src/regexp-macro-assembler-ia32.cc @@ -732,7 +732,7 @@ Handle RegExpMacroAssemblerIA32::GetCode(Handle source) { __ pop(ebx); __ pop(edi); __ pop(esi); - // Exit function frame, restore previus one. + // Exit function frame, restore previous one. __ pop(ebp); __ ret(0); diff --git a/src/rewriter.cc b/src/rewriter.cc index f0d53b8e2..956d3cb40 100644 --- a/src/rewriter.cc +++ b/src/rewriter.cc @@ -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(); diff --git a/src/runtime.cc b/src/runtime.cc index f75aecf56..25afe28b1 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -154,7 +154,7 @@ static Object* Runtime_CreateObjectLiteralBoilerplate(Arguments args) { &is_result_from_cache); Handle 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, Handle key) { name = Handle::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(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