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 #ifndef V8_ARM_CODE_STUBS_ARM_H_ | 5 #ifndef V8_ARM_CODE_STUBS_ARM_H_ |
6 #define V8_ARM_CODE_STUBS_ARM_H_ | 6 #define V8_ARM_CODE_STUBS_ARM_H_ |
7 | 7 |
8 #include "src/arm/frames-arm.h" | 8 #include "src/arm/frames-arm.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (Assembler::IsBranch(second_instruction)) { | 102 if (Assembler::IsBranch(second_instruction)) { |
103 return INCREMENTAL_COMPACTION; | 103 return INCREMENTAL_COMPACTION; |
104 } | 104 } |
105 | 105 |
106 DCHECK(Assembler::IsTstImmediate(second_instruction)); | 106 DCHECK(Assembler::IsTstImmediate(second_instruction)); |
107 | 107 |
108 return STORE_BUFFER_ONLY; | 108 return STORE_BUFFER_ONLY; |
109 } | 109 } |
110 | 110 |
111 static void Patch(Code* stub, Mode mode) { | 111 static void Patch(Code* stub, Mode mode) { |
112 MacroAssembler masm(NULL, | 112 MacroAssembler masm(stub->GetIsolate(), stub->instruction_start(), |
113 stub->instruction_start(), | 113 stub->instruction_size(), false); |
114 stub->instruction_size()); | |
115 switch (mode) { | 114 switch (mode) { |
116 case STORE_BUFFER_ONLY: | 115 case STORE_BUFFER_ONLY: |
117 DCHECK(GetMode(stub) == INCREMENTAL || | 116 DCHECK(GetMode(stub) == INCREMENTAL || |
118 GetMode(stub) == INCREMENTAL_COMPACTION); | 117 GetMode(stub) == INCREMENTAL_COMPACTION); |
119 PatchBranchIntoNop(&masm, 0); | 118 PatchBranchIntoNop(&masm, 0); |
120 PatchBranchIntoNop(&masm, Assembler::kInstrSize); | 119 PatchBranchIntoNop(&masm, Assembler::kInstrSize); |
121 break; | 120 break; |
122 case INCREMENTAL: | 121 case INCREMENTAL: |
123 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); | 122 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); |
124 PatchNopIntoBranch(&masm, 0); | 123 PatchNopIntoBranch(&masm, 0); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; | 307 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; |
309 | 308 |
310 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 309 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
311 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 310 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
312 }; | 311 }; |
313 | 312 |
314 } // namespace internal | 313 } // namespace internal |
315 } // namespace v8 | 314 } // namespace v8 |
316 | 315 |
317 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 316 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
OLD | NEW |