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 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2559 if (r2.is(r3)) return true; | 2559 if (r2.is(r3)) return true; |
2560 if (r2.is(r4)) return true; | 2560 if (r2.is(r4)) return true; |
2561 if (r3.is(r4)) return true; | 2561 if (r3.is(r4)) return true; |
2562 return false; | 2562 return false; |
2563 } | 2563 } |
2564 | 2564 |
2565 | 2565 |
2566 CodePatcher::CodePatcher(byte* address, int size) | 2566 CodePatcher::CodePatcher(byte* address, int size) |
2567 : address_(address), | 2567 : address_(address), |
2568 size_(size), | 2568 size_(size), |
2569 masm_(Isolate::Current(), address, size + Assembler::kGap) { | 2569 masm_(NULL, address, size + Assembler::kGap) { |
2570 // Create a new macro assembler pointing to the address of the code to patch. | 2570 // Create a new macro assembler pointing to the address of the code to patch. |
2571 // The size is adjusted with kGap on order for the assembler to generate size | 2571 // The size is adjusted with kGap on order for the assembler to generate size |
2572 // bytes of instructions without failing with buffer size constraints. | 2572 // bytes of instructions without failing with buffer size constraints. |
2573 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2573 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2574 } | 2574 } |
2575 | 2575 |
2576 | 2576 |
2577 CodePatcher::~CodePatcher() { | 2577 CodePatcher::~CodePatcher() { |
2578 // Indicate that code has changed. | 2578 // Indicate that code has changed. |
2579 CPU::FlushICache(address_, size_); | 2579 CPU::FlushICache(address_, size_); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2812 // Load the prototype from the map and loop if non-null. | 2812 // Load the prototype from the map and loop if non-null. |
2813 bind(&check_prototype); | 2813 bind(&check_prototype); |
2814 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); | 2814 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); |
2815 cmp(ecx, isolate()->factory()->null_value()); | 2815 cmp(ecx, isolate()->factory()->null_value()); |
2816 j(not_equal, &next); | 2816 j(not_equal, &next); |
2817 } | 2817 } |
2818 | 2818 |
2819 } } // namespace v8::internal | 2819 } } // namespace v8::internal |
2820 | 2820 |
2821 #endif // V8_TARGET_ARCH_IA32 | 2821 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |