| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  519   holder_ = receiver; |  519   holder_ = receiver; | 
|  520  |  520  | 
|  521   PropertyDetails details(attributes, ACCESSOR_CONSTANT, 0, |  521   PropertyDetails details(attributes, ACCESSOR_CONSTANT, 0, | 
|  522                           PropertyCellType::kMutable); |  522                           PropertyCellType::kMutable); | 
|  523  |  523  | 
|  524   if (IsElement()) { |  524   if (IsElement()) { | 
|  525     // TODO(verwaest): Move code into the element accessor. |  525     // TODO(verwaest): Move code into the element accessor. | 
|  526     Handle<SeededNumberDictionary> dictionary = |  526     Handle<SeededNumberDictionary> dictionary = | 
|  527         JSObject::NormalizeElements(receiver); |  527         JSObject::NormalizeElements(receiver); | 
|  528  |  528  | 
|  529     // We unconditionally pass used_as_prototype=false here because the call |  529     dictionary = SeededNumberDictionary::Set(dictionary, index_, pair, details, | 
|  530     // to RequireSlowElements takes care of the required IC clearing and |  530                                              receiver); | 
|  531     // we don't want to walk the heap twice. |  | 
|  532     dictionary = |  | 
|  533         SeededNumberDictionary::Set(dictionary, index_, pair, details, false); |  | 
|  534     receiver->RequireSlowElements(*dictionary); |  531     receiver->RequireSlowElements(*dictionary); | 
|  535  |  532  | 
|  536     if (receiver->HasSlowArgumentsElements()) { |  533     if (receiver->HasSlowArgumentsElements()) { | 
|  537       FixedArray* parameter_map = FixedArray::cast(receiver->elements()); |  534       FixedArray* parameter_map = FixedArray::cast(receiver->elements()); | 
|  538       uint32_t length = parameter_map->length() - 2; |  535       uint32_t length = parameter_map->length() - 2; | 
|  539       if (number_ < length) { |  536       if (number_ < length) { | 
|  540         parameter_map->set(number_ + 2, heap()->the_hole_value()); |  537         parameter_map->set(number_ + 2, heap()->the_hole_value()); | 
|  541       } |  538       } | 
|  542       FixedArray::cast(receiver->elements())->set(1, *dictionary); |  539       FixedArray::cast(receiver->elements())->set(1, *dictionary); | 
|  543     } else { |  540     } else { | 
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  873  |  870  | 
|  874   // We have found a cached property! Modify the iterator accordingly. |  871   // We have found a cached property! Modify the iterator accordingly. | 
|  875   name_ = maybe_name.ToHandleChecked(); |  872   name_ = maybe_name.ToHandleChecked(); | 
|  876   Restart(); |  873   Restart(); | 
|  877   CHECK_EQ(state(), LookupIterator::DATA); |  874   CHECK_EQ(state(), LookupIterator::DATA); | 
|  878   return true; |  875   return true; | 
|  879 } |  876 } | 
|  880  |  877  | 
|  881 }  // namespace internal |  878 }  // namespace internal | 
|  882 }  // namespace v8 |  879 }  // namespace v8 | 
| OLD | NEW |