| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e239045 commit e5cce7a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1409,8 +1409,12 @@ void InstanceOfStub::Generate(MacroAssembler* masm) { | |||
| 1409 | 1409 | __ CompareObjectType(function, function_map, scratch, JS_FUNCTION_TYPE); | |
| 1410 | 1410 | __ bne(&slow_case); | |
| 1411 | 1411 | ||
| 1412 | - // Ensure that {function} has an instance prototype. | ||
| 1412 | + // Go to the runtime if the function is not a constructor. | ||
| 1413 | 1413 | __ lbz(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); | |
| 1414 | + __ TestBit(scratch, Map::kIsConstructor, r0); | ||
| 1415 | + __ beq(&slow_case, cr0); | ||
| 1416 | + | ||
| 1417 | + // Ensure that {function} has an instance prototype. | ||
| 1414 | 1418 | __ TestBit(scratch, Map::kHasNonInstancePrototype, r0); | |
| 1415 | 1419 | __ bne(&slow_case, cr0); | |
| 1416 | 1420 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments