OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 virtual ~RegExpCEntryStub() {} | 564 virtual ~RegExpCEntryStub() {} |
565 void Generate(MacroAssembler* masm); | 565 void Generate(MacroAssembler* masm); |
566 | 566 |
567 private: | 567 private: |
568 Major MajorKey() { return RegExpCEntry; } | 568 Major MajorKey() { return RegExpCEntry; } |
569 int MinorKey() { return 0; } | 569 int MinorKey() { return 0; } |
570 const char* GetName() { return "RegExpCEntryStub"; } | 570 const char* GetName() { return "RegExpCEntryStub"; } |
571 }; | 571 }; |
572 | 572 |
573 | 573 |
| 574 // Trampoline stub to call into native code. To call safely into native code |
| 575 // in the presence of compacting GC (which can move code objects) we need to |
| 576 // keep the code which called into native pinned in the memory. Currently the |
| 577 // simplest approach is to generate such stub early enough so it can never be |
| 578 // moved by GC |
| 579 class DirectCEntryStub: public CodeStub { |
| 580 public: |
| 581 DirectCEntryStub() {} |
| 582 void Generate(MacroAssembler* masm); |
| 583 void GenerateCall(MacroAssembler* masm, ApiFunction *function); |
| 584 |
| 585 private: |
| 586 Major MajorKey() { return DirectCEntry; } |
| 587 int MinorKey() { return 0; } |
| 588 const char* GetName() { return "DirectCEntryStub"; } |
| 589 }; |
| 590 |
| 591 |
574 // Generate code the to load an element from a pixel array. The receiver is | 592 // Generate code the to load an element from a pixel array. The receiver is |
575 // assumed to not be a smi and to have elements, the caller must guarantee this | 593 // assumed to not be a smi and to have elements, the caller must guarantee this |
576 // precondition. If the receiver does not have elements that are pixel arrays, | 594 // precondition. If the receiver does not have elements that are pixel arrays, |
577 // the generated code jumps to not_pixel_array. If key is not a smi, then the | 595 // the generated code jumps to not_pixel_array. If key is not a smi, then the |
578 // generated code branches to key_not_smi. Callers can specify NULL for | 596 // generated code branches to key_not_smi. Callers can specify NULL for |
579 // key_not_smi to signal that a smi check has already been performed on key so | 597 // key_not_smi to signal that a smi check has already been performed on key so |
580 // that the smi check is not generated . If key is not a valid index within the | 598 // that the smi check is not generated . If key is not a valid index within the |
581 // bounds of the pixel array, the generated code jumps to out_of_range. | 599 // bounds of the pixel array, the generated code jumps to out_of_range. |
582 void GenerateFastPixelArrayLoad(MacroAssembler* masm, | 600 void GenerateFastPixelArrayLoad(MacroAssembler* masm, |
583 Register receiver, | 601 Register receiver, |
584 Register key, | 602 Register key, |
585 Register elements_map, | 603 Register elements_map, |
586 Register elements, | 604 Register elements, |
587 Register scratch1, | 605 Register scratch1, |
588 Register scratch2, | 606 Register scratch2, |
589 Register result, | 607 Register result, |
590 Label* not_pixel_array, | 608 Label* not_pixel_array, |
591 Label* key_not_smi, | 609 Label* key_not_smi, |
592 Label* out_of_range); | 610 Label* out_of_range); |
593 | 611 |
594 | 612 |
595 } } // namespace v8::internal | 613 } } // namespace v8::internal |
596 | 614 |
597 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 615 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
OLD | NEW |