| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2753 __ mov(scratch, Operand(esp, 0 * kPointerSize)); | 2753 __ mov(scratch, Operand(esp, 0 * kPointerSize)); |
| 2754 __ sub(scratch, Operand(esp, 1 * kPointerSize)); | 2754 __ sub(scratch, Operand(esp, 1 * kPointerSize)); |
| 2755 if (FLAG_debug_code) { | 2755 if (FLAG_debug_code) { |
| 2756 __ cmpb(Operand(scratch, 0), kCmpEdiOperandByte1); | 2756 __ cmpb(Operand(scratch, 0), kCmpEdiOperandByte1); |
| 2757 __ Assert(equal, kInstanceofStubUnexpectedCallSiteCacheCmp1); | 2757 __ Assert(equal, kInstanceofStubUnexpectedCallSiteCacheCmp1); |
| 2758 __ cmpb(Operand(scratch, 1), kCmpEdiOperandByte2); | 2758 __ cmpb(Operand(scratch, 1), kCmpEdiOperandByte2); |
| 2759 __ Assert(equal, kInstanceofStubUnexpectedCallSiteCacheCmp2); | 2759 __ Assert(equal, kInstanceofStubUnexpectedCallSiteCacheCmp2); |
| 2760 } | 2760 } |
| 2761 __ mov(scratch, Operand(scratch, kDeltaToCmpImmediate)); | 2761 __ mov(scratch, Operand(scratch, kDeltaToCmpImmediate)); |
| 2762 __ mov(Operand(scratch, 0), map); | 2762 __ mov(Operand(scratch, 0), map); |
| 2763 __ push(map); |
| 2764 // Scratch points at the cell payload. Calculate the start of the object. |
| 2765 __ sub(scratch, Immediate(Cell::kValueOffset - 1)); |
| 2766 __ RecordWriteField(scratch, Cell::kValueOffset, map, function, |
| 2767 kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 2768 __ pop(map); |
| 2763 } | 2769 } |
| 2764 | 2770 |
| 2765 // Loop through the prototype chain of the object looking for the function | 2771 // Loop through the prototype chain of the object looking for the function |
| 2766 // prototype. | 2772 // prototype. |
| 2767 __ mov(scratch, FieldOperand(map, Map::kPrototypeOffset)); | 2773 __ mov(scratch, FieldOperand(map, Map::kPrototypeOffset)); |
| 2768 Label loop, is_instance, is_not_instance; | 2774 Label loop, is_instance, is_not_instance; |
| 2769 __ bind(&loop); | 2775 __ bind(&loop); |
| 2770 __ cmp(scratch, prototype); | 2776 __ cmp(scratch, prototype); |
| 2771 __ j(equal, &is_instance, Label::kNear); | 2777 __ j(equal, &is_instance, Label::kNear); |
| 2772 Factory* factory = isolate()->factory(); | 2778 Factory* factory = isolate()->factory(); |
| (...skipping 2628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5401 ApiParameterOperand(2), kStackSpace, nullptr, | 5407 ApiParameterOperand(2), kStackSpace, nullptr, |
| 5402 Operand(ebp, 7 * kPointerSize), NULL); | 5408 Operand(ebp, 7 * kPointerSize), NULL); |
| 5403 } | 5409 } |
| 5404 | 5410 |
| 5405 | 5411 |
| 5406 #undef __ | 5412 #undef __ |
| 5407 | 5413 |
| 5408 } } // namespace v8::internal | 5414 } } // namespace v8::internal |
| 5409 | 5415 |
| 5410 #endif // V8_TARGET_ARCH_IA32 | 5416 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |