OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/conversions.h" | 8 #include "src/conversions.h" |
9 #include "src/elements.h" | 9 #include "src/elements.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1394 isolate); | 1394 isolate); |
1395 bool is_arguments = | 1395 bool is_arguments = |
1396 (obj->GetElementsKind() == SLOPPY_ARGUMENTS_ELEMENTS); | 1396 (obj->GetElementsKind() == SLOPPY_ARGUMENTS_ELEMENTS); |
1397 if (is_arguments) { | 1397 if (is_arguments) { |
1398 backing_store = handle(FixedArray::cast(backing_store->get(1)), isolate); | 1398 backing_store = handle(FixedArray::cast(backing_store->get(1)), isolate); |
1399 } | 1399 } |
1400 Handle<SeededNumberDictionary> dictionary = | 1400 Handle<SeededNumberDictionary> dictionary = |
1401 Handle<SeededNumberDictionary>::cast(backing_store); | 1401 Handle<SeededNumberDictionary>::cast(backing_store); |
1402 int entry = dictionary->FindEntry(key); | 1402 int entry = dictionary->FindEntry(key); |
1403 if (entry != SeededNumberDictionary::kNotFound) { | 1403 if (entry != SeededNumberDictionary::kNotFound) { |
1404 Handle<Object> result = | 1404 Handle<Object> result = SeededNumberDictionary::DeleteProperty( |
1405 SeededNumberDictionary::DeleteProperty(dictionary, entry); | 1405 dictionary, entry, obj->map()->is_strong()); |
rossberg
2015/05/22 14:01:26
Do we have to pass down the flag here? It seems th
conradw
2015/05/27 18:09:32
Yes, missed this.
| |
1406 if (*result == *isolate->factory()->false_value()) { | 1406 if (*result == *isolate->factory()->false_value()) { |
1407 if (is_strict(language_mode)) { | 1407 if (is_strict(language_mode)) { |
1408 // Deleting a non-configurable property in strict mode. | 1408 // Deleting a non-configurable property in strict mode. |
1409 Handle<Object> name = isolate->factory()->NewNumberFromUint(key); | 1409 Handle<Object> name = isolate->factory()->NewNumberFromUint(key); |
1410 THROW_NEW_ERROR( | 1410 THROW_NEW_ERROR( |
1411 isolate, | 1411 isolate, |
1412 NewTypeError(MessageTemplate::kStrictDeleteProperty, name, obj), | 1412 NewTypeError(MessageTemplate::kStrictDeleteProperty, name, obj), |
1413 Object); | 1413 Object); |
1414 } | 1414 } |
1415 return isolate->factory()->false_value(); | 1415 return isolate->factory()->false_value(); |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1849 UNREACHABLE(); | 1849 UNREACHABLE(); |
1850 break; | 1850 break; |
1851 } | 1851 } |
1852 | 1852 |
1853 array->set_elements(*elms); | 1853 array->set_elements(*elms); |
1854 array->set_length(Smi::FromInt(number_of_elements)); | 1854 array->set_length(Smi::FromInt(number_of_elements)); |
1855 return array; | 1855 return array; |
1856 } | 1856 } |
1857 | 1857 |
1858 } } // namespace v8::internal | 1858 } } // namespace v8::internal |
OLD | NEW |