mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 889146 (part 15) - Remove jstypedarrayinlines.h. r=sfink.
--HG-- extra : rebase_source : 019bdcc8d44be12a6b6cabb88d87f081ed3fcb71
This commit is contained in:
parent
33a4d394f6
commit
2d82288b3e
@ -18,7 +18,6 @@
|
|||||||
#include "ion/Ion.h"
|
#include "ion/Ion.h"
|
||||||
|
|
||||||
#include "jsfuninlines.h"
|
#include "jsfuninlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::ion;
|
using namespace js::ion;
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "ion/RegisterSets.h"
|
#include "ion/RegisterSets.h"
|
||||||
|
|
||||||
#include "jsscript.h"
|
#include "jsscript.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
|
||||||
#if defined(JS_ION_PERF)
|
#if defined(JS_ION_PERF)
|
||||||
# include "ion/PerfSpewer.h"
|
# include "ion/PerfSpewer.h"
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
|
|
||||||
#include "jscntxt.h"
|
#include "jscntxt.h"
|
||||||
|
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
|
||||||
#include "ion/AsmJS.h"
|
#include "ion/AsmJS.h"
|
||||||
#include "ion/AsmJSModule.h"
|
#include "ion/AsmJSModule.h"
|
||||||
#include "assembler/assembler/MacroAssembler.h"
|
#include "assembler/assembler/MacroAssembler.h"
|
||||||
|
|
||||||
|
#include "gc/Barrier-inl.h"
|
||||||
|
#include "vm/ObjectImpl-inl.h"
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::ion;
|
using namespace js::ion;
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "ion/BaselineIC.h"
|
#include "ion/BaselineIC.h"
|
||||||
#include "ion/BaselineInspector.h"
|
#include "ion/BaselineInspector.h"
|
||||||
|
|
||||||
|
#include "vm/Shape-inl.h"
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::ion;
|
using namespace js::ion;
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "jsanalyzeinlines.h"
|
#include "jsanalyzeinlines.h"
|
||||||
#include "jsscriptinlines.h"
|
#include "jsscriptinlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
|
||||||
#include "ion/CompileInfo-inl.h"
|
#include "ion/CompileInfo-inl.h"
|
||||||
#include "ion/ExecutionModeInlines.h"
|
#include "ion/ExecutionModeInlines.h"
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
#include "jsgcinlines.h"
|
#include "jsgcinlines.h"
|
||||||
#include "jsinferinlines.h"
|
#include "jsinferinlines.h"
|
||||||
|
|
||||||
|
#include "vm/Shape-inl.h"
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::ion;
|
using namespace js::ion;
|
||||||
|
|
||||||
|
@ -17,8 +17,10 @@
|
|||||||
#include "ion/IonSpewer.h"
|
#include "ion/IonSpewer.h"
|
||||||
#include "jsnum.h"
|
#include "jsnum.h"
|
||||||
#include "jsstr.h"
|
#include "jsstr.h"
|
||||||
|
|
||||||
#include "jsatominlines.h"
|
#include "jsatominlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
#include "vm/Shape-inl.h"
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::ion;
|
using namespace js::ion;
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "jslibmath.h"
|
#include "jslibmath.h"
|
||||||
#include "jsinfer.h"
|
#include "jsinfer.h"
|
||||||
#include "jsinferinlines.h"
|
#include "jsinferinlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
#include "ion/TypePolicy.h"
|
#include "ion/TypePolicy.h"
|
||||||
#include "ion/IonAllocPolicy.h"
|
#include "ion/IonAllocPolicy.h"
|
||||||
#include "ion/InlineList.h"
|
#include "ion/InlineList.h"
|
||||||
@ -24,6 +23,7 @@
|
|||||||
#include "ion/Bailouts.h"
|
#include "ion/Bailouts.h"
|
||||||
#include "ion/FixedList.h"
|
#include "ion/FixedList.h"
|
||||||
#include "ion/CompilerRoot.h"
|
#include "ion/CompilerRoot.h"
|
||||||
|
#include "vm/ScopeObject.h"
|
||||||
|
|
||||||
namespace js {
|
namespace js {
|
||||||
namespace ion {
|
namespace ion {
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
#include "jsdate.h"
|
#include "jsdate.h"
|
||||||
#include "jstypedarray.h"
|
#include "jstypedarray.h"
|
||||||
|
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
|
||||||
#include "vm/BooleanObject-inl.h"
|
#include "vm/BooleanObject-inl.h"
|
||||||
#include "vm/RegExpObject-inl.h"
|
#include "vm/RegExpObject-inl.h"
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#include "jsboolinlines.h"
|
#include "jsboolinlines.h"
|
||||||
#include "jscntxtinlines.h"
|
#include "jscntxtinlines.h"
|
||||||
#include "jscompartmentinlines.h"
|
#include "jscompartmentinlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
#include "builtin/Iterator-inl.h"
|
#include "builtin/Iterator-inl.h"
|
||||||
#include "vm/ArrayObject-inl.h"
|
#include "vm/ArrayObject-inl.h"
|
||||||
#include "vm/ArgumentsObject-inl.h"
|
#include "vm/ArgumentsObject-inl.h"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "jsatominlines.h"
|
#include "jsatominlines.h"
|
||||||
#include "jsinferinlines.h"
|
#include "jsinferinlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
#include "jsobjinlines.h"
|
||||||
|
|
||||||
#include "vm/GlobalObject-inl.h"
|
#include "vm/GlobalObject-inl.h"
|
||||||
|
|
||||||
@ -1363,6 +1363,36 @@ template<typename ElementType>
|
|||||||
static inline JSObject *
|
static inline JSObject *
|
||||||
NewArray(JSContext *cx, uint32_t nelements);
|
NewArray(JSContext *cx, uint32_t nelements);
|
||||||
|
|
||||||
|
#ifdef JSGC_GENERATIONAL
|
||||||
|
class ArrayBufferViewByteOffsetRef : public gc::BufferableRef
|
||||||
|
{
|
||||||
|
JSObject *obj;
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit ArrayBufferViewByteOffsetRef(JSObject *obj) : obj(obj) {}
|
||||||
|
|
||||||
|
void mark(JSTracer *trc) {
|
||||||
|
MarkObjectUnbarriered(trc, &obj, "TypedArray");
|
||||||
|
obj->getClass()->trace(trc, obj);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
InitArrayBufferViewDataPointer(JSObject *obj, ArrayBufferObject *buffer, size_t byteOffset)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* N.B. The base of the array's data is stored in the object's
|
||||||
|
* private data rather than a slot to avoid alignment restrictions
|
||||||
|
* on private Values.
|
||||||
|
*/
|
||||||
|
obj->initPrivate(buffer->dataPointer() + byteOffset);
|
||||||
|
#ifdef JSGC_GENERATIONAL
|
||||||
|
if (IsInsideNursery(obj->runtime(), buffer) && buffer->hasFixedElements())
|
||||||
|
obj->runtime()->gcStoreBuffer.putGeneric(ArrayBufferViewByteOffsetRef(obj));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
template<typename NativeType>
|
template<typename NativeType>
|
||||||
class TypedArrayObjectTemplate : public TypedArrayObject
|
class TypedArrayObjectTemplate : public TypedArrayObject
|
||||||
{
|
{
|
||||||
|
@ -579,6 +579,16 @@ class DataViewObject : public ArrayBufferViewObject
|
|||||||
static const JSFunctionSpec jsfuncs[];
|
static const JSFunctionSpec jsfuncs[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline int32_t
|
||||||
|
ClampIntForUint8Array(int32_t x)
|
||||||
|
{
|
||||||
|
if (x < 0)
|
||||||
|
return 0;
|
||||||
|
if (x > 255)
|
||||||
|
return 255;
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace js
|
} // namespace js
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
||||||
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#ifndef jstypedarrayinlines_h
|
|
||||||
#define jstypedarrayinlines_h
|
|
||||||
|
|
||||||
#include "jsapi.h"
|
|
||||||
#include "jsobj.h"
|
|
||||||
#include "jstypedarray.h"
|
|
||||||
|
|
||||||
#include "jscntxtinlines.h"
|
|
||||||
#include "jsobjinlines.h"
|
|
||||||
|
|
||||||
namespace js {
|
|
||||||
|
|
||||||
static inline int32_t
|
|
||||||
ClampIntForUint8Array(int32_t x)
|
|
||||||
{
|
|
||||||
if (x < 0)
|
|
||||||
return 0;
|
|
||||||
if (x > 255)
|
|
||||||
return 255;
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef JSGC_GENERATIONAL
|
|
||||||
class ArrayBufferViewByteOffsetRef : public gc::BufferableRef
|
|
||||||
{
|
|
||||||
JSObject *obj;
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit ArrayBufferViewByteOffsetRef(JSObject *obj) : obj(obj) {}
|
|
||||||
|
|
||||||
void mark(JSTracer *trc) {
|
|
||||||
MarkObjectUnbarriered(trc, &obj, "TypedArray");
|
|
||||||
obj->getClass()->trace(trc, obj);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
InitArrayBufferViewDataPointer(JSObject *obj, ArrayBufferObject *buffer, size_t byteOffset)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* N.B. The base of the array's data is stored in the object's
|
|
||||||
* private data rather than a slot to avoid alignment restrictions
|
|
||||||
* on private Values.
|
|
||||||
*/
|
|
||||||
obj->initPrivate(buffer->dataPointer() + byteOffset);
|
|
||||||
#ifdef JSGC_GENERATIONAL
|
|
||||||
if (IsInsideNursery(obj->runtime(), buffer) && buffer->hasFixedElements())
|
|
||||||
obj->runtime()->gcStoreBuffer.putGeneric(ArrayBufferViewByteOffsetRef(obj));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
} /* namespace js */
|
|
||||||
|
|
||||||
#endif /* jstypedarrayinlines_h */
|
|
@ -36,7 +36,6 @@
|
|||||||
#include "jsreflect.h"
|
#include "jsreflect.h"
|
||||||
#include "jsscript.h"
|
#include "jsscript.h"
|
||||||
#include "jstypedarray.h"
|
#include "jstypedarray.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
#include "jsworkers.h"
|
#include "jsworkers.h"
|
||||||
#include "jswrapper.h"
|
#include "jswrapper.h"
|
||||||
#include "perf/jsperf.h"
|
#include "perf/jsperf.h"
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "jsfuninlines.h"
|
#include "jsfuninlines.h"
|
||||||
#include "jsinferinlines.h"
|
#include "jsinferinlines.h"
|
||||||
#include "jsopcodeinlines.h"
|
#include "jsopcodeinlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
#include "vm/GlobalObject-inl.h"
|
#include "vm/GlobalObject-inl.h"
|
||||||
#include "vm/Stack-inl.h"
|
#include "vm/Stack-inl.h"
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "vm/Interpreter.h"
|
#include "vm/Interpreter.h"
|
||||||
|
|
||||||
#include "jsfuninlines.h"
|
#include "jsfuninlines.h"
|
||||||
#include "jstypedarrayinlines.h"
|
|
||||||
|
|
||||||
#include "vm/BooleanObject-inl.h"
|
#include "vm/BooleanObject-inl.h"
|
||||||
#include "vm/NumberObject-inl.h"
|
#include "vm/NumberObject-inl.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user