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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // CodeForSourcePosition | 73 // CodeForSourcePosition |
74 | 74 |
75 | 75 |
76 // Mode to overwrite BinaryExpression values. | 76 // Mode to overwrite BinaryExpression values. |
77 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT }; | 77 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT }; |
78 enum UnaryOverwriteMode { UNARY_OVERWRITE, UNARY_NO_OVERWRITE }; | 78 enum UnaryOverwriteMode { UNARY_OVERWRITE, UNARY_NO_OVERWRITE }; |
79 | 79 |
80 // Types of uncatchable exceptions. | 80 // Types of uncatchable exceptions. |
81 enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION }; | 81 enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION }; |
82 | 82 |
83 | |
84 #if V8_TARGET_ARCH_IA32 | |
85 #include "ia32/codegen-ia32.h" | |
86 #elif V8_TARGET_ARCH_X64 | |
87 #include "x64/codegen-x64.h" | |
88 #elif V8_TARGET_ARCH_ARM | |
89 #include "arm/codegen-arm.h" | |
90 #elif V8_TARGET_ARCH_MIPS | |
91 #include "mips/codegen-mips.h" | |
92 #else | |
93 #error Unsupported target architecture. | |
94 #endif | |
95 | |
96 #include "register-allocator.h" | |
97 | |
98 namespace v8 { | |
99 namespace internal { | |
100 | |
101 | |
102 #define INLINE_RUNTIME_FUNCTION_LIST(F) \ | 83 #define INLINE_RUNTIME_FUNCTION_LIST(F) \ |
103 F(IsSmi, 1, 1) \ | 84 F(IsSmi, 1, 1) \ |
104 F(IsNonNegativeSmi, 1, 1) \ | 85 F(IsNonNegativeSmi, 1, 1) \ |
105 F(IsArray, 1, 1) \ | 86 F(IsArray, 1, 1) \ |
106 F(IsRegExp, 1, 1) \ | 87 F(IsRegExp, 1, 1) \ |
107 F(CallFunction, -1 /* receiver + n args + function */, 1) \ | 88 F(CallFunction, -1 /* receiver + n args + function */, 1) \ |
108 F(IsConstructCall, 0, 1) \ | 89 F(IsConstructCall, 0, 1) \ |
109 F(ArgumentsLength, 0, 1) \ | 90 F(ArgumentsLength, 0, 1) \ |
110 F(Arguments, 1, 1) \ | 91 F(Arguments, 1, 1) \ |
111 F(ClassOf, 1, 1) \ | 92 F(ClassOf, 1, 1) \ |
(...skipping 13 matching lines...) Expand all Loading... |
125 F(SubString, 3, 1) \ | 106 F(SubString, 3, 1) \ |
126 F(StringCompare, 2, 1) \ | 107 F(StringCompare, 2, 1) \ |
127 F(RegExpExec, 4, 1) \ | 108 F(RegExpExec, 4, 1) \ |
128 F(RegExpConstructResult, 3, 1) \ | 109 F(RegExpConstructResult, 3, 1) \ |
129 F(GetFromCache, 2, 1) \ | 110 F(GetFromCache, 2, 1) \ |
130 F(NumberToString, 1, 1) \ | 111 F(NumberToString, 1, 1) \ |
131 F(SwapElements, 3, 1) \ | 112 F(SwapElements, 3, 1) \ |
132 F(MathPow, 2, 1) \ | 113 F(MathPow, 2, 1) \ |
133 F(MathSin, 1, 1) \ | 114 F(MathSin, 1, 1) \ |
134 F(MathCos, 1, 1) \ | 115 F(MathCos, 1, 1) \ |
135 F(MathSqrt, 1, 1) | 116 F(MathSqrt, 1, 1) \ |
| 117 F(IsRegExpEquivalent, 2, 1) |
136 | 118 |
137 | 119 |
| 120 #if V8_TARGET_ARCH_IA32 |
| 121 #include "ia32/codegen-ia32.h" |
| 122 #elif V8_TARGET_ARCH_X64 |
| 123 #include "x64/codegen-x64.h" |
| 124 #elif V8_TARGET_ARCH_ARM |
| 125 #include "arm/codegen-arm.h" |
| 126 #elif V8_TARGET_ARCH_MIPS |
| 127 #include "mips/codegen-mips.h" |
| 128 #else |
| 129 #error Unsupported target architecture. |
| 130 #endif |
| 131 |
| 132 #include "register-allocator.h" |
| 133 |
| 134 namespace v8 { |
| 135 namespace internal { |
| 136 |
138 // Support for "structured" code comments. | 137 // Support for "structured" code comments. |
139 #ifdef DEBUG | 138 #ifdef DEBUG |
140 | 139 |
141 class Comment BASE_EMBEDDED { | 140 class Comment BASE_EMBEDDED { |
142 public: | 141 public: |
143 Comment(MacroAssembler* masm, const char* msg); | 142 Comment(MacroAssembler* masm, const char* msg); |
144 ~Comment(); | 143 ~Comment(); |
145 | 144 |
146 private: | 145 private: |
147 MacroAssembler* masm_; | 146 MacroAssembler* masm_; |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 StringCharFromCodeGenerator char_from_code_generator_; | 887 StringCharFromCodeGenerator char_from_code_generator_; |
889 | 888 |
890 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 889 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
891 }; | 890 }; |
892 | 891 |
893 | 892 |
894 } // namespace internal | 893 } // namespace internal |
895 } // namespace v8 | 894 } // namespace v8 |
896 | 895 |
897 #endif // V8_CODEGEN_H_ | 896 #endif // V8_CODEGEN_H_ |
OLD | NEW |