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

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

Issue 530343005: Clean up code stubs and ensure distinct major keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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') | src/ic/ia32/handler-compiler-ia32.cc » ('J')
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 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 Register the_heap_number, Register scratch) 79 Register the_heap_number, Register scratch)
80 : PlatformCodeStub(isolate) { 80 : PlatformCodeStub(isolate) {
81 minor_key_ = IntRegisterBits::encode(the_int.code()) | 81 minor_key_ = IntRegisterBits::encode(the_int.code()) |
82 HeapNumberRegisterBits::encode(the_heap_number.code()) | 82 HeapNumberRegisterBits::encode(the_heap_number.code()) |
83 ScratchRegisterBits::encode(scratch.code()); 83 ScratchRegisterBits::encode(scratch.code());
84 } 84 }
85 85
86 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); 86 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
87 87
88 private: 88 private:
89 Major MajorKey() const { return WriteInt32ToHeapNumber; } 89 virtual inline Major MajorKey() const FINAL OVERRIDE;
90 90
91 void Generate(MacroAssembler* masm); 91 void Generate(MacroAssembler* masm);
92 92
93 Register the_int() const { 93 Register the_int() const {
94 return Register::from_code(IntRegisterBits::decode(minor_key_)); 94 return Register::from_code(IntRegisterBits::decode(minor_key_));
95 } 95 }
96 96
97 Register the_heap_number() const { 97 Register the_heap_number() const {
98 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_)); 98 return Register::from_code(HeapNumberRegisterBits::decode(minor_key_));
99 } 99 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 Register scratch1_; 250 Register scratch1_;
251 251
252 friend class RecordWriteStub; 252 friend class RecordWriteStub;
253 }; 253 };
254 254
255 enum OnNoNeedToInformIncrementalMarker { 255 enum OnNoNeedToInformIncrementalMarker {
256 kReturnOnNoNeedToInformIncrementalMarker, 256 kReturnOnNoNeedToInformIncrementalMarker,
257 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker 257 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
258 }; 258 };
259 259
260 Major MajorKey() const { return RecordWrite; } 260 virtual inline Major MajorKey() const FINAL OVERRIDE;
261 261
262 void Generate(MacroAssembler* masm); 262 void Generate(MacroAssembler* masm);
263 void GenerateIncremental(MacroAssembler* masm, Mode mode); 263 void GenerateIncremental(MacroAssembler* masm, Mode mode);
264 void CheckNeedsToInformIncrementalMarker( 264 void CheckNeedsToInformIncrementalMarker(
265 MacroAssembler* masm, 265 MacroAssembler* masm,
266 OnNoNeedToInformIncrementalMarker on_no_need, 266 OnNoNeedToInformIncrementalMarker on_no_need,
267 Mode mode); 267 Mode mode);
268 void InformIncrementalMarker(MacroAssembler* masm); 268 void InformIncrementalMarker(MacroAssembler* masm);
269 269
270 void Activate(Code* code) { 270 void Activate(Code* code) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // keep the code which called into native pinned in the memory. Currently the 309 // keep the code which called into native pinned in the memory. Currently the
310 // simplest approach is to generate such stub early enough so it can never be 310 // simplest approach is to generate such stub early enough so it can never be
311 // moved by GC 311 // moved by GC
312 class DirectCEntryStub: public PlatformCodeStub { 312 class DirectCEntryStub: public PlatformCodeStub {
313 public: 313 public:
314 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 314 explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
315 void Generate(MacroAssembler* masm); 315 void Generate(MacroAssembler* masm);
316 void GenerateCall(MacroAssembler* masm, Register target); 316 void GenerateCall(MacroAssembler* masm, Register target);
317 317
318 private: 318 private:
319 Major MajorKey() const { return DirectCEntry; } 319 virtual inline Major MajorKey() const FINAL OVERRIDE;
320 320
321 bool NeedsImmovableCode() { return true; } 321 bool NeedsImmovableCode() { return true; }
322 322
323 DISALLOW_COPY_AND_ASSIGN(DirectCEntryStub); 323 DISALLOW_COPY_AND_ASSIGN(DirectCEntryStub);
324 }; 324 };
325 325
326 326
327 class NameDictionaryLookupStub: public PlatformCodeStub { 327 class NameDictionaryLookupStub: public PlatformCodeStub {
328 public: 328 public:
329 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; 329 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
(...skipping 28 matching lines...) Expand all
358 static const int kTotalProbes = 20; 358 static const int kTotalProbes = 20;
359 359
360 static const int kCapacityOffset = 360 static const int kCapacityOffset =
361 NameDictionary::kHeaderSize + 361 NameDictionary::kHeaderSize +
362 NameDictionary::kCapacityIndex * kPointerSize; 362 NameDictionary::kCapacityIndex * kPointerSize;
363 363
364 static const int kElementsStartOffset = 364 static const int kElementsStartOffset =
365 NameDictionary::kHeaderSize + 365 NameDictionary::kHeaderSize +
366 NameDictionary::kElementsStartIndex * kPointerSize; 366 NameDictionary::kElementsStartIndex * kPointerSize;
367 367
368 Major MajorKey() const { return NameDictionaryLookup; } 368 virtual inline Major MajorKey() const FINAL OVERRIDE;
369 369
370 LookupMode mode() const { return LookupModeBits::decode(minor_key_); } 370 LookupMode mode() const { return LookupModeBits::decode(minor_key_); }
371 371
372 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 372 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
373 373
374 DISALLOW_COPY_AND_ASSIGN(NameDictionaryLookupStub); 374 DISALLOW_COPY_AND_ASSIGN(NameDictionaryLookupStub);
375 }; 375 };
376 376
377 } } // namespace v8::internal 377 } } // namespace v8::internal
378 378
379 #endif // V8_ARM_CODE_STUBS_ARM_H_ 379 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | src/ic/ia32/handler-compiler-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698