| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 __ bind(&fast_case); | 1467 __ bind(&fast_case); |
| 1468 __ JumpIfSmi(function, &slow_case); | 1468 __ JumpIfSmi(function, &slow_case); |
| 1469 __ GetObjectType(function, function_map, scratch); | 1469 __ GetObjectType(function, function_map, scratch); |
| 1470 __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE)); | 1470 __ Branch(&slow_case, ne, scratch, Operand(JS_FUNCTION_TYPE)); |
| 1471 | 1471 |
| 1472 // Ensure that {function} has an instance prototype. | 1472 // Ensure that {function} has an instance prototype. |
| 1473 __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); | 1473 __ lbu(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); |
| 1474 __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype)); | 1474 __ And(at, scratch, Operand(1 << Map::kHasNonInstancePrototype)); |
| 1475 __ Branch(&slow_case, ne, at, Operand(zero_reg)); | 1475 __ Branch(&slow_case, ne, at, Operand(zero_reg)); |
| 1476 | 1476 |
| 1477 // Ensure that {function} is not bound. | |
| 1478 Register const shared_info = scratch; | |
| 1479 __ ld(shared_info, | |
| 1480 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); | |
| 1481 __ lbu(scratch, | |
| 1482 FieldMemOperand(shared_info, SharedFunctionInfo::kBoundByteOffset)); | |
| 1483 __ And(at, scratch, Operand(1 << SharedFunctionInfo::kBoundBitWithinByte)); | |
| 1484 __ Branch(&slow_case, ne, at, Operand(zero_reg)); | |
| 1485 | |
| 1486 // Get the "prototype" (or initial map) of the {function}. | 1477 // Get the "prototype" (or initial map) of the {function}. |
| 1487 __ ld(function_prototype, | 1478 __ ld(function_prototype, |
| 1488 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 1479 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
| 1489 __ AssertNotSmi(function_prototype); | 1480 __ AssertNotSmi(function_prototype); |
| 1490 | 1481 |
| 1491 // Resolve the prototype if the {function} has an initial map. Afterwards the | 1482 // Resolve the prototype if the {function} has an initial map. Afterwards the |
| 1492 // {function_prototype} will be either the JSReceiver prototype object or the | 1483 // {function_prototype} will be either the JSReceiver prototype object or the |
| 1493 // hole value, which means that no instances of the {function} were created so | 1484 // hole value, which means that no instances of the {function} were created so |
| 1494 // far and hence we should return false. | 1485 // far and hence we should return false. |
| 1495 Label function_prototype_valid; | 1486 Label function_prototype_valid; |
| (...skipping 4141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5637 MemOperand(fp, 6 * kPointerSize), NULL); | 5628 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5638 } | 5629 } |
| 5639 | 5630 |
| 5640 | 5631 |
| 5641 #undef __ | 5632 #undef __ |
| 5642 | 5633 |
| 5643 } // namespace internal | 5634 } // namespace internal |
| 5644 } // namespace v8 | 5635 } // namespace v8 |
| 5645 | 5636 |
| 5646 #endif // V8_TARGET_ARCH_MIPS64 | 5637 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |