| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/api-natives.h" | 5 #include "src/api-natives.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
| 9 #include "src/lookup.h" | 9 #include "src/lookup.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 if (!obj->named_property_handler()->IsUndefined()) { | 541 if (!obj->named_property_handler()->IsUndefined()) { |
| 542 map->set_has_named_interceptor(); | 542 map->set_has_named_interceptor(); |
| 543 } | 543 } |
| 544 if (!obj->indexed_property_handler()->IsUndefined()) { | 544 if (!obj->indexed_property_handler()->IsUndefined()) { |
| 545 map->set_has_indexed_interceptor(); | 545 map->set_has_indexed_interceptor(); |
| 546 } | 546 } |
| 547 | 547 |
| 548 // Mark instance as callable in the map. | 548 // Mark instance as callable in the map. |
| 549 if (!obj->instance_call_handler()->IsUndefined()) { | 549 if (!obj->instance_call_handler()->IsUndefined()) { |
| 550 map->set_is_callable(); | 550 map->set_is_callable(); |
| 551 map->set_is_constructor(); | 551 map->set_is_constructor(true); |
| 552 } | 552 } |
| 553 | 553 |
| 554 // Recursively copy parent instance templates' accessors, | 554 // Recursively copy parent instance templates' accessors, |
| 555 // 'data' may be modified. | 555 // 'data' may be modified. |
| 556 int max_number_of_additional_properties = 0; | 556 int max_number_of_additional_properties = 0; |
| 557 int max_number_of_static_properties = 0; | 557 int max_number_of_static_properties = 0; |
| 558 FunctionTemplateInfo* info = *obj; | 558 FunctionTemplateInfo* info = *obj; |
| 559 while (true) { | 559 while (true) { |
| 560 if (!info->instance_template()->IsUndefined()) { | 560 if (!info->instance_template()->IsUndefined()) { |
| 561 Object* props = ObjectTemplateInfo::cast(info->instance_template()) | 561 Object* props = ObjectTemplateInfo::cast(info->instance_template()) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 Handle<AccessorInfo> accessor(AccessorInfo::cast(array->get(i))); | 616 Handle<AccessorInfo> accessor(AccessorInfo::cast(array->get(i))); |
| 617 JSObject::SetAccessor(result, accessor).Assert(); | 617 JSObject::SetAccessor(result, accessor).Assert(); |
| 618 } | 618 } |
| 619 | 619 |
| 620 DCHECK(result->shared()->IsApiFunction()); | 620 DCHECK(result->shared()->IsApiFunction()); |
| 621 return result; | 621 return result; |
| 622 } | 622 } |
| 623 | 623 |
| 624 } // namespace internal | 624 } // namespace internal |
| 625 } // namespace v8 | 625 } // namespace v8 |
| OLD | NEW |