OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_MIPS_CODE_STUBS_MIPS_H_ | 5 #ifndef V8_MIPS_CODE_STUBS_MIPS_H_ |
6 #define V8_MIPS_CODE_STUBS_MIPS_H_ | 6 #define V8_MIPS_CODE_STUBS_MIPS_H_ |
7 | 7 |
8 #include "src/mips/frames-mips.h" | 8 #include "src/mips/frames-mips.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 if (Assembler::IsBeq(second_instruction)) { | 133 if (Assembler::IsBeq(second_instruction)) { |
134 return INCREMENTAL_COMPACTION; | 134 return INCREMENTAL_COMPACTION; |
135 } | 135 } |
136 | 136 |
137 DCHECK(Assembler::IsBne(second_instruction)); | 137 DCHECK(Assembler::IsBne(second_instruction)); |
138 | 138 |
139 return STORE_BUFFER_ONLY; | 139 return STORE_BUFFER_ONLY; |
140 } | 140 } |
141 | 141 |
142 static void Patch(Code* stub, Mode mode) { | 142 static void Patch(Code* stub, Mode mode) { |
143 MacroAssembler masm(NULL, | 143 MacroAssembler masm(stub->GetIsolate(), stub->instruction_start(), |
144 stub->instruction_start(), | 144 stub->instruction_size(), false); |
145 stub->instruction_size()); | |
146 switch (mode) { | 145 switch (mode) { |
147 case STORE_BUFFER_ONLY: | 146 case STORE_BUFFER_ONLY: |
148 DCHECK(GetMode(stub) == INCREMENTAL || | 147 DCHECK(GetMode(stub) == INCREMENTAL || |
149 GetMode(stub) == INCREMENTAL_COMPACTION); | 148 GetMode(stub) == INCREMENTAL_COMPACTION); |
150 PatchBranchIntoNop(&masm, 0); | 149 PatchBranchIntoNop(&masm, 0); |
151 PatchBranchIntoNop(&masm, 2 * Assembler::kInstrSize); | 150 PatchBranchIntoNop(&masm, 2 * Assembler::kInstrSize); |
152 break; | 151 break; |
153 case INCREMENTAL: | 152 case INCREMENTAL: |
154 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); | 153 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); |
155 PatchNopIntoBranch(&masm, 0); | 154 PatchNopIntoBranch(&masm, 0); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 339 |
341 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); | 340 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR(); |
342 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); | 341 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); |
343 }; | 342 }; |
344 | 343 |
345 | 344 |
346 } // namespace internal | 345 } // namespace internal |
347 } // namespace v8 | 346 } // namespace v8 |
348 | 347 |
349 #endif // V8_MIPS_CODE_STUBS_MIPS_H_ | 348 #endif // V8_MIPS_CODE_STUBS_MIPS_H_ |
OLD | NEW |