Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: src/api-natives.cc

Issue 1751043002: Speed up the LookupIterator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix proxy + private symbols Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
538 internal_field_count = 538 internal_field_count =
539 Smi::cast(instance_template->internal_field_count())->value(); 539 Smi::cast(instance_template->internal_field_count())->value();
540 } 540 }
541 541
542 // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing 542 // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing
543 // JSObject::GetHeaderSize. 543 // JSObject::GetHeaderSize.
544 int instance_size = kPointerSize * internal_field_count; 544 int instance_size = kPointerSize * internal_field_count;
545 InstanceType type; 545 InstanceType type;
546 switch (instance_type) { 546 switch (instance_type) {
547 case JavaScriptObjectType: 547 case JavaScriptObjectType:
548 type = JS_OBJECT_TYPE; 548 if (!obj->needs_access_check() &&
549 obj->named_property_handler()->IsUndefined() &&
550 obj->indexed_property_handler()->IsUndefined()) {
551 type = JS_OBJECT_TYPE;
552 } else {
553 type = JS_SPECIAL_API_OBJECT_TYPE;
554 }
549 instance_size += JSObject::kHeaderSize; 555 instance_size += JSObject::kHeaderSize;
550 break; 556 break;
551 case GlobalObjectType: 557 case GlobalObjectType:
552 type = JS_GLOBAL_OBJECT_TYPE; 558 type = JS_GLOBAL_OBJECT_TYPE;
553 instance_size += JSGlobalObject::kSize; 559 instance_size += JSGlobalObject::kSize;
554 break; 560 break;
555 case GlobalProxyType: 561 case GlobalProxyType:
556 type = JS_GLOBAL_PROXY_TYPE; 562 type = JS_GLOBAL_PROXY_TYPE;
557 instance_size += JSGlobalProxy::kSize; 563 instance_size += JSGlobalProxy::kSize;
558 break; 564 break;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 map->set_is_callable(); 627 map->set_is_callable();
622 map->set_is_constructor(true); 628 map->set_is_constructor(true);
623 } 629 }
624 630
625 DCHECK(result->shared()->IsApiFunction()); 631 DCHECK(result->shared()->IsApiFunction());
626 return result; 632 return result;
627 } 633 }
628 634
629 } // namespace internal 635 } // namespace internal
630 } // namespace v8 636 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698