|
Lines 744-749
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec1
|
| 744 |
case IsObject: |
744 |
case IsObject: |
| 745 |
compileIsObject(); |
745 |
compileIsObject(); |
| 746 |
break; |
746 |
break; |
|
|
747 |
case IsObjectOrNull: |
| 748 |
compileIsObjectOrNull(); |
| 749 |
break; |
| 747 |
case IsFunction: |
750 |
case IsFunction: |
| 748 |
compileIsFunction(); |
751 |
compileIsFunction(); |
| 749 |
break; |
752 |
break; |
|
Lines 3060-3068
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec2
|
| 3060 |
ValueFromBlock simpleResult = m_out.anchor(value); |
3063 |
ValueFromBlock simpleResult = m_out.anchor(value); |
| 3061 |
LValue isStringPredicate; |
3064 |
LValue isStringPredicate; |
| 3062 |
if (m_node->child1()->prediction() & SpecString) { |
3065 |
if (m_node->child1()->prediction() & SpecString) { |
| 3063 |
isStringPredicate = m_out.equal( |
3066 |
isStringPredicate = isString(value); |
| 3064 |
m_out.load32(value, m_heaps.JSCell_structureID), |
|
|
| 3065 |
m_out.constInt32(vm().stringStructure->id())); |
| 3066 |
} else |
3067 |
} else |
| 3067 |
isStringPredicate = m_out.booleanFalse; |
3068 |
isStringPredicate = m_out.booleanFalse; |
| 3068 |
m_out.branch(isStringPredicate, unsure(continuation), unsure(notString)); |
3069 |
m_out.branch(isStringPredicate, unsure(continuation), unsure(notString)); |
|
Lines 4087-4097
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec3
|
| 4087 |
m_out.appendTo(continuation, lastNext); |
4088 |
m_out.appendTo(continuation, lastNext); |
| 4088 |
setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult)); |
4089 |
setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult)); |
| 4089 |
} |
4090 |
} |
| 4090 |
|
4091 |
|
| 4091 |
void compileIsObject() |
4092 |
void compileIsObject() |
| 4092 |
{ |
4093 |
{ |
|
|
4094 |
LValue value = lowJSValue(m_node->child1()); |
| 4095 |
|
| 4096 |
LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsObject cell case")); |
| 4097 |
LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObject continuation")); |
| 4098 |
|
| 4099 |
ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse); |
| 4100 |
m_out.branch(isCell(value), unsure(isCellCase), unsure(continuation)); |
| 4101 |
|
| 4102 |
LBasicBlock lastNext = m_out.appendTo(isCellCase, continuation); |
| 4103 |
ValueFromBlock cellResult = m_out.anchor(isObject(value)); |
| 4104 |
m_out.jump(continuation); |
| 4105 |
|
| 4106 |
m_out.appendTo(continuation, lastNext); |
| 4107 |
setBoolean(m_out.phi(m_out.boolean, notCellResult, cellResult)); |
| 4108 |
} |
| 4109 |
|
| 4110 |
void compileIsObjectOrNull() |
| 4111 |
{ |
| 4093 |
LValue pointerResult = vmCall( |
4112 |
LValue pointerResult = vmCall( |
| 4094 |
m_out.operation(operationIsObject), m_callFrame, lowJSValue(m_node->child1())); |
4113 |
m_out.operation(operationIsObjectOrNull), m_callFrame, lowJSValue(m_node->child1())); |
| 4095 |
setBoolean(m_out.notNull(pointerResult)); |
4114 |
setBoolean(m_out.notNull(pointerResult)); |
| 4096 |
} |
4115 |
} |
| 4097 |
|
4116 |
|
|
Lines 5013-5022
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec4
|
| 5013 |
return; |
5032 |
return; |
| 5014 |
} |
5033 |
} |
| 5015 |
|
5034 |
|
| 5016 |
LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID); |
5035 |
FTL_TYPE_CHECK(jsValueValue(cell), edge, filter, isNotObject(cell)); |
| 5017 |
FTL_TYPE_CHECK( |
|
|
| 5018 |
jsValueValue(cell), edge, filter, |
| 5019 |
m_out.equal(structureID, m_out.constInt32(vm().stringStructure->id()))); |
| 5020 |
speculate( |
5036 |
speculate( |
| 5021 |
BadType, jsValueValue(cell), edge.node(), |
5037 |
BadType, jsValueValue(cell), edge.node(), |
| 5022 |
m_out.testNonZero8( |
5038 |
m_out.testNonZero8( |
|
Lines 5326-5335
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec5
|
| 5326 |
break; |
5342 |
break; |
| 5327 |
case CellCaseSpeculatesObject: |
5343 |
case CellCaseSpeculatesObject: |
| 5328 |
FTL_TYPE_CHECK( |
5344 |
FTL_TYPE_CHECK( |
| 5329 |
jsValueValue(value), edge, (~SpecCell) | SpecObject, |
5345 |
jsValueValue(value), edge, (~SpecCell) | SpecObject, isNotObject(value)); |
| 5330 |
m_out.equal( |
|
|
| 5331 |
m_out.load32(value, m_heaps.JSCell_structureID), |
| 5332 |
m_out.constInt32(vm().stringStructure->id()))); |
| 5333 |
break; |
5346 |
break; |
| 5334 |
} |
5347 |
} |
| 5335 |
|
5348 |
|
|
Lines 6156-6169
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec6
|
| 6156 |
|
6169 |
|
| 6157 |
LValue isObject(LValue cell) |
6170 |
LValue isObject(LValue cell) |
| 6158 |
{ |
6171 |
{ |
| 6159 |
return m_out.notEqual( |
6172 |
return m_out.aboveOrEqual( |
| 6160 |
m_out.load32(cell, m_heaps.JSCell_structureID), |
6173 |
m_out.load8(cell, m_heaps.JSCell_typeInfoType), |
| 6161 |
m_out.constInt32(vm().stringStructure->id())); |
6174 |
m_out.constInt8(ObjectType)); |
| 6162 |
} |
6175 |
} |
| 6163 |
|
6176 |
|
|
|
6177 |
LValue isNotObject(LValue cell) |
| 6178 |
{ |
| 6179 |
return m_out.below( |
| 6180 |
m_out.load8(cell, m_heaps.JSCell_typeInfoType), |
| 6181 |
m_out.constInt8(ObjectType)); |
| 6182 |
} |
| 6183 |
|
| 6164 |
LValue isNotString(LValue cell) |
6184 |
LValue isNotString(LValue cell) |
| 6165 |
{ |
6185 |
{ |
| 6166 |
return isObject(cell); |
6186 |
return m_out.notEqual( |
|
|
6187 |
m_out.load32(cell, m_heaps.JSCell_structureID), |
| 6188 |
m_out.constInt32(vm().stringStructure->id())); |
| 6167 |
} |
6189 |
} |
| 6168 |
|
6190 |
|
| 6169 |
LValue isString(LValue cell) |
6191 |
LValue isString(LValue cell) |
|
Lines 6173-6183
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec7
|
| 6173 |
m_out.constInt32(vm().stringStructure->id())); |
6195 |
m_out.constInt32(vm().stringStructure->id())); |
| 6174 |
} |
6196 |
} |
| 6175 |
|
6197 |
|
| 6176 |
LValue isNotObject(LValue cell) |
|
|
| 6177 |
{ |
| 6178 |
return isString(cell); |
| 6179 |
} |
| 6180 |
|
| 6181 |
LValue isArrayType(LValue cell, ArrayMode arrayMode) |
6198 |
LValue isArrayType(LValue cell, ArrayMode arrayMode) |
| 6182 |
{ |
6199 |
{ |
| 6183 |
switch (arrayMode.type()) { |
6200 |
switch (arrayMode.type()) { |
|
Lines 6375-6385
class LowerDFGToLLVM {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp_sec8
|
| 6375 |
|
6392 |
|
| 6376 |
void speculateNonNullObject(Edge edge, LValue cell) |
6393 |
void speculateNonNullObject(Edge edge, LValue cell) |
| 6377 |
{ |
6394 |
{ |
| 6378 |
FTL_TYPE_CHECK( |
6395 |
FTL_TYPE_CHECK(jsValueValue(cell), edge, SpecObject, isNotObject(cell)); |
| 6379 |
jsValueValue(cell), edge, SpecObject, |
|
|
| 6380 |
m_out.equal( |
| 6381 |
m_out.load32(cell, m_heaps.JSCell_structureID), |
| 6382 |
m_out.constInt32(vm().stringStructure->id()))); |
| 6383 |
if (masqueradesAsUndefinedWatchpointIsStillValid()) |
6396 |
if (masqueradesAsUndefinedWatchpointIsStillValid()) |
| 6384 |
return; |
6397 |
return; |
| 6385 |
|
6398 |
|