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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2570 JSObject::AddProperty(to, key, value, details.attributes()); | 2570 JSObject::AddProperty(to, key, value, details.attributes()); |
2571 break; | 2571 break; |
2572 } | 2572 } |
2573 case CONSTANT: { | 2573 case CONSTANT: { |
2574 HandleScope inner(isolate()); | 2574 HandleScope inner(isolate()); |
2575 Handle<Name> key = Handle<Name>(descs->GetKey(i)); | 2575 Handle<Name> key = Handle<Name>(descs->GetKey(i)); |
2576 Handle<Object> constant(descs->GetConstant(i), isolate()); | 2576 Handle<Object> constant(descs->GetConstant(i), isolate()); |
2577 JSObject::AddProperty(to, key, constant, details.attributes()); | 2577 JSObject::AddProperty(to, key, constant, details.attributes()); |
2578 break; | 2578 break; |
2579 } | 2579 } |
| 2580 case ACCESSOR_FIELD: |
| 2581 UNREACHABLE(); |
2580 case CALLBACKS: { | 2582 case CALLBACKS: { |
2581 Handle<Name> key(descs->GetKey(i)); | 2583 Handle<Name> key(descs->GetKey(i)); |
2582 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); | 2584 LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR); |
2583 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); | 2585 CHECK_NE(LookupIterator::ACCESS_CHECK, it.state()); |
2584 // If the property is already there we skip it | 2586 // If the property is already there we skip it |
2585 if (it.IsFound()) continue; | 2587 if (it.IsFound()) continue; |
2586 HandleScope inner(isolate()); | 2588 HandleScope inner(isolate()); |
2587 DCHECK(!to->HasFastProperties()); | 2589 DCHECK(!to->HasFastProperties()); |
2588 // Add to dictionary. | 2590 // Add to dictionary. |
2589 Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate()); | 2591 Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate()); |
(...skipping 18 matching lines...) Expand all Loading... |
2608 if (it.IsFound()) continue; | 2610 if (it.IsFound()) continue; |
2609 // Set the property. | 2611 // Set the property. |
2610 Handle<Object> value = Handle<Object>(properties->ValueAt(i), | 2612 Handle<Object> value = Handle<Object>(properties->ValueAt(i), |
2611 isolate()); | 2613 isolate()); |
2612 DCHECK(!value->IsCell()); | 2614 DCHECK(!value->IsCell()); |
2613 if (value->IsPropertyCell()) { | 2615 if (value->IsPropertyCell()) { |
2614 value = Handle<Object>(PropertyCell::cast(*value)->value(), | 2616 value = Handle<Object>(PropertyCell::cast(*value)->value(), |
2615 isolate()); | 2617 isolate()); |
2616 } | 2618 } |
2617 PropertyDetails details = properties->DetailsAt(i); | 2619 PropertyDetails details = properties->DetailsAt(i); |
| 2620 DCHECK_EQ(DATA, details.kind()); |
2618 JSObject::AddProperty(to, key, value, details.attributes()); | 2621 JSObject::AddProperty(to, key, value, details.attributes()); |
2619 } | 2622 } |
2620 } | 2623 } |
2621 } | 2624 } |
2622 } | 2625 } |
2623 | 2626 |
2624 | 2627 |
2625 void Genesis::TransferIndexedProperties(Handle<JSObject> from, | 2628 void Genesis::TransferIndexedProperties(Handle<JSObject> from, |
2626 Handle<JSObject> to) { | 2629 Handle<JSObject> to) { |
2627 // Cloning the elements array is sufficient. | 2630 // Cloning the elements array is sufficient. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2823 return from + sizeof(NestingCounterType); | 2826 return from + sizeof(NestingCounterType); |
2824 } | 2827 } |
2825 | 2828 |
2826 | 2829 |
2827 // Called when the top-level V8 mutex is destroyed. | 2830 // Called when the top-level V8 mutex is destroyed. |
2828 void Bootstrapper::FreeThreadResources() { | 2831 void Bootstrapper::FreeThreadResources() { |
2829 DCHECK(!IsActive()); | 2832 DCHECK(!IsActive()); |
2830 } | 2833 } |
2831 | 2834 |
2832 } } // namespace v8::internal | 2835 } } // namespace v8::internal |
OLD | NEW |