Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 627410 Details for
Bug 757676
[patch]
JaegerMonkey support
defaults-jit.patch (text/plain), 2.38 KB, created by
:Benjamin Peterson
(
hide
)
Description:
JaegerMonkey support
Filename:
MIME Type:
Creator:
:Benjamin Peterson
Size:
2.38 KB
patch
obsolete
># HG changeset patch ># Parent a66eadc92f84538e3c76480b16625c7db3574002 ># User Benjamin Peterson <benjamin@python.org> >Bug 757676: implement default parameters in JaegerMonkey > >diff --git a/js/src/jsanalyze.cpp b/js/src/jsanalyze.cpp >--- a/js/src/jsanalyze.cpp >+++ b/js/src/jsanalyze.cpp >@@ -584,16 +584,17 @@ ScriptAnalysis::analyzeBytecode(JSContex > case JSOP_OBJECT: > case JSOP_UINT24: > case JSOP_GETXPROP: > case JSOP_INT8: > case JSOP_INT32: > case JSOP_HOLE: > case JSOP_LOOPHEAD: > case JSOP_LOOPENTRY: >+ case JSOP_ACTUALSFILLED: > break; > > default: > if (!(js_CodeSpec[op].format & JOF_DECOMPOSE)) > isJaegerCompileable = isInlineable = false; > break; > } > >diff --git a/js/src/methodjit/Compiler.cpp b/js/src/methodjit/Compiler.cpp >--- a/js/src/methodjit/Compiler.cpp >+++ b/js/src/methodjit/Compiler.cpp >@@ -2241,16 +2241,35 @@ mjit::Compiler::generateMethod() > if (script->needsArgsObj()) { > prepareStubCall(Uses(0)); > INLINE_STUBCALL(stubs::Arguments, REJOIN_FALLTHROUGH); > pushSyncedEntry(0); > } else { > frame.push(MagicValue(JS_OPTIMIZED_ARGUMENTS)); > } > END_CASE(JSOP_ARGUMENTS) >+ BEGIN_CASE(JSOP_ACTUALSFILLED) >+ { >+ >+ // We never inline things with defaults because of the switch. >+ JS_ASSERT(!inlining()); >+ RegisterID value = frame.allocReg(), nactual = frame.allocReg(); >+ int32_t defstart = GET_UINT16(PC); >+ masm.move(Imm32(defstart), value); >+ masm.load32(Address(JSFrameReg, StackFrame::offsetOfNumActual()), nactual); >+ >+ // Best would be a single instruction where available (like >+ // cmovge on x86), but there's no way get that yet, so jump. >+ Jump j = masm.branchPtr(Assembler::LessThan, nactual, Imm32(defstart)); >+ masm.move(nactual, value); >+ j.linkTo(masm.label(), &masm); >+ frame.freeReg(nactual); >+ frame.pushInt32(value); >+ } >+ END_CASE(JSOP_ACTUALSFILLED) > > BEGIN_CASE(JSOP_ITERNEXT) > iterNext(GET_INT8(PC)); > END_CASE(JSOP_ITERNEXT) > > BEGIN_CASE(JSOP_DUP) > frame.dup(); > END_CASE(JSOP_DUP)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
bhackett1024
: review+
Actions:
View
|
Diff
|
Review
Attachments on
bug 757676
:
626599
|
626959
|
627405
|
627410
|
628553