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

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

Issue 551043005: Added CallInterfaceDescriptors to all code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.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 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 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 Register scratch() const { 73 Register scratch() const {
74 return Register::from_code(ScratchRegisterBits::decode(minor_key_)); 74 return Register::from_code(ScratchRegisterBits::decode(minor_key_));
75 } 75 }
76 76
77 // Minor key encoding in 16 bits. 77 // Minor key encoding in 16 bits.
78 class IntRegisterBits: public BitField<int, 0, 4> {}; 78 class IntRegisterBits: public BitField<int, 0, 4> {};
79 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; 79 class HeapNumberRegisterBits: public BitField<int, 4, 4> {};
80 class ScratchRegisterBits: public BitField<int, 8, 4> {}; 80 class ScratchRegisterBits: public BitField<int, 8, 4> {};
81 81
82 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
82 DEFINE_PLATFORM_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub); 83 DEFINE_PLATFORM_CODE_STUB(WriteInt32ToHeapNumber, PlatformCodeStub);
83 }; 84 };
84 85
85 86
86 class RecordWriteStub: public PlatformCodeStub { 87 class RecordWriteStub: public PlatformCodeStub {
87 public: 88 public:
88 RecordWriteStub(Isolate* isolate, 89 RecordWriteStub(Isolate* isolate,
89 Register object, 90 Register object,
90 Register value, 91 Register value,
91 Register address, 92 Register address,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 case INCREMENTAL_COMPACTION: 162 case INCREMENTAL_COMPACTION:
162 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY); 163 DCHECK(GetMode(stub) == STORE_BUFFER_ONLY);
163 PatchNopIntoBranch(&masm, Assembler::kInstrSize); 164 PatchNopIntoBranch(&masm, Assembler::kInstrSize);
164 break; 165 break;
165 } 166 }
166 DCHECK(GetMode(stub) == mode); 167 DCHECK(GetMode(stub) == mode);
167 CpuFeatures::FlushICache(stub->instruction_start(), 168 CpuFeatures::FlushICache(stub->instruction_start(),
168 2 * Assembler::kInstrSize); 169 2 * Assembler::kInstrSize);
169 } 170 }
170 171
172 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
173
171 private: 174 private:
172 // This is a helper class for freeing up 3 scratch registers. The input is 175 // This is a helper class for freeing up 3 scratch registers. The input is
173 // two registers that must be preserved and one scratch register provided by 176 // two registers that must be preserved and one scratch register provided by
174 // the caller. 177 // the caller.
175 class RegisterAllocation { 178 class RegisterAllocation {
176 public: 179 public:
177 RegisterAllocation(Register object, 180 RegisterAllocation(Register object,
178 Register address, 181 Register address,
179 Register scratch0) 182 Register scratch0)
180 : object_(object), 183 : object_(object),
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // simplest approach is to generate such stub early enough so it can never be 288 // simplest approach is to generate such stub early enough so it can never be
286 // moved by GC 289 // moved by GC
287 class DirectCEntryStub: public PlatformCodeStub { 290 class DirectCEntryStub: public PlatformCodeStub {
288 public: 291 public:
289 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 292 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
290 void GenerateCall(MacroAssembler* masm, Register target); 293 void GenerateCall(MacroAssembler* masm, Register target);
291 294
292 private: 295 private:
293 bool NeedsImmovableCode() { return true; } 296 bool NeedsImmovableCode() { return true; }
294 297
298 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
295 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub); 299 DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
296 }; 300 };
297 301
298 302
299 class NameDictionaryLookupStub: public PlatformCodeStub { 303 class NameDictionaryLookupStub: public PlatformCodeStub {
300 public: 304 public:
301 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; 305 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
302 306
303 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode) 307 NameDictionaryLookupStub(Isolate* isolate, LookupMode mode)
304 : PlatformCodeStub(isolate) { 308 : PlatformCodeStub(isolate) {
(...skipping 27 matching lines...) Expand all
332 NameDictionary::kCapacityIndex * kPointerSize; 336 NameDictionary::kCapacityIndex * kPointerSize;
333 337
334 static const int kElementsStartOffset = 338 static const int kElementsStartOffset =
335 NameDictionary::kHeaderSize + 339 NameDictionary::kHeaderSize +
336 NameDictionary::kElementsStartIndex * kPointerSize; 340 NameDictionary::kElementsStartIndex * kPointerSize;
337 341
338 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } 342 LookupMode mode() const { return LookupModeBits::decode(minor_key_); }
339 343
340 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 344 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
341 345
346 DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
342 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub); 347 DEFINE_PLATFORM_CODE_STUB(NameDictionaryLookup, PlatformCodeStub);
343 }; 348 };
344 349
345 } } // namespace v8::internal 350 } } // namespace v8::internal
346 351
347 #endif // V8_ARM_CODE_STUBS_ARM_H_ 352 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698