Bug 1447442 - Part 1: Remove unused functions and definitions. r=jorendorff

--HG--
extra : rebase_source : 26b98365cf5f4db44a086869163f8ae10fbd5074
This commit is contained in:
André Bargull 2018-04-13 02:25:58 -07:00
Родитель 88aaa7b61f
Коммит 20a88ae9d0
8 изменённых файлов: 4 добавлений и 46 удалений

Просмотреть файл

@ -26,10 +26,9 @@ enum PromiseSlots {
#define PROMISE_FLAG_RESOLVED 0x1
#define PROMISE_FLAG_FULFILLED 0x2
#define PROMISE_FLAG_HANDLED 0x4
#define PROMISE_FLAG_REPORTED 0x8
#define PROMISE_FLAG_DEFAULT_RESOLVE_FUNCTION 0x10
#define PROMISE_FLAG_DEFAULT_REJECT_FUNCTION 0x20
#define PROMISE_FLAG_ASYNC 0x40
#define PROMISE_FLAG_DEFAULT_RESOLVE_FUNCTION 0x08
#define PROMISE_FLAG_DEFAULT_REJECT_FUNCTION 0x10
#define PROMISE_FLAG_ASYNC 0x20
class AutoSetNewObjectMetadata;
@ -88,11 +87,6 @@ class PromiseObject : public NativeObject
MOZ_ASSERT(state() == JS::PromiseState::Rejected);
return !(getFixedSlot(PromiseSlot_Flags).toInt32() & PROMISE_FLAG_HANDLED);
}
void markAsReported() {
MOZ_ASSERT(isUnhandled());
int32_t flags = getFixedSlot(PromiseSlot_Flags).toInt32();
setFixedSlot(PromiseSlot_Flags, Int32Value(flags | PROMISE_FLAG_REPORTED));
}
};
/**

Просмотреть файл

@ -715,14 +715,6 @@ class FullParseHandler
return newBinary(ParseNodeKind::Colon, key, fn, AccessorTypeToJSOp(atype));
}
bool setComprehensionLambdaBody(ParseNode* pn, ParseNode* body) {
MOZ_ASSERT(body->isKind(ParseNodeKind::StatementList));
ParseNode* paramsBody = newList(ParseNodeKind::ParamsBody, body);
if (!paramsBody)
return false;
setFunctionFormalParametersAndBody(pn, paramsBody);
return true;
}
void setFunctionFormalParametersAndBody(ParseNode* funcNode, ParseNode* kid) {
MOZ_ASSERT_IF(kid, kid->isKind(ParseNodeKind::ParamsBody));
funcNode->pn_body = kid;

Просмотреть файл

@ -12069,9 +12069,6 @@ CodeGenerator::emitInstanceOf(LInstruction* ins, JSObject* prototypeObject)
masm.bind(ool->rejoin());
}
typedef bool (*HasInstanceFn)(JSContext*, HandleObject, HandleValue, bool*);
static const VMFunction HasInstanceInfo = FunctionInfo<HasInstanceFn>(js::HasInstance, "HasInstance");
void
CodeGenerator::visitInstanceOfCache(LInstanceOfCache* ins)
{

Просмотреть файл

@ -222,21 +222,6 @@ class GlobalObject : public NativeObject
return !value.isUndefined();
}
/*
* Using a Handle<GlobalObject*> as a Handle<Object*> is always safe as
* GlobalObject derives JSObject. However, with C++'s semantics, Handle<T>
* is not related to Handle<S>, independent of how S and T are related.
* Further, Handle stores an indirect pointer and, again because of C++'s
* semantics, T** is not related to S**, independent of how S and T are
* related. Since we know that this specific case is safe, we provide a
* manual upcast operation here to do the reinterpret_cast in a known-safe
* manner.
*/
static HandleObject upcast(Handle<GlobalObject*> global) {
return HandleObject::fromMarkedLocation(
reinterpret_cast<JSObject * const*>(global.address()));
}
private:
bool arrayClassInitialized() const {
return classIsInitialized(JSProto_Array);

Просмотреть файл

@ -134,7 +134,6 @@ FOR_EACH_COMMON_PROPERTYNAME(CONST_CHAR_STR)
/* Constant strings that are not atomized. */
const char js_getter_str[] = "getter";
const char js_send_str[] = "send";
const char js_setter_str[] = "setter";
// Use a low initial capacity for atom hash tables to avoid penalizing runtimes

Просмотреть файл

@ -39,7 +39,6 @@ FOR_EACH_COMMON_PROPERTYNAME(DECLARE_CONST_CHAR_STR)
/* Constant strings that are not atomized. */
extern const char js_getter_str[];
extern const char js_send_str[];
extern const char js_setter_str[];
namespace js {

Просмотреть файл

@ -188,7 +188,6 @@ class JSObject : public js::gc::Cell
}
inline bool isBoundFunction() const;
inline bool hasSpecialEquality() const;
// A "qualified" varobj is the object on which "qualified" variable
// declarations (i.e., those defined with "var") are kept.

Просмотреть файл

@ -35,14 +35,8 @@ struct MatchPair
{ }
size_t length() const { MOZ_ASSERT(!isUndefined()); return limit - start; }
bool isEmpty() const { return length() == 0; }
bool isUndefined() const { return start < 0; }
void displace(size_t amount) {
start += (start < 0) ? 0 : amount;
limit += (limit < 0) ? 0 : amount;
}
inline bool check() const {
MOZ_ASSERT(limit >= start);
MOZ_ASSERT_IF(start < 0, start == -1);
@ -63,7 +57,7 @@ class MatchPairs
MatchPair* pairs_;
protected:
/* Not used directly: use ScopedMatchPairs or VectorMatchPairs. */
/* Not used directly: use VectorMatchPairs. */
MatchPairs()
: pairCount_(0), pairs_(nullptr)
{ }
@ -91,7 +85,6 @@ class MatchPairs
/* Querying functions in the style of RegExpStatics. */
bool empty() const { return pairCount_ == 0; }
size_t pairCount() const { MOZ_ASSERT(pairCount_ > 0); return pairCount_; }
size_t parenCount() const { return pairCount_ - 1; }
static size_t offsetOfPairs() { return offsetof(MatchPairs, pairs_); }
static size_t offsetOfPairCount() { return offsetof(MatchPairs, pairCount_); }