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 27 matching lines...) Expand all Loading... |
38 enum AllocationFlags { | 38 enum AllocationFlags { |
39 // No special flags. | 39 // No special flags. |
40 NO_ALLOCATION_FLAGS = 0, | 40 NO_ALLOCATION_FLAGS = 0, |
41 // Return the pointer to the allocated already tagged as a heap object. | 41 // Return the pointer to the allocated already tagged as a heap object. |
42 TAG_OBJECT = 1 << 0, | 42 TAG_OBJECT = 1 << 0, |
43 // The content of the result register already contains the allocation top in | 43 // The content of the result register already contains the allocation top in |
44 // new space. | 44 // new space. |
45 RESULT_CONTAINS_TOP = 1 << 1 | 45 RESULT_CONTAINS_TOP = 1 << 1 |
46 }; | 46 }; |
47 | 47 |
| 48 |
48 // Convenience for platform-independent signatures. We do not normally | 49 // Convenience for platform-independent signatures. We do not normally |
49 // distinguish memory operands from other operands on ia32. | 50 // distinguish memory operands from other operands on ia32. |
50 typedef Operand MemOperand; | 51 typedef Operand MemOperand; |
51 | 52 |
52 // MacroAssembler implements a collection of frequently used macros. | 53 // MacroAssembler implements a collection of frequently used macros. |
53 class MacroAssembler: public Assembler { | 54 class MacroAssembler: public Assembler { |
54 public: | 55 public: |
55 // The isolate parameter can be NULL if the macro assembler should | 56 // The isolate parameter can be NULL if the macro assembler should |
56 // not use isolate-dependent functionality. In this case, it's the | 57 // not use isolate-dependent functionality. In this case, it's the |
57 // responsibility of the caller to never invoke such function on the | 58 // responsibility of the caller to never invoke such function on the |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 void SafeSet(Register dst, const Immediate& x); | 200 void SafeSet(Register dst, const Immediate& x); |
200 void SafePush(const Immediate& x); | 201 void SafePush(const Immediate& x); |
201 | 202 |
202 // Compare object type for heap object. | 203 // Compare object type for heap object. |
203 // Incoming register is heap_object and outgoing register is map. | 204 // Incoming register is heap_object and outgoing register is map. |
204 void CmpObjectType(Register heap_object, InstanceType type, Register map); | 205 void CmpObjectType(Register heap_object, InstanceType type, Register map); |
205 | 206 |
206 // Compare instance type for map. | 207 // Compare instance type for map. |
207 void CmpInstanceType(Register map, InstanceType type); | 208 void CmpInstanceType(Register map, InstanceType type); |
208 | 209 |
209 // Check if the map of an object is equal to a specified map and | 210 // Check if the map of an object is equal to a specified map and branch to |
210 // branch to label if not. Skip the smi check if not required | 211 // label if not. Skip the smi check if not required (object is known to be a |
211 // (object is known to be a heap object) | 212 // heap object) |
212 void CheckMap(Register obj, | 213 void CheckMap(Register obj, |
213 Handle<Map> map, | 214 Handle<Map> map, |
214 Label* fail, | 215 Label* fail, |
215 SmiCheckType smi_check_type); | 216 SmiCheckType smi_check_type); |
216 | 217 |
| 218 // Check if the map of an object is equal to a specified map and branch to a |
| 219 // specified target if equal. Skip the smi check if not required (object is |
| 220 // known to be a heap object) |
| 221 void DispatchMap(Register obj, |
| 222 Handle<Map> map, |
| 223 Handle<Code> success, |
| 224 SmiCheckType smi_check_type); |
| 225 |
217 // Check if the object in register heap_object is a string. Afterwards the | 226 // Check if the object in register heap_object is a string. Afterwards the |
218 // register map contains the object map and the register instance_type | 227 // register map contains the object map and the register instance_type |
219 // contains the instance_type. The registers map and instance_type can be the | 228 // contains the instance_type. The registers map and instance_type can be the |
220 // same in which case it contains the instance type afterwards. Either of the | 229 // same in which case it contains the instance type afterwards. Either of the |
221 // registers map and instance_type can be the same as heap_object. | 230 // registers map and instance_type can be the same as heap_object. |
222 Condition IsObjectStringType(Register heap_object, | 231 Condition IsObjectStringType(Register heap_object, |
223 Register map, | 232 Register map, |
224 Register instance_type); | 233 Register instance_type); |
225 | 234 |
226 // Check if a heap object's type is in the JSObject range, not including | 235 // Check if a heap object's type is in the JSObject range, not including |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 } \ | 755 } \ |
747 masm-> | 756 masm-> |
748 #else | 757 #else |
749 #define ACCESS_MASM(masm) masm-> | 758 #define ACCESS_MASM(masm) masm-> |
750 #endif | 759 #endif |
751 | 760 |
752 | 761 |
753 } } // namespace v8::internal | 762 } } // namespace v8::internal |
754 | 763 |
755 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 764 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |