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

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

Issue 1844413002: Use EmbedderHeapTracer instead of object grouping when trace_embedder_heap flag is set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move logic from heap to mark compact Created 4 years, 8 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/fast-accessor-assembler.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 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
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
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/fast-accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698