| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Load the global function with the given index. | 136 // Load the global function with the given index. |
| 137 void LoadGlobalFunction(int index, Register function); | 137 void LoadGlobalFunction(int index, Register function); |
| 138 | 138 |
| 139 // Load the initial map from the global function. The registers | 139 // Load the initial map from the global function. The registers |
| 140 // function and map can be the same. | 140 // function and map can be the same. |
| 141 void LoadGlobalFunctionInitialMap(Register function, Register map); | 141 void LoadGlobalFunctionInitialMap(Register function, Register map); |
| 142 | 142 |
| 143 // Push and pop the registers that can hold pointers. | 143 // Push and pop the registers that can hold pointers. |
| 144 void PushSafepointRegisters() { pushad(); } | 144 void PushSafepointRegisters() { pushad(); } |
| 145 void PopSafepointRegisters() { popad(); } | 145 void PopSafepointRegisters() { popad(); } |
| 146 static int SafepointRegisterStackIndex(int reg_code); | 146 // Store the value in register/immediate src in the safepoint |
| 147 // register stack slot for register dst. |
| 148 void StoreToSafepointRegisterSlot(Register dst, Register src); |
| 149 void StoreToSafepointRegisterSlot(Register dst, Immediate src); |
| 150 void LoadFromSafepointRegisterSlot(Register dst, Register src); |
| 147 | 151 |
| 148 // --------------------------------------------------------------------------- | 152 // --------------------------------------------------------------------------- |
| 149 // JavaScript invokes | 153 // JavaScript invokes |
| 150 | 154 |
| 151 // Invoke the JavaScript function code by either calling or jumping. | 155 // Invoke the JavaScript function code by either calling or jumping. |
| 152 void InvokeCode(const Operand& code, | 156 void InvokeCode(const Operand& code, |
| 153 const ParameterCount& expected, | 157 const ParameterCount& expected, |
| 154 const ParameterCount& actual, | 158 const ParameterCount& actual, |
| 155 InvokeFlag flag, | 159 InvokeFlag flag, |
| 156 PostCallGenerator* post_call_generator = NULL); | 160 PostCallGenerator* post_call_generator = NULL); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // --------------------------------------------------------------------------- | 301 // --------------------------------------------------------------------------- |
| 298 // Exception handling | 302 // Exception handling |
| 299 | 303 |
| 300 // Push a new try handler and link into try handler chain. The return | 304 // Push a new try handler and link into try handler chain. The return |
| 301 // address must be pushed before calling this helper. | 305 // address must be pushed before calling this helper. |
| 302 void PushTryHandler(CodeLocation try_location, HandlerType type); | 306 void PushTryHandler(CodeLocation try_location, HandlerType type); |
| 303 | 307 |
| 304 // Unlink the stack handler on top of the stack from the try handler chain. | 308 // Unlink the stack handler on top of the stack from the try handler chain. |
| 305 void PopTryHandler(); | 309 void PopTryHandler(); |
| 306 | 310 |
| 311 // Activate the top handler in the try hander chain. |
| 312 void Throw(Register value); |
| 313 |
| 314 void ThrowUncatchable(UncatchableExceptionType type, Register value); |
| 315 |
| 307 // --------------------------------------------------------------------------- | 316 // --------------------------------------------------------------------------- |
| 308 // Inline caching support | 317 // Inline caching support |
| 309 | 318 |
| 310 // Generate code for checking access rights - used for security checks | 319 // Generate code for checking access rights - used for security checks |
| 311 // on access to global objects across environments. The holder register | 320 // on access to global objects across environments. The holder register |
| 312 // is left untouched, but the scratch register is clobbered. | 321 // is left untouched, but the scratch register is clobbered. |
| 313 void CheckAccessGlobalProxy(Register holder_reg, | 322 void CheckAccessGlobalProxy(Register holder_reg, |
| 314 Register scratch, | 323 Register scratch, |
| 315 Label* miss); | 324 Label* miss); |
| 316 | 325 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 Register scratch, | 664 Register scratch, |
| 656 AllocationFlags flags); | 665 AllocationFlags flags); |
| 657 void UpdateAllocationTopHelper(Register result_end, Register scratch); | 666 void UpdateAllocationTopHelper(Register result_end, Register scratch); |
| 658 | 667 |
| 659 // Helper for PopHandleScope. Allowed to perform a GC and returns | 668 // Helper for PopHandleScope. Allowed to perform a GC and returns |
| 660 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and | 669 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and |
| 661 // possibly returns a failure object indicating an allocation failure. | 670 // possibly returns a failure object indicating an allocation failure. |
| 662 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, | 671 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved, |
| 663 Register scratch, | 672 Register scratch, |
| 664 bool gc_allowed); | 673 bool gc_allowed); |
| 674 |
| 675 |
| 676 // Compute memory operands for safepoint stack slots. |
| 677 Operand SafepointRegisterSlot(Register reg); |
| 678 static int SafepointRegisterStackIndex(int reg_code); |
| 679 |
| 680 // Needs access to SafepointRegisterStackIndex for optimized frame |
| 681 // traversal. |
| 682 friend class OptimizedFrame; |
| 665 }; | 683 }; |
| 666 | 684 |
| 667 | 685 |
| 668 template <typename LabelType> | 686 template <typename LabelType> |
| 669 void MacroAssembler::InNewSpace(Register object, | 687 void MacroAssembler::InNewSpace(Register object, |
| 670 Register scratch, | 688 Register scratch, |
| 671 Condition cc, | 689 Condition cc, |
| 672 LabelType* branch) { | 690 LabelType* branch) { |
| 673 ASSERT(cc == equal || cc == not_equal); | 691 ASSERT(cc == equal || cc == not_equal); |
| 674 if (Serializer::enabled()) { | 692 if (Serializer::enabled()) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 } \ | 789 } \ |
| 772 masm-> | 790 masm-> |
| 773 #else | 791 #else |
| 774 #define ACCESS_MASM(masm) masm-> | 792 #define ACCESS_MASM(masm) masm-> |
| 775 #endif | 793 #endif |
| 776 | 794 |
| 777 | 795 |
| 778 } } // namespace v8::internal | 796 } } // namespace v8::internal |
| 779 | 797 |
| 780 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 798 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |