OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4997 Register object = eax; // Object (lhs). | 4997 Register object = eax; // Object (lhs). |
4998 Register map = ebx; // Map of the object. | 4998 Register map = ebx; // Map of the object. |
4999 Register function = edx; // Function (rhs). | 4999 Register function = edx; // Function (rhs). |
5000 Register prototype = edi; // Prototype of the function. | 5000 Register prototype = edi; // Prototype of the function. |
5001 Register scratch = ecx; | 5001 Register scratch = ecx; |
5002 | 5002 |
5003 // Constants describing the call site code to patch. | 5003 // Constants describing the call site code to patch. |
5004 static const int kDeltaToCmpImmediate = 2; | 5004 static const int kDeltaToCmpImmediate = 2; |
5005 static const int kDeltaToMov = 8; | 5005 static const int kDeltaToMov = 8; |
5006 static const int kDeltaToMovImmediate = 9; | 5006 static const int kDeltaToMovImmediate = 9; |
5007 static const int8_t kCmpEdiImmediateByte1 = static_cast<int8_t>(0x81); | 5007 static const int8_t kCmpEdiImmediateByte1 = BitCast<int8_t, uint8_t>(0x81); |
5008 static const int8_t kCmpEdiImmediateByte2 = static_cast<int8_t>(0xff); | 5008 static const int8_t kCmpEdiImmediateByte2 = BitCast<int8_t, uint8_t>(0xff); |
5009 static const int8_t kMovEaxImmediateByte = static_cast<int8_t>(0xb8); | 5009 static const int8_t kMovEaxImmediateByte = BitCast<int8_t, uint8_t>(0xb8); |
5010 | 5010 |
5011 ExternalReference roots_address = ExternalReference::roots_address(); | 5011 ExternalReference roots_address = ExternalReference::roots_address(); |
5012 | 5012 |
5013 ASSERT_EQ(object.code(), InstanceofStub::left().code()); | 5013 ASSERT_EQ(object.code(), InstanceofStub::left().code()); |
5014 ASSERT_EQ(function.code(), InstanceofStub::right().code()); | 5014 ASSERT_EQ(function.code(), InstanceofStub::right().code()); |
5015 | 5015 |
5016 // Get the object and function - they are always both needed. | 5016 // Get the object and function - they are always both needed. |
5017 Label slow, not_js_object; | 5017 Label slow, not_js_object; |
5018 if (!HasArgsInRegisters()) { | 5018 if (!HasArgsInRegisters()) { |
5019 __ mov(object, Operand(esp, 2 * kPointerSize)); | 5019 __ mov(object, Operand(esp, 2 * kPointerSize)); |
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6490 // Do a tail call to the rewritten stub. | 6490 // Do a tail call to the rewritten stub. |
6491 __ jmp(Operand(edi)); | 6491 __ jmp(Operand(edi)); |
6492 } | 6492 } |
6493 | 6493 |
6494 | 6494 |
6495 #undef __ | 6495 #undef __ |
6496 | 6496 |
6497 } } // namespace v8::internal | 6497 } } // namespace v8::internal |
6498 | 6498 |
6499 #endif // V8_TARGET_ARCH_IA32 | 6499 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |