Modified: trunk/Source/_javascript_Core/b3/B3Opcode.h (194047 => 194048)
--- trunk/Source/_javascript_Core/b3/B3Opcode.h 2015-12-14 19:58:14 UTC (rev 194047)
+++ trunk/Source/_javascript_Core/b3/B3Opcode.h 2015-12-14 20:25:30 UTC (rev 194048)
@@ -174,9 +174,8 @@
// after the first CheckAdd executes, the second CheckAdd could not have possibly taken slow
// path. Therefore, the second CheckAdd's callback is irrelevant.
//
- // Note that the first two children of these operations have ValueRep's, both as input constraints and
- // in the reps provided to the generator. The output constraints could be anything, and should not be
- // inspected for meaning. If you want to capture the values of the inputs, use stackmap arguments.
+ // Note that the first two children of these operations have ValueRep's as input constraints but do
+ // not have output constraints.
CheckAdd,
CheckSub,
CheckMul,
@@ -184,8 +183,8 @@
// Check that side-exits. Use the CheckValue class. Like CheckAdd and friends, this has a
// stackmap with a generation callback. This takes an int argument that this branches on, with
// full branch fusion in the instruction selector. A true value jumps to the generator's slow
- // path. Note that the predicate child is has both an input and output ValueRep. The input constraint
- // must be Any, and the output could be anything.
+ // path. Note that the predicate child is has both an input ValueRep. The input constraint must be
+ // WarmAny. It will not have an output constraint.
Check,
// SSA support, in the style of DFG SSA.
Modified: trunk/Source/_javascript_Core/b3/testb3.cpp (194047 => 194048)
--- trunk/Source/_javascript_Core/b3/testb3.cpp 2015-12-14 19:58:14 UTC (rev 194047)
+++ trunk/Source/_javascript_Core/b3/testb3.cpp 2015-12-14 20:25:30 UTC (rev 194048)
@@ -5597,7 +5597,7 @@
check->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 1);
+ CHECK(!params.size());
// This should always work because a function this simple should never have callee
// saves.
@@ -5629,7 +5629,7 @@
check->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 1);
+ CHECK(!params.size());
// This should always work because a function this simple should never have callee
// saves.
@@ -5675,7 +5675,7 @@
check->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 1);
+ CHECK(!params.size());
// This should always work because a function this simple should never have callee
// saves.
@@ -5872,11 +5872,11 @@
checkAdd->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isConstant());
- CHECK(params[3].value() == 42);
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isConstant());
+ CHECK(params[1].value() == 42);
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
jit.convertInt32ToDouble(CCallHelpers::TrustedImm32(42), FPRInfo::fpRegT1);
jit.addDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
@@ -5908,11 +5908,11 @@
checkAdd->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isConstant());
- CHECK(params[3].value() == 42);
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isConstant());
+ CHECK(params[1].value() == 42);
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
jit.convertInt32ToDouble(CCallHelpers::TrustedImm32(42), FPRInfo::fpRegT1);
jit.addDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
@@ -5944,11 +5944,11 @@
checkAdd->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt32ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt32ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.addDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -5981,11 +5981,11 @@
checkAdd->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt32ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt32ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.addDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6014,11 +6014,11 @@
checkAdd->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt64ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt64ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt64ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt64ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.addDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6088,11 +6088,11 @@
checkSub->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isConstant());
- CHECK(params[3].value() == 42);
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isConstant());
+ CHECK(params[1].value() == 42);
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
jit.convertInt32ToDouble(CCallHelpers::TrustedImm32(42), FPRInfo::fpRegT1);
jit.subDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
@@ -6125,11 +6125,11 @@
checkSub->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isConstant());
- CHECK(params[3].value() == badImm);
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isConstant());
+ CHECK(params[1].value() == badImm);
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
jit.convertInt32ToDouble(CCallHelpers::TrustedImm32(badImm), FPRInfo::fpRegT1);
jit.subDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
@@ -6163,11 +6163,11 @@
checkSub->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt32ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt32ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.subDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6201,11 +6201,11 @@
checkSub->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt64ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt64ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt64ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt64ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.subDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6274,9 +6274,9 @@
checkNeg->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 3);
- CHECK(params[2].isGPR());
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 1);
+ CHECK(params[0].isGPR());
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT1);
jit.negateDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6304,9 +6304,9 @@
checkNeg->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 3);
- CHECK(params[2].isGPR());
- jit.convertInt64ToDouble(params[2].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 1);
+ CHECK(params[0].isGPR());
+ jit.convertInt64ToDouble(params[0].gpr(), FPRInfo::fpRegT1);
jit.negateDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6339,11 +6339,11 @@
checkMul->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt32ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt32ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.mulDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6380,11 +6380,11 @@
checkMul->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt32ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt32ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.mulDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
@@ -6426,11 +6426,11 @@
checkMul->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isConstant());
- CHECK(params[3].value() == 2);
- jit.convertInt32ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isConstant());
+ CHECK(params[1].value() == 2);
+ jit.convertInt32ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
jit.convertInt32ToDouble(CCallHelpers::TrustedImm32(2), FPRInfo::fpRegT1);
jit.mulDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
@@ -6460,11 +6460,11 @@
checkMul->setGenerator(
[&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
AllowMacroScratchRegisterUsage allowScratch(jit);
- CHECK(params.size() == 4);
- CHECK(params[2].isGPR());
- CHECK(params[3].isGPR());
- jit.convertInt64ToDouble(params[2].gpr(), FPRInfo::fpRegT0);
- jit.convertInt64ToDouble(params[3].gpr(), FPRInfo::fpRegT1);
+ CHECK(params.size() == 2);
+ CHECK(params[0].isGPR());
+ CHECK(params[1].isGPR());
+ jit.convertInt64ToDouble(params[0].gpr(), FPRInfo::fpRegT0);
+ jit.convertInt64ToDouble(params[1].gpr(), FPRInfo::fpRegT1);
jit.mulDouble(FPRInfo::fpRegT1, FPRInfo::fpRegT0);
jit.emitFunctionEpilogue();
jit.ret();
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp (194047 => 194048)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp 2015-12-14 19:58:14 UTC (rev 194047)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToLLVM.cpp 2015-12-14 20:25:30 UTC (rev 194048)
@@ -9442,14 +9442,13 @@
{
OSRExitDescriptor* exitDescriptor = appendOSRExitDescriptor(lowValue, highValue);
- unsigned offset = value->numChildren();
value->appendColdAnys(buildExitArguments(exitDescriptor, origin.forExit, lowValue));
State* state = &m_ftlState;
value->setGenerator(
[=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
exitDescriptor->emitOSRExit(
- *state, kind, origin, jit, params, offset, isExceptionHandler);
+ *state, kind, origin, jit, params, 0, isExceptionHandler);
});
}
#endif