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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 void AbortIfNotString(Register object); | 926 void AbortIfNotString(Register object); |
927 | 927 |
928 // Abort execution if argument is not the root value with the given index. | 928 // Abort execution if argument is not the root value with the given index. |
929 void AbortIfNotRootValue(Register src, | 929 void AbortIfNotRootValue(Register src, |
930 Heap::RootListIndex root_value_index, | 930 Heap::RootListIndex root_value_index, |
931 const char* message); | 931 const char* message); |
932 | 932 |
933 // --------------------------------------------------------------------------- | 933 // --------------------------------------------------------------------------- |
934 // Exception handling | 934 // Exception handling |
935 | 935 |
936 // Push a new try handler and link into try handler chain. The return | 936 // Push a new try handler and link it into try handler chain. |
937 // address must be pushed before calling this helper. | 937 void PushTryHandler(CodeLocation try_location, |
938 void PushTryHandler(CodeLocation try_location, HandlerType type); | 938 HandlerType type, |
| 939 int handler_index); |
939 | 940 |
940 // Unlink the stack handler on top of the stack from the try handler chain. | 941 // Unlink the stack handler on top of the stack from the try handler chain. |
941 void PopTryHandler(); | 942 void PopTryHandler(); |
942 | 943 |
943 // Activate the top handler in the try hander chain and pass the | 944 // Activate the top handler in the try hander chain and pass the |
944 // thrown value. | 945 // thrown value. |
945 void Throw(Register value); | 946 void Throw(Register value); |
946 | 947 |
947 // Propagate an uncatchable exception out of the current JS stack. | 948 // Propagate an uncatchable exception out of the current JS stack. |
948 void ThrowUncatchable(UncatchableExceptionType type, Register value); | 949 void ThrowUncatchable(UncatchableExceptionType type, Register value); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 Label::Distance distance = Label::kFar); | 1320 Label::Distance distance = Label::kFar); |
1320 | 1321 |
1321 // Helper for finding the mark bits for an address. Afterwards, the | 1322 // Helper for finding the mark bits for an address. Afterwards, the |
1322 // bitmap register points at the word with the mark bits and the mask | 1323 // bitmap register points at the word with the mark bits and the mask |
1323 // the position of the first bit. Uses rcx as scratch and leaves addr_reg | 1324 // the position of the first bit. Uses rcx as scratch and leaves addr_reg |
1324 // unchanged. | 1325 // unchanged. |
1325 inline void GetMarkBits(Register addr_reg, | 1326 inline void GetMarkBits(Register addr_reg, |
1326 Register bitmap_reg, | 1327 Register bitmap_reg, |
1327 Register mask_reg); | 1328 Register mask_reg); |
1328 | 1329 |
| 1330 // Helper for throwing exceptions. Compute a handler address and jump to |
| 1331 // it. See the implementation for register usage. |
| 1332 void JumpToHandlerEntry(); |
| 1333 |
1329 // Compute memory operands for safepoint stack slots. | 1334 // Compute memory operands for safepoint stack slots. |
1330 Operand SafepointRegisterSlot(Register reg); | 1335 Operand SafepointRegisterSlot(Register reg); |
1331 static int SafepointRegisterStackIndex(int reg_code) { | 1336 static int SafepointRegisterStackIndex(int reg_code) { |
1332 return kNumSafepointRegisters - kSafepointPushRegisterIndices[reg_code] - 1; | 1337 return kNumSafepointRegisters - kSafepointPushRegisterIndices[reg_code] - 1; |
1333 } | 1338 } |
1334 | 1339 |
1335 // Needs access to SafepointRegisterStackIndex for optimized frame | 1340 // Needs access to SafepointRegisterStackIndex for optimized frame |
1336 // traversal. | 1341 // traversal. |
1337 friend class OptimizedFrame; | 1342 friend class OptimizedFrame; |
1338 }; | 1343 }; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 masm->popfd(); \ | 1420 masm->popfd(); \ |
1416 } \ | 1421 } \ |
1417 masm-> | 1422 masm-> |
1418 #else | 1423 #else |
1419 #define ACCESS_MASM(masm) masm-> | 1424 #define ACCESS_MASM(masm) masm-> |
1420 #endif | 1425 #endif |
1421 | 1426 |
1422 } } // namespace v8::internal | 1427 } } // namespace v8::internal |
1423 | 1428 |
1424 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1429 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |