| 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 538 |
| 539 // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing | 539 // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing |
| 540 // JSObject::GetHeaderSize. | 540 // JSObject::GetHeaderSize. |
| 541 int instance_size = kPointerSize * internal_field_count; | 541 int instance_size = kPointerSize * internal_field_count; |
| 542 InstanceType type; | 542 InstanceType type; |
| 543 switch (instance_type) { | 543 switch (instance_type) { |
| 544 case JavaScriptObjectType: | 544 case JavaScriptObjectType: |
| 545 if (!obj->needs_access_check() && | 545 if (!obj->needs_access_check() && |
| 546 obj->named_property_handler()->IsUndefined() && | 546 obj->named_property_handler()->IsUndefined() && |
| 547 obj->indexed_property_handler()->IsUndefined()) { | 547 obj->indexed_property_handler()->IsUndefined()) { |
| 548 type = JS_OBJECT_TYPE; | 548 type = JS_API_OBJECT_TYPE; |
| 549 } else { | 549 } else { |
| 550 type = JS_SPECIAL_API_OBJECT_TYPE; | 550 type = JS_SPECIAL_API_OBJECT_TYPE; |
| 551 } | 551 } |
| 552 instance_size += JSObject::kHeaderSize; | 552 instance_size += JSObject::kHeaderSize; |
| 553 break; | 553 break; |
| 554 case GlobalObjectType: | 554 case GlobalObjectType: |
| 555 type = JS_GLOBAL_OBJECT_TYPE; | 555 type = JS_GLOBAL_OBJECT_TYPE; |
| 556 instance_size += JSGlobalObject::kSize; | 556 instance_size += JSGlobalObject::kSize; |
| 557 break; | 557 break; |
| 558 case GlobalProxyType: | 558 case GlobalProxyType: |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 map->set_is_callable(); | 624 map->set_is_callable(); |
| 625 map->set_is_constructor(true); | 625 map->set_is_constructor(true); |
| 626 } | 626 } |
| 627 | 627 |
| 628 DCHECK(result->shared()->IsApiFunction()); | 628 DCHECK(result->shared()->IsApiFunction()); |
| 629 return result; | 629 return result; |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace internal | 632 } // namespace internal |
| 633 } // namespace v8 | 633 } // namespace v8 |
| OLD | NEW |