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

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

Issue 8041035: Tighten up assertions checking GC-safety of stub calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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/arm/code-stubs-arm.cc » ('J')
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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 }; 58 };
59 59
60 60
61 class StoreBufferOverflowStub: public CodeStub { 61 class StoreBufferOverflowStub: public CodeStub {
62 public: 62 public:
63 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) 63 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp)
64 : save_doubles_(save_fp) { } 64 : save_doubles_(save_fp) { }
65 65
66 void Generate(MacroAssembler* masm); 66 void Generate(MacroAssembler* masm);
67 67
68 virtual bool CompilingCallsToThisStubIsGCSafe() { return true; } 68 virtual bool IsPregenerated() { return true; }
69 static void GenerateFixedRegStubsAheadOfTime(); 69 static void GenerateFixedRegStubsAheadOfTime();
70 virtual bool SometimesSetsUpAFrame() { return false; } 70 virtual bool SometimesSetsUpAFrame() { return false; }
71 71
72 private: 72 private:
73 SaveFPRegsMode save_doubles_; 73 SaveFPRegsMode save_doubles_;
74 74
75 Major MajorKey() { return StoreBufferOverflow; } 75 Major MajorKey() { return StoreBufferOverflow; }
76 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } 76 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
77 }; 77 };
78 78
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // so you don't have to set up the frame. 335 // so you don't have to set up the frame.
336 class WriteInt32ToHeapNumberStub : public CodeStub { 336 class WriteInt32ToHeapNumberStub : public CodeStub {
337 public: 337 public:
338 WriteInt32ToHeapNumberStub(Register the_int, 338 WriteInt32ToHeapNumberStub(Register the_int,
339 Register the_heap_number, 339 Register the_heap_number,
340 Register scratch) 340 Register scratch)
341 : the_int_(the_int), 341 : the_int_(the_int),
342 the_heap_number_(the_heap_number), 342 the_heap_number_(the_heap_number),
343 scratch_(scratch) { } 343 scratch_(scratch) { }
344 344
345 bool CompilingCallsToThisStubIsGCSafe(); 345 bool IsPregenerated();
346 static void GenerateFixedRegStubsAheadOfTime(); 346 static void GenerateFixedRegStubsAheadOfTime();
347 347
348 private: 348 private:
349 Register the_int_; 349 Register the_int_;
350 Register the_heap_number_; 350 Register the_heap_number_;
351 Register scratch_; 351 Register scratch_;
352 352
353 // Minor key encoding in 16 bits. 353 // Minor key encoding in 16 bits.
354 class IntRegisterBits: public BitField<int, 0, 4> {}; 354 class IntRegisterBits: public BitField<int, 0, 4> {};
355 class HeapNumberRegisterBits: public BitField<int, 4, 4> {}; 355 class HeapNumberRegisterBits: public BitField<int, 4, 4> {};
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 address, // An input reg. 409 address, // An input reg.
410 value) { // One scratch reg. 410 value) { // One scratch reg.
411 } 411 }
412 412
413 enum Mode { 413 enum Mode {
414 STORE_BUFFER_ONLY, 414 STORE_BUFFER_ONLY,
415 INCREMENTAL, 415 INCREMENTAL,
416 INCREMENTAL_COMPACTION 416 INCREMENTAL_COMPACTION
417 }; 417 };
418 418
419 virtual bool CompilingCallsToThisStubIsGCSafe(); 419 virtual bool IsPregenerated();
420 static void GenerateFixedRegStubsAheadOfTime(); 420 static void GenerateFixedRegStubsAheadOfTime();
421 virtual bool SometimesSetsUpAFrame() { return false; } 421 virtual bool SometimesSetsUpAFrame() { return false; }
422 422
423 static void PatchBranchIntoNop(MacroAssembler* masm, int pos) { 423 static void PatchBranchIntoNop(MacroAssembler* masm, int pos) {
424 masm->instr_at_put(pos, (masm->instr_at(pos) & ~B27) | (B24 | B20)); 424 masm->instr_at_put(pos, (masm->instr_at(pos) & ~B27) | (B24 | B20));
425 ASSERT(Assembler::IsTstImmediate(masm->instr_at(pos))); 425 ASSERT(Assembler::IsTstImmediate(masm->instr_at(pos)));
426 } 426 }
427 427
428 static void PatchNopIntoBranch(MacroAssembler* masm, int pos) { 428 static void PatchNopIntoBranch(MacroAssembler* masm, int pos) {
429 masm->instr_at_put(pos, (masm->instr_at(pos) & ~(B24 | B20)) | B27); 429 masm->instr_at_put(pos, (masm->instr_at(pos) & ~(B24 | B20)) | B27);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 839 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
840 840
841 LookupMode mode_; 841 LookupMode mode_;
842 }; 842 };
843 843
844 844
845 } } // namespace v8::internal 845 } } // namespace v8::internal
846 846
847 #endif // V8_ARM_CODE_STUBS_ARM_H_ 847 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | src/arm/code-stubs-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698