[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kjs] /: Fix minor EBN issues
From: Yuri Chornoivan <null () kde ! org>
Date: 2018-09-11 16:14:26
Message-ID: E1fzlJ4-0001uI-D7 () code ! kde ! org
[Download RAW message or body]
Git commit 06dce21e2f48399f50c2a5dda33476e4652e8da7 by Yuri Chornoivan.
Committed on 11/09/2018 at 16:14.
Pushed by yurchor into branch 'master'.
Fix minor EBN issues
M +2 -2 autotests/ecmatest.cpp
M +1 -1 autotests/ecmatest.h
M +1 -1 src/kjs/JSWrapperObject.h
M +1 -1 src/kjs/api/kjsprivate.h
M +2 -2 src/kjs/array_instance.cpp
M +1 -1 src/kjs/bytecode/generator/codeprinter.cpp
M +1 -1 src/kjs/bytecode/generator/codeprinter.h
M +1 -1 src/kjs/bytecode/generator/driver.cpp
M +1 -1 src/kjs/bytecode/generator/filetemplate.h
M +1 -1 src/kjs/bytecode/generator/lexer.cpp
M +1 -1 src/kjs/bytecode/generator/lexer.h
M +1 -1 src/kjs/bytecode/generator/parser.cpp
M +1 -1 src/kjs/bytecode/generator/parser.h
M +1 -1 src/kjs/bytecode/generator/tablebuilder.cpp
M +2 -2 src/kjs/bytecode/generator/tablebuilder.h
M +1 -1 src/kjs/bytecode/generator/types.cpp
M +1 -1 src/kjs/bytecode/generator/types.h
M +1 -1 src/kjs/completion.h
M +3 -0 src/kjs/context.h
M +1 -1 src/kjs/debugger.h
M +1 -1 src/kjs/nodes.h
M +4 -0 src/kjs/nodes2bytecode.h
M +1 -1 src/kjs/object.h
M +1 -1 src/kjs/property_map.h
M +2 -2 src/kjs/propertydescriptor.h
M +1 -1 src/kjs/regexp.h
M +1 -1 src/kjs/regexp_object.h
M +1 -1 src/wtf/HashCountedSet.h
M +1 -1 src/wtf/HashSet.h
M +5 -0 src/wtf/RefPtrHashMap.h
M +1 -1 tests/testkjs.cpp
https://commits.kde.org/kjs/06dce21e2f48399f50c2a5dda33476e4652e8da7
diff --git a/autotests/ecmatest.cpp b/autotests/ecmatest.cpp
index ebb8bd2..e6857b9 100644
--- a/autotests/ecmatest.cpp
+++ b/autotests/ecmatest.cpp
@@ -18,8 +18,8 @@
#include "JSVariableObject.h"
#include "Parser.h"
-#include <QtCore/QMap>
-#include <QtCore/QDebug>
+#include <QMap>
+#include <QDebug>
// Let the interpreter create its own global Object instead of using our selfcreated
#define USE_KJS_GLOBAL 1
diff --git a/autotests/ecmatest.h b/autotests/ecmatest.h
index d0df325..4704963 100644
--- a/autotests/ecmatest.h
+++ b/autotests/ecmatest.h
@@ -12,7 +12,7 @@
#ifndef ECMATEST_H
#define ECMATEST_H
-#include <QtCore/QObject>
+#include <QObject>
class ECMAscriptTest : public QObject
{
diff --git a/src/kjs/JSWrapperObject.h b/src/kjs/JSWrapperObject.h
index 6153e28..17001cd 100644
--- a/src/kjs/JSWrapperObject.h
+++ b/src/kjs/JSWrapperObject.h
@@ -40,7 +40,7 @@ public:
/**
* Returns the internal value of the object. This is used for objects such
- * as String and Boolean which are wrappers for native types. The interal
+ * as String and Boolean which are wrappers for native types. The internal
* value is the actual value represented by the wrapper objects.
*
* @see ECMA 8.6.2
diff --git a/src/kjs/api/kjsprivate.h b/src/kjs/api/kjsprivate.h
index daa4ea9..ff9eaed 100644
--- a/src/kjs/api/kjsprivate.h
+++ b/src/kjs/api/kjsprivate.h
@@ -25,7 +25,7 @@
#include "kjs/ustring.h"
#include "kjs/identifier.h"
#include "kjs/list.h"
-#include <QtCore/QString>
+#include <QString>
#define JSVALUE_HANDLE(v) reinterpret_cast<KJSObjectHandle*>(v)
#define JSVALUE(h) reinterpret_cast<KJS::JSValue*>((h)->hnd)
diff --git a/src/kjs/array_instance.cpp b/src/kjs/array_instance.cpp
index 7cdd5be..a998eac 100644
--- a/src/kjs/array_instance.cpp
+++ b/src/kjs/array_instance.cpp
@@ -585,10 +585,10 @@ void ArrayInstance::putDirect(unsigned i, JSValue *value, int \
attributes) return;
}
- // note: an invariant here is that indeces < sparseArrayCutoff
+ // note: an invariant here is that indices < sparseArrayCutoff
// are always inside the vector portion.
- // lowish indeces or high density -> we have decided that we'll put the new item \
into the vector. + // lowish indices or high density -> we have decided that we'll \
put the new item into the vector.
// Fast case is when there is no sparse map, so we can increase the vector size \
without moving values from the sparse map. if (!map || map->isEmpty()) {
increaseVectorLength(i + 1);
diff --git a/src/kjs/bytecode/generator/codeprinter.cpp \
b/src/kjs/bytecode/generator/codeprinter.cpp index 6d3da91..5fc0108 100644
--- a/src/kjs/bytecode/generator/codeprinter.cpp
+++ b/src/kjs/bytecode/generator/codeprinter.cpp
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/codeprinter.h \
b/src/kjs/bytecode/generator/codeprinter.h index 64ba7bc..42b6df0 100644
--- a/src/kjs/bytecode/generator/codeprinter.h
+++ b/src/kjs/bytecode/generator/codeprinter.h
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/driver.cpp \
b/src/kjs/bytecode/generator/driver.cpp index afaeee6..7bad507 100644
--- a/src/kjs/bytecode/generator/driver.cpp
+++ b/src/kjs/bytecode/generator/driver.cpp
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/filetemplate.h \
b/src/kjs/bytecode/generator/filetemplate.h index fc919a8..c869354 100644
--- a/src/kjs/bytecode/generator/filetemplate.h
+++ b/src/kjs/bytecode/generator/filetemplate.h
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/lexer.cpp \
b/src/kjs/bytecode/generator/lexer.cpp index 7e73aac..30472ef 100644
--- a/src/kjs/bytecode/generator/lexer.cpp
+++ b/src/kjs/bytecode/generator/lexer.cpp
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/lexer.h b/src/kjs/bytecode/generator/lexer.h
index 1d49a94..e134304 100644
--- a/src/kjs/bytecode/generator/lexer.h
+++ b/src/kjs/bytecode/generator/lexer.h
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/parser.cpp \
b/src/kjs/bytecode/generator/parser.cpp index 27eaebf..699f392 100644
--- a/src/kjs/bytecode/generator/parser.cpp
+++ b/src/kjs/bytecode/generator/parser.cpp
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/parser.h \
b/src/kjs/bytecode/generator/parser.h index 4de9978..c3437ab 100644
--- a/src/kjs/bytecode/generator/parser.h
+++ b/src/kjs/bytecode/generator/parser.h
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/tablebuilder.cpp \
b/src/kjs/bytecode/generator/tablebuilder.cpp index e80b8a1..fdf77e9 100644
--- a/src/kjs/bytecode/generator/tablebuilder.cpp
+++ b/src/kjs/bytecode/generator/tablebuilder.cpp
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/tablebuilder.h \
b/src/kjs/bytecode/generator/tablebuilder.h index 3a8a411..fc92619 100644
--- a/src/kjs/bytecode/generator/tablebuilder.h
+++ b/src/kjs/bytecode/generator/tablebuilder.h
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
@@ -93,7 +93,7 @@ private:
StringList operationNames;
unsigned operationFlags;
- map<string, string> operationRetTypes; // uglily enough specified on the impl. I \
suck. + map<string, string> operationRetTypes; // ugly enough specified on the \
impl. I suck. vector<Operation> operations;
map<string, Operation> implementations;
diff --git a/src/kjs/bytecode/generator/types.cpp \
b/src/kjs/bytecode/generator/types.cpp index d3a7ba0..b5fd9c1 100644
--- a/src/kjs/bytecode/generator/types.cpp
+++ b/src/kjs/bytecode/generator/types.cpp
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/bytecode/generator/types.h b/src/kjs/bytecode/generator/types.h
index 5c5fa2d..db785c1 100644
--- a/src/kjs/bytecode/generator/types.h
+++ b/src/kjs/bytecode/generator/types.h
@@ -1,5 +1,5 @@
/*
- * A utilitity for building various tables and specializations for the
+ * A utility for building various tables and specializations for the
* KJS Frostbyte bytecode
*
* Copyright (C) 2007, 2008 Maks Orlovich (maksim@kde.org)
diff --git a/src/kjs/completion.h b/src/kjs/completion.h
index 1ea8ce5..71ffc17 100644
--- a/src/kjs/completion.h
+++ b/src/kjs/completion.h
@@ -29,7 +29,7 @@
namespace KJS
{
-typedef unsigned Addr; // ### should there be some separare types h?
+typedef unsigned Addr; // ### should there be some separate types h?
class Node;
class JSValue;
diff --git a/src/kjs/context.h b/src/kjs/context.h
index 6d7231c..453e434 100644
--- a/src/kjs/context.h
+++ b/src/kjs/context.h
@@ -1 +1,4 @@
+#ifndef CONTEXT_H
+#define CONTEXT_H
#include <ExecState.h>
+#endif
diff --git a/src/kjs/debugger.h b/src/kjs/debugger.h
index 9589028..69ae89b 100644
--- a/src/kjs/debugger.h
+++ b/src/kjs/debugger.h
@@ -195,7 +195,7 @@ public:
JSObject *function, const List &args);
/**
- * Called when the inteprreter exits an execution context. This always
+ * Called when the interpreter exits an execution context. This always
* corresponds to a previous call to enterContext()
*
* The default implementation does nothing. Override this method if
diff --git a/src/kjs/nodes.h b/src/kjs/nodes.h
index 092aada..06581e5 100644
--- a/src/kjs/nodes.h
+++ b/src/kjs/nodes.h
@@ -232,7 +232,7 @@ public:
// w/o generateRefBegin
virtual OpValue generateRefDelete(CompileState *) = 0;
- // For function calls, we also do a specialized lookup, getting both the valie \
and the + // For function calls, we also do a specialized lookup, getting both the \
value and the // scope/this, also making sure it's not an activation.
virtual void generateRefFunc(CompileState *comp, OpValue *funOut, OpValue \
*thisOut) = 0; };
diff --git a/src/kjs/nodes2bytecode.h b/src/kjs/nodes2bytecode.h
index 2377495..b0ee4bd 100644
--- a/src/kjs/nodes2bytecode.h
+++ b/src/kjs/nodes2bytecode.h
@@ -19,6 +19,9 @@
*
*/
+#ifndef NODES2BYTECODE_H
+#define NODES2BYTECODE_H
+
#include "nodes.h"
#include "CompileState.h"
@@ -34,3 +37,4 @@ struct CompileReference {
}
+#endif
diff --git a/src/kjs/object.h b/src/kjs/object.h
index fa3531a..dda6a37 100644
--- a/src/kjs/object.h
+++ b/src/kjs/object.h
@@ -324,7 +324,7 @@ public:
*
* @param exec The current execution state
* @param hint The desired primitive type to convert to
- * @return A primitive value converted from the objetc. Note that the
+ * @return A primitive value converted from the object. Note that the
* type of primitive value returned may not be the same as the requested
* hint.
*/
diff --git a/src/kjs/property_map.h b/src/kjs/property_map.h
index a4b9d82..d3061e8 100644
--- a/src/kjs/property_map.h
+++ b/src/kjs/property_map.h
@@ -135,7 +135,7 @@ public:
// This /computes/ whether the table has getters or setters, while the above is
// used to cache the result. In other words, one usually does
- // setHasGetterSetterProperties(containsGettersOrSetters()) whenver
+ // setHasGetterSetterProperties(containsGettersOrSetters()) whenever
// there is a reason to believe that the result has changed
bool containsGettersOrSetters() const;
private:
diff --git a/src/kjs/propertydescriptor.h b/src/kjs/propertydescriptor.h
index 52d3e44..933fa79 100644
--- a/src/kjs/propertydescriptor.h
+++ b/src/kjs/propertydescriptor.h
@@ -79,14 +79,14 @@ public:
// PropertyDescriptor. New Attributes are set depending if Descriptor has
// enumerable/writeable/configurableSet, if absent default is used.
// NOTE: As interval have enumerable/writable/configurable always set and
- // javascript object dont, the order matters here.
+ // javascript object don't, the order matters here.
// In this case the correct order is: current.attributesWithOverride(new)
// where new is the javascript object that might not have all attributes set.
unsigned int attributesWithOverride(PropertyDescriptor &other) const;
private:
// Check if PropertyDescriptor really is the same. This is private for
- // internal use only, so that it will not easily be confussed with equalTo.
+ // internal use only, so that it will not easily be confused with equalTo.
// This function does compared set Attributes.
bool operator==(PropertyDescriptor &other) const;
diff --git a/src/kjs/regexp.h b/src/kjs/regexp.h
index 5dd4b39..7931f83 100644
--- a/src/kjs/regexp.h
+++ b/src/kjs/regexp.h
@@ -45,7 +45,7 @@ extern "C" { // bug with some libc5 distributions
namespace KJS
{
-// Represents a strign re-encoded to whatever PCRE can handle
+// Represents a string re-encoded to whatever PCRE can handle
class RegExpStringContext
{
public:
diff --git a/src/kjs/regexp_object.h b/src/kjs/regexp_object.h
index 1adf547..547de39 100644
--- a/src/kjs/regexp_object.h
+++ b/src/kjs/regexp_object.h
@@ -100,7 +100,7 @@ public:
virtual bool getOwnPropertySlot(ExecState *, const Identifier &, PropertySlot \
&); JSValue *getValueProperty(ExecState *, int token) const;
- // If resources are exhaused during a match, exec parameter will have an \
exception + // If resources are exhausted during a match, exec parameter will have \
an exception // set, and endOffset will be -1
UString performMatch(RegExp *, ExecState *, const RegExpStringContext &, const \
UString &,
int startOffset = 0, int *endOffset = nullptr, int \
**ovector = nullptr);
diff --git a/src/wtf/HashCountedSet.h b/src/wtf/HashCountedSet.h
index aad4874..b55797c 100644
--- a/src/wtf/HashCountedSet.h
+++ b/src/wtf/HashCountedSet.h
@@ -57,7 +57,7 @@ public:
unsigned count(const ValueType &value) const;
// increases the count if an equal value is already present
- // the return value is a pair of an interator to the new value's location,
+ // the return value is a pair of an iterator to the new value's location,
// and a bool that is true if an new entry was added
std::pair<iterator, bool> add(const ValueType &value);
diff --git a/src/wtf/HashSet.h b/src/wtf/HashSet.h
index 1486147..c83b676 100644
--- a/src/wtf/HashSet.h
+++ b/src/wtf/HashSet.h
@@ -75,7 +75,7 @@ public:
template<typename T, typename HashTranslator> const_iterator find(const T &) \
const;
template<typename T, typename HashTranslator> bool contains(const T &) const;
- // The return value is a pair of an interator to the new value's location,
+ // The return value is a pair of an iterator to the new value's location,
// and a bool that is true if an new entry was added.
pair<iterator, bool> add(const ValueType &);
diff --git a/src/wtf/RefPtrHashMap.h b/src/wtf/RefPtrHashMap.h
index c044efb..8e7ae29 100644
--- a/src/wtf/RefPtrHashMap.h
+++ b/src/wtf/RefPtrHashMap.h
@@ -18,6 +18,9 @@
*
*/
+#ifndef REFPTRHASHMAP_H
+#define REFPTRHASHMAP_H
+
namespace WTF
{
@@ -347,3 +350,5 @@ HashMap<RefPtr<T>, U, V, W, MappedTraits>::take(RawKeyType key)
}
} // namespace WTF
+
+#endif
diff --git a/tests/testkjs.cpp b/tests/testkjs.cpp
index fd7f850..0b40980 100644
--- a/tests/testkjs.cpp
+++ b/tests/testkjs.cpp
@@ -192,7 +192,7 @@ JSValue *TestFunctionImp::callAsFunction(ExecState *exec, \
JSObject *, const List
#if PLATFORM(WIN_OS) && defined(HAVE_CRTDBG_H) && !defined(__MINGW32__)
// Use SEH for Release builds only to get rid of the crash report dialog
-// (luckyly the same tests fail in Release and Debug builds so far). Need to
+// (luckily the same tests fail in Release and Debug builds so far). Need to
// be in a separate main function because the kjsmain function requires object
// unwinding.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic