OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "allocation-site-scopes.h" | 8 #include "allocation-site-scopes.h" |
9 #include "api.h" | 9 #include "api.h" |
10 #include "arguments.h" | 10 #include "arguments.h" |
(...skipping 14178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14189 counter++; | 14189 counter++; |
14190 } | 14190 } |
14191 } | 14191 } |
14192 ASSERT(!storage || storage->length() >= counter); | 14192 ASSERT(!storage || storage->length() >= counter); |
14193 break; | 14193 break; |
14194 } | 14194 } |
14195 case FAST_DOUBLE_ELEMENTS: | 14195 case FAST_DOUBLE_ELEMENTS: |
14196 case FAST_HOLEY_DOUBLE_ELEMENTS: { | 14196 case FAST_HOLEY_DOUBLE_ELEMENTS: { |
14197 int length = IsJSArray() ? | 14197 int length = IsJSArray() ? |
14198 Smi::cast(JSArray::cast(this)->length())->value() : | 14198 Smi::cast(JSArray::cast(this)->length())->value() : |
14199 FixedDoubleArray::cast(elements())->length(); | 14199 FixedArrayBase::cast(elements())->length(); |
14200 for (int i = 0; i < length; i++) { | 14200 for (int i = 0; i < length; i++) { |
14201 if (!FixedDoubleArray::cast(elements())->is_the_hole(i)) { | 14201 if (!FixedDoubleArray::cast(elements())->is_the_hole(i)) { |
14202 if (storage != NULL) { | 14202 if (storage != NULL) { |
14203 storage->set(counter, Smi::FromInt(i)); | 14203 storage->set(counter, Smi::FromInt(i)); |
14204 } | 14204 } |
14205 counter++; | 14205 counter++; |
14206 } | 14206 } |
14207 } | 14207 } |
14208 ASSERT(!storage || storage->length() >= counter); | 14208 ASSERT(!storage || storage->length() >= counter); |
14209 break; | 14209 break; |
(...skipping 3037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17247 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17247 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17248 static const char* error_messages_[] = { | 17248 static const char* error_messages_[] = { |
17249 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17249 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17250 }; | 17250 }; |
17251 #undef ERROR_MESSAGES_TEXTS | 17251 #undef ERROR_MESSAGES_TEXTS |
17252 return error_messages_[reason]; | 17252 return error_messages_[reason]; |
17253 } | 17253 } |
17254 | 17254 |
17255 | 17255 |
17256 } } // namespace v8::internal | 17256 } } // namespace v8::internal |
OLD | NEW |