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

Side by Side Diff: src/objects-inl.h

Issue 2475433008: Set global proxy internal field count based on the global object template. (Closed)
Patch Set: Address comments Created 4 years, 1 month 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 | « src/objects.h ('k') | test/cctest/test-api.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 7660 matching lines...) Expand 10 before | Expand all | Expand 10 after
7671 return JSGlobalProxy::cast(global_proxy())->IsDetachedFrom(this); 7671 return JSGlobalProxy::cast(global_proxy())->IsDetachedFrom(this);
7672 } 7672 }
7673 7673
7674 7674
7675 bool JSGlobalProxy::IsDetachedFrom(JSGlobalObject* global) const { 7675 bool JSGlobalProxy::IsDetachedFrom(JSGlobalObject* global) const {
7676 const PrototypeIterator iter(this->GetIsolate(), 7676 const PrototypeIterator iter(this->GetIsolate(),
7677 const_cast<JSGlobalProxy*>(this)); 7677 const_cast<JSGlobalProxy*>(this));
7678 return iter.GetCurrent() != global; 7678 return iter.GetCurrent() != global;
7679 } 7679 }
7680 7680
7681 inline int JSGlobalProxy::SizeWithInternalFields(int internal_field_count) {
7682 DCHECK_GE(internal_field_count, 0);
7683 return kSize + internal_field_count * kPointerSize;
7684 }
7685
7681 Smi* JSReceiver::GetOrCreateIdentityHash(Isolate* isolate, 7686 Smi* JSReceiver::GetOrCreateIdentityHash(Isolate* isolate,
7682 Handle<JSReceiver> object) { 7687 Handle<JSReceiver> object) {
7683 return object->IsJSProxy() ? JSProxy::GetOrCreateIdentityHash( 7688 return object->IsJSProxy() ? JSProxy::GetOrCreateIdentityHash(
7684 isolate, Handle<JSProxy>::cast(object)) 7689 isolate, Handle<JSProxy>::cast(object))
7685 : JSObject::GetOrCreateIdentityHash( 7690 : JSObject::GetOrCreateIdentityHash(
7686 isolate, Handle<JSObject>::cast(object)); 7691 isolate, Handle<JSObject>::cast(object));
7687 } 7692 }
7688 7693
7689 Object* JSReceiver::GetIdentityHash(Isolate* isolate, 7694 Object* JSReceiver::GetIdentityHash(Isolate* isolate,
7690 Handle<JSReceiver> receiver) { 7695 Handle<JSReceiver> receiver) {
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
8431 #undef WRITE_INT64_FIELD 8436 #undef WRITE_INT64_FIELD
8432 #undef READ_BYTE_FIELD 8437 #undef READ_BYTE_FIELD
8433 #undef WRITE_BYTE_FIELD 8438 #undef WRITE_BYTE_FIELD
8434 #undef NOBARRIER_READ_BYTE_FIELD 8439 #undef NOBARRIER_READ_BYTE_FIELD
8435 #undef NOBARRIER_WRITE_BYTE_FIELD 8440 #undef NOBARRIER_WRITE_BYTE_FIELD
8436 8441
8437 } // namespace internal 8442 } // namespace internal
8438 } // namespace v8 8443 } // namespace v8
8439 8444
8440 #endif // V8_OBJECTS_INL_H_ 8445 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698