OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 27 matching lines...) Expand all Loading... |
38 #include "heap.h" | 38 #include "heap.h" |
39 | 39 |
40 namespace v8 { | 40 namespace v8 { |
41 namespace internal { | 41 namespace internal { |
42 | 42 |
43 MacroAssembler::MacroAssembler(void* buffer, int size) | 43 MacroAssembler::MacroAssembler(void* buffer, int size) |
44 : Assembler(buffer, size), | 44 : Assembler(buffer, size), |
45 generating_stub_(false), | 45 generating_stub_(false), |
46 allow_stub_calls_(true), | 46 allow_stub_calls_(true), |
47 root_array_available_(true), | 47 root_array_available_(true), |
48 code_object_(HEAP->undefined_value()) { | 48 code_object_(isolate()->heap()->undefined_value()) { |
49 } | 49 } |
50 | 50 |
51 | 51 |
52 static intptr_t RootRegisterDelta(ExternalReference other, Isolate* isolate) { | 52 static intptr_t RootRegisterDelta(ExternalReference other, Isolate* isolate) { |
53 Address roots_register_value = kRootRegisterBias + | 53 Address roots_register_value = kRootRegisterBias + |
54 reinterpret_cast<Address>(isolate->heap()->roots_address()); | 54 reinterpret_cast<Address>(isolate->heap()->roots_address()); |
55 intptr_t delta = other.address() - roots_register_value; | 55 intptr_t delta = other.address() - roots_register_value; |
56 return delta; | 56 return delta; |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 Operand MacroAssembler::ExternalOperand(ExternalReference target, | 60 Operand MacroAssembler::ExternalOperand(ExternalReference target, |
61 Register scratch) { | 61 Register scratch) { |
62 if (root_array_available_ && !Serializer::enabled()) { | 62 if (root_array_available_ && !Serializer::enabled()) { |
(...skipping 2859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2922 CPU::FlushICache(address_, size_); | 2922 CPU::FlushICache(address_, size_); |
2923 | 2923 |
2924 // Check that the code was patched as expected. | 2924 // Check that the code was patched as expected. |
2925 ASSERT(masm_.pc_ == address_ + size_); | 2925 ASSERT(masm_.pc_ == address_ + size_); |
2926 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2926 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2927 } | 2927 } |
2928 | 2928 |
2929 } } // namespace v8::internal | 2929 } } // namespace v8::internal |
2930 | 2930 |
2931 #endif // V8_TARGET_ARCH_X64 | 2931 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |