| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 __ bind(&fast_case); | 1465 __ bind(&fast_case); |
| 1466 __ JumpIfSmi(function, &slow_case); | 1466 __ JumpIfSmi(function, &slow_case); |
| 1467 __ GetObjectType(function, function_map, scratch); | 1467 __ GetObjectType(function, function_map, scratch); |
| 1468 __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE)); | 1468 __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE)); |
| 1469 | 1469 |
| 1470 // Ensure that {function} has an instance prototype. | 1470 // Ensure that {function} has an instance prototype. |
| 1471 __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); | 1471 __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); |
| 1472 __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype)); | 1472 __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype)); |
| 1473 __ Branch(&slow_case, ne, at, Operand(zero_reg)); | 1473 __ Branch(&slow_case, ne, at, Operand(zero_reg)); |
| 1474 | 1474 |
| 1475 // Ensure that {function} is not bound. | |
| 1476 Register const shared_info = scratch; | |
| 1477 __ lw(shared_info, | |
| 1478 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); | |
| 1479 __ lbu(scratch, | |
| 1480 FieldMemOperand(shared_info, SharedFunctionInfo::kBoundByteOffset)); | |
| 1481 __ And(at, scratch, Operand(1 << SharedFunctionInfo::kBoundBitWithinByte)); | |
| 1482 __ Branch(&slow_case, ne, at, Operand(zero_reg)); | |
| 1483 | |
| 1484 // Get the "prototype" (or initial map) of the {function}. | 1475 // Get the "prototype" (or initial map) of the {function}. |
| 1485 __ lw(function_prototype, | 1476 __ lw(function_prototype, |
| 1486 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 1477 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
| 1487 __ AssertNotSmi(function_prototype); | 1478 __ AssertNotSmi(function_prototype); |
| 1488 | 1479 |
| 1489 // Resolve the prototype if the {function} has an initial map. Afterwards the | 1480 // Resolve the prototype if the {function} has an initial map. Afterwards the |
| 1490 // {function_prototype} will be either the JSReceiver prototype object or the | 1481 // {function_prototype} will be either the JSReceiver prototype object or the |
| 1491 // hole value, which means that no instances of the {function} were created so | 1482 // hole value, which means that no instances of the {function} were created so |
| 1492 // far and hence we should return false. | 1483 // far and hence we should return false. |
| 1493 Label function_prototype_valid; | 1484 Label function_prototype_valid; |
| (...skipping 4112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5606 MemOperand(fp, 6 * kPointerSize), NULL); | 5597 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5607 } | 5598 } |
| 5608 | 5599 |
| 5609 | 5600 |
| 5610 #undef __ | 5601 #undef __ |
| 5611 | 5602 |
| 5612 } // namespace internal | 5603 } // namespace internal |
| 5613 } // namespace v8 | 5604 } // namespace v8 |
| 5614 | 5605 |
| 5615 #endif // V8_TARGET_ARCH_MIPS | 5606 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |