OLD | NEW |
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 11 matching lines...) Expand all Loading... |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
30 | 30 |
31 #include "assembler.h" | 31 #include "assembler.h" |
| 32 #include "v8globals.h" |
32 | 33 |
33 namespace v8 { | 34 namespace v8 { |
34 namespace internal { | 35 namespace internal { |
35 | 36 |
36 // ---------------------------------------------------------------------------- | 37 // ---------------------------------------------------------------------------- |
37 // Static helper functions | 38 // Static helper functions |
38 | 39 |
39 // Generate a MemOperand for loading a field from an object. | 40 // Generate a MemOperand for loading a field from an object. |
40 static inline MemOperand FieldMemOperand(Register object, int offset) { | 41 static inline MemOperand FieldMemOperand(Register object, int offset) { |
41 return MemOperand(object, offset - kHeapObjectTag); | 42 return MemOperand(object, offset - kHeapObjectTag); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 569 |
569 | 570 |
570 // Check if the map of an object is equal to a specified map (either | 571 // Check if the map of an object is equal to a specified map (either |
571 // given directly or as an index into the root list) and branch to | 572 // given directly or as an index into the root list) and branch to |
572 // label if not. Skip the smi check if not required (object is known | 573 // label if not. Skip the smi check if not required (object is known |
573 // to be a heap object) | 574 // to be a heap object) |
574 void CheckMap(Register obj, | 575 void CheckMap(Register obj, |
575 Register scratch, | 576 Register scratch, |
576 Handle<Map> map, | 577 Handle<Map> map, |
577 Label* fail, | 578 Label* fail, |
578 bool is_heap_object); | 579 SmiCheckType smi_check_type); |
579 | 580 |
580 void CheckMap(Register obj, | 581 void CheckMap(Register obj, |
581 Register scratch, | 582 Register scratch, |
582 Heap::RootListIndex index, | 583 Heap::RootListIndex index, |
583 Label* fail, | 584 Label* fail, |
584 bool is_heap_object); | 585 SmiCheckType smi_check_type); |
585 | 586 |
586 | 587 |
587 // Compare the object in a register to a value from the root list. | 588 // Compare the object in a register to a value from the root list. |
588 // Uses the ip register as scratch. | 589 // Uses the ip register as scratch. |
589 void CompareRoot(Register obj, Heap::RootListIndex index); | 590 void CompareRoot(Register obj, Heap::RootListIndex index); |
590 | 591 |
591 | 592 |
592 // Load and check the instance type of an object for being a string. | 593 // Load and check the instance type of an object for being a string. |
593 // Loads the type into the second argument register. | 594 // Loads the type into the second argument register. |
594 // Returns a condition that will be enabled if the object was a string. | 595 // Returns a condition that will be enabled if the object was a string. |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1095 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1095 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1096 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1096 #else | 1097 #else |
1097 #define ACCESS_MASM(masm) masm-> | 1098 #define ACCESS_MASM(masm) masm-> |
1098 #endif | 1099 #endif |
1099 | 1100 |
1100 | 1101 |
1101 } } // namespace v8::internal | 1102 } } // namespace v8::internal |
1102 | 1103 |
1103 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1104 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |