OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 current_char, \ | 123 current_char, \ |
124 BC_##name##_LENGTH, \ | 124 BC_##name##_LENGTH, \ |
125 #name); | 125 #name); |
126 #else | 126 #else |
127 #define BYTECODE(name) \ | 127 #define BYTECODE(name) \ |
128 case BC_##name: | 128 case BC_##name: |
129 #endif | 129 #endif |
130 | 130 |
131 | 131 |
132 static int32_t Load32Aligned(const byte* pc) { | 132 static int32_t Load32Aligned(const byte* pc) { |
133 ASSERT((reinterpret_cast<int>(pc) & 3) == 0); | 133 ASSERT((reinterpret_cast<intptr_t>(pc) & 3) == 0); |
134 return *reinterpret_cast<const int32_t *>(pc); | 134 return *reinterpret_cast<const int32_t *>(pc); |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 static int32_t Load16Aligned(const byte* pc) { | 138 static int32_t Load16Aligned(const byte* pc) { |
139 ASSERT((reinterpret_cast<int>(pc) & 1) == 0); | 139 ASSERT((reinterpret_cast<intptr_t>(pc) & 1) == 0); |
140 return *reinterpret_cast<const uint16_t *>(pc); | 140 return *reinterpret_cast<const uint16_t *>(pc); |
141 } | 141 } |
142 | 142 |
143 | 143 |
144 template <typename Char> | 144 template <typename Char> |
145 static bool RawMatch(const byte* code_base, | 145 static bool RawMatch(const byte* code_base, |
146 Vector<const Char> subject, | 146 Vector<const Char> subject, |
147 int* registers, | 147 int* registers, |
148 int current, | 148 int current, |
149 uint32_t current_char) { | 149 uint32_t current_char) { |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 if (start_position != 0) previous_char = subject_vector[start_position - 1]; | 587 if (start_position != 0) previous_char = subject_vector[start_position - 1]; |
588 return RawMatch(code_base, | 588 return RawMatch(code_base, |
589 subject_vector, | 589 subject_vector, |
590 registers, | 590 registers, |
591 start_position, | 591 start_position, |
592 previous_char); | 592 previous_char); |
593 } | 593 } |
594 } | 594 } |
595 | 595 |
596 } } // namespace v8::internal | 596 } } // namespace v8::internal |
OLD | NEW |