Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: src/mips/code-stubs-mips.h

Issue 1476763002: Make whether or not a Code object should be created by masm explicit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enum class FTW Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/access-compiler.h ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(), CodeObjectRequired::kNo);
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
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_
OLDNEW
« no previous file with comments | « src/ic/access-compiler.h ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698