| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // transitioned_kind from the native context if the map in register | 255 // transitioned_kind from the native context if the map in register |
| 256 // map_in_out is the cached Array map in the native context of | 256 // map_in_out is the cached Array map in the native context of |
| 257 // expected_kind. | 257 // expected_kind. |
| 258 void LoadTransitionedArrayMapConditional( | 258 void LoadTransitionedArrayMapConditional( |
| 259 ElementsKind expected_kind, | 259 ElementsKind expected_kind, |
| 260 ElementsKind transitioned_kind, | 260 ElementsKind transitioned_kind, |
| 261 Register map_in_out, | 261 Register map_in_out, |
| 262 Register scratch, | 262 Register scratch, |
| 263 Label* no_map_match); | 263 Label* no_map_match); |
| 264 | 264 |
| 265 // Load the initial map for new Arrays from a JSFunction. | |
| 266 void LoadInitialArrayMap(Register function_in, | |
| 267 Register scratch, | |
| 268 Register map_out, | |
| 269 bool can_have_holes); | |
| 270 | |
| 271 void LoadGlobalContext(Register global_context); | |
| 272 | |
| 273 // Load the global function with the given index. | 265 // Load the global function with the given index. |
| 274 void LoadGlobalFunction(int index, Register function); | 266 void LoadGlobalFunction(int index, Register function); |
| 275 | 267 |
| 276 // Load the initial map from the global function. The registers | 268 // Load the initial map from the global function. The registers |
| 277 // function and map can be the same. | 269 // function and map can be the same. |
| 278 void LoadGlobalFunctionInitialMap(Register function, Register map); | 270 void LoadGlobalFunctionInitialMap(Register function, Register map); |
| 279 | 271 |
| 280 // Push and pop the registers that can hold pointers. | 272 // Push and pop the registers that can hold pointers. |
| 281 void PushSafepointRegisters() { pushad(); } | 273 void PushSafepointRegisters() { pushad(); } |
| 282 void PopSafepointRegisters() { popad(); } | 274 void PopSafepointRegisters() { popad(); } |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 // space for return value if needed (assumes the return value is a handle). | 800 // space for return value if needed (assumes the return value is a handle). |
| 809 // Arguments must be stored in ApiParameterOperand(0), ApiParameterOperand(1) | 801 // Arguments must be stored in ApiParameterOperand(0), ApiParameterOperand(1) |
| 810 // etc. Saves context (esi). If space was reserved for return value then | 802 // etc. Saves context (esi). If space was reserved for return value then |
| 811 // stores the pointer to the reserved slot into esi. | 803 // stores the pointer to the reserved slot into esi. |
| 812 void PrepareCallApiFunction(int argc); | 804 void PrepareCallApiFunction(int argc); |
| 813 | 805 |
| 814 // Calls an API function. Allocates HandleScope, extracts returned value | 806 // Calls an API function. Allocates HandleScope, extracts returned value |
| 815 // from handle and propagates exceptions. Clobbers ebx, edi and | 807 // from handle and propagates exceptions. Clobbers ebx, edi and |
| 816 // caller-save registers. Restores context. On return removes | 808 // caller-save registers. Restores context. On return removes |
| 817 // stack_space * kPointerSize (GCed). | 809 // stack_space * kPointerSize (GCed). |
| 818 void CallApiFunctionAndReturn(Address function_address, | 810 void CallApiFunctionAndReturn(Register function_address, |
| 819 Address thunk_address, | 811 Address thunk_address, |
| 820 Operand thunk_last_arg, | 812 Operand thunk_last_arg, |
| 821 int stack_space, | 813 int stack_space, |
| 822 Operand return_value_operand, | 814 Operand return_value_operand, |
| 823 Operand* context_restore_operand); | 815 Operand* context_restore_operand); |
| 824 | 816 |
| 825 // Jump to a runtime routine. | 817 // Jump to a runtime routine. |
| 826 void JumpToExternalReference(const ExternalReference& ext); | 818 void JumpToExternalReference(const ExternalReference& ext); |
| 827 | 819 |
| 828 // --------------------------------------------------------------------------- | 820 // --------------------------------------------------------------------------- |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 | 1067 |
| 1076 // Generate an Operand for loading an indexed field from an object. | 1068 // Generate an Operand for loading an indexed field from an object. |
| 1077 inline Operand FieldOperand(Register object, | 1069 inline Operand FieldOperand(Register object, |
| 1078 Register index, | 1070 Register index, |
| 1079 ScaleFactor scale, | 1071 ScaleFactor scale, |
| 1080 int offset) { | 1072 int offset) { |
| 1081 return Operand(object, index, scale, offset - kHeapObjectTag); | 1073 return Operand(object, index, scale, offset - kHeapObjectTag); |
| 1082 } | 1074 } |
| 1083 | 1075 |
| 1084 | 1076 |
| 1077 inline Operand FixedArrayElementOperand(Register array, |
| 1078 Register index_as_smi, |
| 1079 int additional_offset = 0) { |
| 1080 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
| 1081 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
| 1082 } |
| 1083 |
| 1084 |
| 1085 inline Operand ContextOperand(Register context, int index) { | 1085 inline Operand ContextOperand(Register context, int index) { |
| 1086 return Operand(context, Context::SlotOffset(index)); | 1086 return Operand(context, Context::SlotOffset(index)); |
| 1087 } | 1087 } |
| 1088 | 1088 |
| 1089 | 1089 |
| 1090 inline Operand GlobalObjectOperand() { | 1090 inline Operand GlobalObjectOperand() { |
| 1091 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); | 1091 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 | 1094 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1114 } \ | 1114 } \ |
| 1115 masm-> | 1115 masm-> |
| 1116 #else | 1116 #else |
| 1117 #define ACCESS_MASM(masm) masm-> | 1117 #define ACCESS_MASM(masm) masm-> |
| 1118 #endif | 1118 #endif |
| 1119 | 1119 |
| 1120 | 1120 |
| 1121 } } // namespace v8::internal | 1121 } } // namespace v8::internal |
| 1122 | 1122 |
| 1123 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1123 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |