OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/lookup.h" | 9 #include "src/lookup.h" |
10 #include "src/lookup-inl.h" | 10 #include "src/lookup-inl.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 DCHECK(exotic_index_state_ != ExoticIndexState::kNoIndex); | 357 DCHECK(exotic_index_state_ != ExoticIndexState::kNoIndex); |
358 // Currently typed arrays are the only such objects. | 358 // Currently typed arrays are the only such objects. |
359 if (!holder->IsJSTypedArray()) return false; | 359 if (!holder->IsJSTypedArray()) return false; |
360 if (exotic_index_state_ == ExoticIndexState::kIndex) return true; | 360 if (exotic_index_state_ == ExoticIndexState::kIndex) return true; |
361 DCHECK(exotic_index_state_ == ExoticIndexState::kUninitialized); | 361 DCHECK(exotic_index_state_ == ExoticIndexState::kUninitialized); |
362 bool result = false; | 362 bool result = false; |
363 // Compute and cache result. | 363 // Compute and cache result. |
364 if (name()->IsString()) { | 364 if (name()->IsString()) { |
365 Handle<String> name_string = Handle<String>::cast(name()); | 365 Handle<String> name_string = Handle<String>::cast(name()); |
366 if (name_string->length() != 0) { | 366 if (name_string->length() != 0) { |
367 result = IsNonArrayIndexInteger(*name_string); | 367 result = IsSpecialIndex(isolate_->unicode_cache(), *name_string); |
368 } | 368 } |
369 } | 369 } |
370 exotic_index_state_ = | 370 exotic_index_state_ = |
371 result ? ExoticIndexState::kIndex : ExoticIndexState::kNoIndex; | 371 result ? ExoticIndexState::kIndex : ExoticIndexState::kNoIndex; |
372 return result; | 372 return result; |
373 } | 373 } |
374 | 374 |
375 | 375 |
376 void LookupIterator::InternalizeName() { | 376 void LookupIterator::InternalizeName() { |
377 if (name_->IsUniqueName()) return; | 377 if (name_->IsUniqueName()) return; |
(...skipping 11 matching lines...) Expand all Loading... |
389 // Fall through. | 389 // Fall through. |
390 case InterceptorState::kSkipNonMasking: | 390 case InterceptorState::kSkipNonMasking: |
391 return true; | 391 return true; |
392 case InterceptorState::kProcessNonMasking: | 392 case InterceptorState::kProcessNonMasking: |
393 return false; | 393 return false; |
394 } | 394 } |
395 } | 395 } |
396 return interceptor_state_ == InterceptorState::kProcessNonMasking; | 396 return interceptor_state_ == InterceptorState::kProcessNonMasking; |
397 } | 397 } |
398 } } // namespace v8::internal | 398 } } // namespace v8::internal |
OLD | NEW |