| 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/lookup.h" | 5 #include "src/lookup.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/elements.h" | 9 #include "src/elements.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 if (!*success) { | 31 if (!*success) { |
| 32 DCHECK(isolate->has_pending_exception()); | 32 DCHECK(isolate->has_pending_exception()); |
| 33 // Return an unusable dummy. | 33 // Return an unusable dummy. |
| 34 return LookupIterator(receiver, isolate->factory()->empty_string()); | 34 return LookupIterator(receiver, isolate->factory()->empty_string()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 if (name->AsArrayIndex(&index)) { | 37 if (name->AsArrayIndex(&index)) { |
| 38 LookupIterator it(isolate, receiver, index, configuration); | 38 LookupIterator it(isolate, receiver, index, configuration); |
| 39 // Here we try to avoid having to rebuild the string later | 39 // Here we try to avoid having to rebuild the string later |
| 40 // by storing it on the indexed LookupIterator. | 40 // by storing it on the indexed LookupIterator. |
| 41 it.name_ = isolate->factory()->InternalizeName(name); | 41 it.name_ = name; |
| 42 return it; | 42 return it; |
| 43 } | 43 } |
| 44 | 44 |
| 45 return LookupIterator(receiver, name, configuration); | 45 return LookupIterator(receiver, name, configuration); |
| 46 } | 46 } |
| 47 | 47 |
| 48 | 48 |
| 49 void LookupIterator::Next() { | 49 void LookupIterator::Next() { |
| 50 DCHECK_NE(JSPROXY, state_); | 50 DCHECK_NE(JSPROXY, state_); |
| 51 DCHECK_NE(TRANSITION, state_); | 51 DCHECK_NE(TRANSITION, state_); |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 // Fall through. | 674 // Fall through. |
| 675 default: | 675 default: |
| 676 return NOT_FOUND; | 676 return NOT_FOUND; |
| 677 } | 677 } |
| 678 UNREACHABLE(); | 678 UNREACHABLE(); |
| 679 return state_; | 679 return state_; |
| 680 } | 680 } |
| 681 | 681 |
| 682 } // namespace internal | 682 } // namespace internal |
| 683 } // namespace v8 | 683 } // namespace v8 |
| OLD | NEW |