OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 10 matching lines...) Expand all Loading... |
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
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_MACRO_ASSEMBLER_H_ | 28 #ifndef V8_MACRO_ASSEMBLER_H_ |
29 #define V8_MACRO_ASSEMBLER_H_ | 29 #define V8_MACRO_ASSEMBLER_H_ |
30 | 30 |
| 31 |
| 32 // Helper types to make boolean flag easier to read at call-site. |
| 33 enum InvokeFlag { |
| 34 CALL_FUNCTION, |
| 35 JUMP_FUNCTION |
| 36 }; |
| 37 |
| 38 |
| 39 enum CodeLocation { |
| 40 IN_JAVASCRIPT, |
| 41 IN_JS_ENTRY, |
| 42 IN_C_ENTRY |
| 43 }; |
| 44 |
| 45 |
| 46 enum HandlerType { |
| 47 TRY_CATCH_HANDLER, |
| 48 TRY_FINALLY_HANDLER, |
| 49 JS_ENTRY_HANDLER |
| 50 }; |
| 51 |
| 52 |
| 53 // Flags used for the AllocateObjectInNewSpace functions. |
| 54 enum AllocationFlags { |
| 55 // No special flags. |
| 56 NO_ALLOCATION_FLAGS = 0, |
| 57 // Return the pointer to the allocated already tagged as a heap object. |
| 58 TAG_OBJECT = 1 << 0, |
| 59 // The content of the result register already contains the allocation top in |
| 60 // new space. |
| 61 RESULT_CONTAINS_TOP = 1 << 1 |
| 62 }; |
| 63 |
| 64 |
31 #if V8_TARGET_ARCH_IA32 | 65 #if V8_TARGET_ARCH_IA32 |
32 #include "assembler.h" | 66 #include "assembler.h" |
33 #include "ia32/assembler-ia32.h" | 67 #include "ia32/assembler-ia32.h" |
34 #include "ia32/assembler-ia32-inl.h" | 68 #include "ia32/assembler-ia32-inl.h" |
35 #include "code.h" // must be after assembler_*.h | 69 #include "code.h" // must be after assembler_*.h |
36 #include "ia32/macro-assembler-ia32.h" | 70 #include "ia32/macro-assembler-ia32.h" |
37 #elif V8_TARGET_ARCH_X64 | 71 #elif V8_TARGET_ARCH_X64 |
38 #include "assembler.h" | 72 #include "assembler.h" |
39 #include "x64/assembler-x64.h" | 73 #include "x64/assembler-x64.h" |
40 #include "x64/assembler-x64-inl.h" | 74 #include "x64/assembler-x64-inl.h" |
41 #include "code.h" // must be after assembler_*.h | 75 #include "code.h" // must be after assembler_*.h |
42 #include "x64/macro-assembler-x64.h" | 76 #include "x64/macro-assembler-x64.h" |
43 #elif V8_TARGET_ARCH_ARM | 77 #elif V8_TARGET_ARCH_ARM |
44 #include "arm/constants-arm.h" | 78 #include "arm/constants-arm.h" |
45 #include "assembler.h" | 79 #include "assembler.h" |
46 #include "arm/assembler-arm.h" | 80 #include "arm/assembler-arm.h" |
47 #include "arm/assembler-arm-inl.h" | 81 #include "arm/assembler-arm-inl.h" |
48 #include "code.h" // must be after assembler_*.h | 82 #include "code.h" // must be after assembler_*.h |
49 #include "arm/macro-assembler-arm.h" | 83 #include "arm/macro-assembler-arm.h" |
50 #else | 84 #else |
51 #error Unsupported target architecture. | 85 #error Unsupported target architecture. |
52 #endif | 86 #endif |
53 | 87 |
54 #endif // V8_MACRO_ASSEMBLER_H_ | 88 #endif // V8_MACRO_ASSEMBLER_H_ |
OLD | NEW |