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/arm/codegen-arm.h" | 5 #include "src/arm/codegen-arm.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/arm/simulator-arm.h" | 9 #include "src/arm/simulator-arm.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 __ bind(&done); | 878 __ bind(&done); |
879 } | 879 } |
880 | 880 |
881 #undef __ | 881 #undef __ |
882 | 882 |
883 #ifdef DEBUG | 883 #ifdef DEBUG |
884 // add(r0, pc, Operand(-8)) | 884 // add(r0, pc, Operand(-8)) |
885 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008; | 885 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008; |
886 #endif | 886 #endif |
887 | 887 |
888 CodeAgingHelper::CodeAgingHelper() { | 888 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
| 889 USE(isolate); |
889 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 890 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
890 // Since patcher is a large object, allocate it dynamically when needed, | 891 // Since patcher is a large object, allocate it dynamically when needed, |
891 // to avoid overloading the stack in stress conditions. | 892 // to avoid overloading the stack in stress conditions. |
892 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in | 893 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in |
893 // the process, before ARM simulator ICache is setup. | 894 // the process, before ARM simulator ICache is setup. |
894 base::SmartPointer<CodePatcher> patcher(new CodePatcher( | 895 base::SmartPointer<CodePatcher> patcher(new CodePatcher( |
895 young_sequence_.start(), young_sequence_.length() / Assembler::kInstrSize, | 896 young_sequence_.start(), young_sequence_.length() / Assembler::kInstrSize, |
896 CodePatcher::DONT_FLUSH)); | 897 CodePatcher::DONT_FLUSH)); |
897 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 898 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
898 patcher->masm()->PushFixedFrame(r1); | 899 patcher->masm()->PushFixedFrame(r1); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 946 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
946 patcher.masm()->emit_code_stub_address(stub); | 947 patcher.masm()->emit_code_stub_address(stub); |
947 } | 948 } |
948 } | 949 } |
949 | 950 |
950 | 951 |
951 } // namespace internal | 952 } // namespace internal |
952 } // namespace v8 | 953 } // namespace v8 |
953 | 954 |
954 #endif // V8_TARGET_ARCH_ARM | 955 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |