| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 DeferredInstanceOfKnownGlobal* deferred; | 2645 DeferredInstanceOfKnownGlobal* deferred; |
| 2646 deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr); | 2646 deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr); |
| 2647 | 2647 |
| 2648 Label done, false_result; | 2648 Label done, false_result; |
| 2649 Register object = ToRegister(instr->value()); | 2649 Register object = ToRegister(instr->value()); |
| 2650 Register temp = ToRegister(instr->temp()); | 2650 Register temp = ToRegister(instr->temp()); |
| 2651 | 2651 |
| 2652 // A Smi is not an instance of anything. | 2652 // A Smi is not an instance of anything. |
| 2653 __ JumpIfSmi(object, &false_result); | 2653 __ JumpIfSmi(object, &false_result); |
| 2654 | 2654 |
| 2655 // This is the inlined call site instanceof cache. The two occurences of the | 2655 // This is the inlined call site instanceof cache. The two occurrences of the |
| 2656 // hole value will be patched to the last map/result pair generated by the | 2656 // hole value will be patched to the last map/result pair generated by the |
| 2657 // instanceof stub. | 2657 // instanceof stub. |
| 2658 Label cache_miss; | 2658 Label cache_miss; |
| 2659 Register map = ToRegister(instr->temp()); | 2659 Register map = ToRegister(instr->temp()); |
| 2660 __ mov(map, FieldOperand(object, HeapObject::kMapOffset)); | 2660 __ mov(map, FieldOperand(object, HeapObject::kMapOffset)); |
| 2661 __ bind(deferred->map_check()); // Label for calculating code patching. | 2661 __ bind(deferred->map_check()); // Label for calculating code patching. |
| 2662 Handle<JSGlobalPropertyCell> cache_cell = | 2662 Handle<JSGlobalPropertyCell> cache_cell = |
| 2663 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value()); | 2663 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value()); |
| 2664 __ cmp(map, Operand::Cell(cache_cell)); // Patched to cached map. | 2664 __ cmp(map, Operand::Cell(cache_cell)); // Patched to cached map. |
| 2665 __ j(not_equal, &cache_miss, Label::kNear); | 2665 __ j(not_equal, &cache_miss, Label::kNear); |
| (...skipping 3974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6640 FixedArray::kHeaderSize - kPointerSize)); | 6640 FixedArray::kHeaderSize - kPointerSize)); |
| 6641 __ bind(&done); | 6641 __ bind(&done); |
| 6642 } | 6642 } |
| 6643 | 6643 |
| 6644 | 6644 |
| 6645 #undef __ | 6645 #undef __ |
| 6646 | 6646 |
| 6647 } } // namespace v8::internal | 6647 } } // namespace v8::internal |
| 6648 | 6648 |
| 6649 #endif // V8_TARGET_ARCH_IA32 | 6649 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |