mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-19 15:51:33 +00:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
6e559c01ba
@ -2254,10 +2254,7 @@ case "$target" in
|
||||
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
MOZ_OPTIMIZE_FLAGS="-O3"
|
||||
_PEDANTIC=
|
||||
# Due to performance regressions, statically disable jemalloc on 10.5. See bug 414946.
|
||||
if test "$HAVE_64BIT_OS"; then
|
||||
MOZ_MEMORY=1
|
||||
fi
|
||||
MOZ_MEMORY=1
|
||||
CFLAGS="$CFLAGS -fno-common"
|
||||
CXXFLAGS="$CXXFLAGS -fno-common"
|
||||
DLL_SUFFIX=".dylib"
|
||||
|
@ -811,19 +811,32 @@ WebGLContext::GetThebesSurface(gfxASurface **surface)
|
||||
|
||||
static PRUint8 gWebGLLayerUserData;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WebGLContextUserData : public LayerUserData {
|
||||
public:
|
||||
WebGLContextUserData(nsHTMLCanvasElement *aContent)
|
||||
: mContent(aContent) {}
|
||||
|
||||
/** DidTransactionCallback gets called by the Layers code everytime the WebGL canvas gets composite,
|
||||
* so it really is the right place to put actions that have to be performed upon compositing
|
||||
*/
|
||||
static void DidTransactionCallback(void* aData)
|
||||
{
|
||||
static_cast<WebGLContextUserData*>(aData)->mContent->MarkContextClean();
|
||||
WebGLContextUserData *userdata = static_cast<WebGLContextUserData*>(aData);
|
||||
nsHTMLCanvasElement *canvas = userdata->mContent;
|
||||
WebGLContext *context = static_cast<WebGLContext*>(canvas->GetContextAtIndex(0));
|
||||
|
||||
context->mBackbufferClearingStatus = BackbufferClearingStatus::NotClearedSinceLastPresented;
|
||||
canvas->MarkContextClean();
|
||||
}
|
||||
|
||||
private:
|
||||
nsRefPtr<nsHTMLCanvasElement> mContent;
|
||||
};
|
||||
|
||||
} // end namespace mozilla
|
||||
|
||||
already_AddRefed<layers::CanvasLayer>
|
||||
WebGLContext::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
CanvasLayer *aOldLayer,
|
||||
@ -887,8 +900,6 @@ WebGLContext::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
mResetLayer = false;
|
||||
|
||||
mBackbufferClearingStatus = BackbufferClearingStatus::NotClearedSinceLastPresented;
|
||||
|
||||
return canvasLayer.forget().get();
|
||||
}
|
||||
|
||||
|
@ -344,6 +344,7 @@ class WebGLContext :
|
||||
{
|
||||
friend class WebGLMemoryReporter;
|
||||
friend class WebGLExtensionLoseContext;
|
||||
friend class WebGLContextUserData;
|
||||
|
||||
public:
|
||||
WebGLContext();
|
||||
|
@ -1,4 +1,3 @@
|
||||
conformance/canvas/buffer-preserve-test.html
|
||||
conformance/context/context-attributes-alpha-depth-stencil-antialias.html
|
||||
conformance/context/premultiplyalpha-test.html
|
||||
conformance/glsl/misc/glsl-function-nodes.html
|
||||
|
@ -1,4 +1,3 @@
|
||||
conformance/canvas/buffer-preserve-test.html
|
||||
conformance/context/premultiplyalpha-test.html
|
||||
conformance/glsl/functions/glsl-function-atan.html
|
||||
conformance/glsl/functions/glsl-function-atan-xy.html
|
||||
|
@ -645,6 +645,7 @@ LayerManagerOGL::FPSState::DrawFPS(GLContext* context, CopyProgram* copyprog)
|
||||
context->fEnable(LOCAL_GL_BLEND);
|
||||
context->fBlendFunc(LOCAL_GL_ONE, LOCAL_GL_SRC_COLOR);
|
||||
|
||||
context->fActiveTexture(LOCAL_GL_TEXTURE0);
|
||||
context->fBindTexture(LOCAL_GL_TEXTURE_2D, texture);
|
||||
|
||||
copyprog->Activate();
|
||||
|
@ -190,7 +190,7 @@ _callHook(JSDContext *jsdc, JSContext *cx, JSStackFrame *fp, JSBool before,
|
||||
jsdouble delta;
|
||||
now = JS_Now();
|
||||
ll_delta = now - pdata->lastCallStart;
|
||||
delta = (JSFloat64) ll_delta;
|
||||
delta = ll_delta;
|
||||
delta /= 1000.0;
|
||||
pdata->totalExecutionTime += delta;
|
||||
/* minExecutionTime starts as 0, so we need to overwrite
|
||||
@ -214,7 +214,7 @@ _callHook(JSDContext *jsdc, JSContext *cx, JSStackFrame *fp, JSBool before,
|
||||
* running time as 'delta'. */
|
||||
ll_delta = now - jsdc->lastReturnTime;
|
||||
pdata->runningTime += ll_delta;
|
||||
delta = (JSFloat64) pdata->runningTime;
|
||||
delta = pdata->runningTime;
|
||||
delta /= 1000.0;
|
||||
}
|
||||
|
||||
|
8
js/src/jit-test/tests/jaeger/fromCharCode.js
Normal file
8
js/src/jit-test/tests/jaeger/fromCharCode.js
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/licenses/publicdomain/
|
||||
*/
|
||||
|
||||
for (var i = 0; i <= 0xFFFF; i++) {
|
||||
assertEq(String.fromCharCode(i).charCodeAt(0), i);
|
||||
}
|
@ -50,5 +50,4 @@ typedef JSIntn intN;
|
||||
typedef JSUintn uintN;
|
||||
typedef JSUword jsuword;
|
||||
typedef JSWord jsword;
|
||||
typedef float float32;
|
||||
#endif /* jscompat_h___ */
|
||||
|
@ -93,6 +93,4 @@ typedef JSInt16 int16;
|
||||
typedef JSInt8 int8;
|
||||
#endif /* AIX && HAVE_SYS_INTTYPES_H */
|
||||
|
||||
typedef JSFloat64 float64;
|
||||
|
||||
#endif /* !defined(PROTYPES_H) */
|
||||
|
@ -96,7 +96,7 @@ JS_BEGIN_EXTERN_C
|
||||
/* Scalar typedefs. */
|
||||
typedef JSInt32 jsint;
|
||||
typedef JSUint32 jsuint;
|
||||
typedef float64 jsdouble;
|
||||
typedef double jsdouble;
|
||||
typedef JSInt32 jsrefcount; /* PRInt32 if JS_THREADSAFE, see jslock.h */
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -2938,8 +2938,8 @@ js_String(JSContext *cx, uintN argc, Value *vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
static JSBool
|
||||
str_fromCharCode(JSContext *cx, uintN argc, Value *vp)
|
||||
JSBool
|
||||
js::str_fromCharCode(JSContext *cx, uintN argc, Value *vp)
|
||||
{
|
||||
Value *argv = JS_ARGV(cx, vp);
|
||||
JS_ASSERT(argc <= StackSpace::ARGS_LENGTH_MAX);
|
||||
@ -2974,6 +2974,7 @@ str_fromCharCode(JSContext *cx, uintN argc, Value *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
||||
#ifdef JS_TRACER
|
||||
static JSString* FASTCALL
|
||||
String_fromCharCode(JSContext* cx, int32 i)
|
||||
@ -2990,7 +2991,7 @@ JS_DEFINE_TRCINFO_1(str_fromCharCode,
|
||||
(2, (static, STRING_RETRY, String_fromCharCode, CONTEXT, INT32, 1, nanojit::ACCSET_NONE)))
|
||||
|
||||
static JSFunctionSpec string_static_methods[] = {
|
||||
JS_TN("fromCharCode", str_fromCharCode, 1, 0, &str_fromCharCode_trcinfo),
|
||||
JS_TN("fromCharCode", js::str_fromCharCode, 1, 0, &str_fromCharCode_trcinfo),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
|
@ -204,7 +204,7 @@ CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32 *result);
|
||||
extern bool
|
||||
StringEqualsAscii(JSLinearString *str, const char *asciiBytes);
|
||||
|
||||
} /* namespacejs */
|
||||
} /* namespace js */
|
||||
|
||||
extern size_t
|
||||
js_strlen(const jschar *s);
|
||||
@ -275,16 +275,17 @@ DeflateStringToUTF8Buffer(JSContext *cx, const jschar *chars,
|
||||
size_t charsLength, char *bytes, size_t *length,
|
||||
FlationCoding fc = NormalEncoding);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
/*
|
||||
* The String.prototype.replace fast-native entry point is exported for joined
|
||||
* function optimization in js{interp,tracer}.cpp.
|
||||
*/
|
||||
namespace js {
|
||||
extern JSBool
|
||||
str_replace(JSContext *cx, uintN argc, js::Value *vp);
|
||||
}
|
||||
|
||||
extern JSBool
|
||||
str_fromCharCode(JSContext *cx, uintN argc, Value *vp);
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
extern JSBool
|
||||
js_str_toString(JSContext *cx, uintN argc, js::Value *vp);
|
||||
|
@ -340,13 +340,6 @@ JS_BEGIN_EXTERN_C
|
||||
typedef int JSIntn;
|
||||
typedef unsigned int JSUintn;
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: JSFloat64
|
||||
** DESCRIPTION:
|
||||
** NSPR's floating point type is always 64 bits.
|
||||
************************************************************************/
|
||||
typedef double JSFloat64;
|
||||
|
||||
/************************************************************************
|
||||
** TYPES: JSSize
|
||||
** DESCRIPTION:
|
||||
|
@ -776,6 +776,8 @@ private:
|
||||
|
||||
enum GetCharMode { GetChar, GetCharCode };
|
||||
CompileStatus compileGetChar(FrameEntry *thisValue, FrameEntry *arg, GetCharMode mode);
|
||||
|
||||
CompileStatus compileStringFromCode(FrameEntry *arg);
|
||||
|
||||
void prepareStubCall(Uses uses);
|
||||
Call emitStubCall(void *ptr, DataLabelPtr *pinline);
|
||||
|
@ -408,6 +408,39 @@ mjit::Compiler::compileGetChar(FrameEntry *thisValue, FrameEntry *arg, GetCharMo
|
||||
return Compile_Okay;
|
||||
}
|
||||
|
||||
CompileStatus
|
||||
mjit::Compiler::compileStringFromCode(FrameEntry *arg)
|
||||
{
|
||||
/* Load Char-Code into argReg */
|
||||
RegisterID argReg;
|
||||
if (arg->isConstant()) {
|
||||
argReg = frame.allocReg();
|
||||
masm.move(Imm32(arg->getValue().toInt32()), argReg);
|
||||
} else {
|
||||
argReg = frame.copyDataIntoReg(arg);
|
||||
}
|
||||
|
||||
/* Slow path if there's no unit string for this character. */
|
||||
Jump notUnitString = masm.branch32(Assembler::AboveOrEqual, argReg,
|
||||
Imm32(StaticStrings::UNIT_STATIC_LIMIT));
|
||||
stubcc.linkExit(notUnitString, Uses(3));
|
||||
|
||||
/* Load unit string in reg. */
|
||||
masm.lshiftPtr(Imm32(sizeof(JSAtom *) == 4 ? 2 : 3), argReg);
|
||||
masm.addPtr(ImmPtr(&cx->runtime->staticStrings.unitStaticTable), argReg);
|
||||
masm.loadPtr(Address(argReg), argReg);
|
||||
|
||||
stubcc.leave();
|
||||
stubcc.masm.move(Imm32(1), Registers::ArgReg1);
|
||||
OOL_STUBCALL(stubs::SlowCall, REJOIN_FALLTHROUGH);
|
||||
|
||||
frame.popn(3);
|
||||
frame.pushTypedPayload(JSVAL_TYPE_STRING, argReg);
|
||||
|
||||
stubcc.rejoin(Changes(1));
|
||||
return Compile_Okay;
|
||||
}
|
||||
|
||||
CompileStatus
|
||||
mjit::Compiler::compileArrayPush(FrameEntry *thisValue, FrameEntry *arg)
|
||||
{
|
||||
@ -872,6 +905,10 @@ mjit::Compiler::inlineNativeFunction(uint32 argc, bool callingNew)
|
||||
thisType == JSVAL_TYPE_STRING && type == JSVAL_TYPE_STRING) {
|
||||
return compileGetChar(thisValue, arg, GetChar);
|
||||
}
|
||||
if (native == js::str_fromCharCode && argType == JSVAL_TYPE_INT32 &&
|
||||
type == JSVAL_TYPE_STRING) {
|
||||
return compileStringFromCode(arg);
|
||||
}
|
||||
if (native == js::array_push &&
|
||||
thisType == JSVAL_TYPE_OBJECT && type == JSVAL_TYPE_INT32) {
|
||||
/*
|
||||
|
@ -5942,7 +5942,8 @@ MALLOC_OUT:
|
||||
* - With the 10.7 SDK, jemalloc causes the browser to hang (bug 670175).
|
||||
*/
|
||||
|
||||
osx_use_jemalloc = (default_zone->version == SNOW_LEOPARD_MALLOC_ZONE_T_VERSION);
|
||||
osx_use_jemalloc = (default_zone->version == LEOPARD_MALLOC_ZONE_T_VERSION ||
|
||||
default_zone->version == SNOW_LEOPARD_MALLOC_ZONE_T_VERSION);
|
||||
|
||||
/* Allow us dynamically turn off jemalloc for testing. */
|
||||
if (getenv("NO_MAC_JEMALLOC"))
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource1.h"
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -29,7 +29,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource1.h\0"
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
|
@ -1059,7 +1059,7 @@ if [ "$MOZ_JPROF" ]; then
|
||||
"
|
||||
fi
|
||||
|
||||
add_makefile "
|
||||
add_makefiles "
|
||||
tools/profiler/Makefile
|
||||
"
|
||||
|
||||
|
@ -55,7 +55,7 @@ interface nsIErrorService : nsISupports
|
||||
void registerErrorStringBundle(in short errorModule, in string stringBundleURL);
|
||||
|
||||
/**
|
||||
* Registers a string bundle URL for an error module.
|
||||
* Unregisters a string bundle URL for an error module.
|
||||
*/
|
||||
void unregisterErrorStringBundle(in short errorModule);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user