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

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

Issue 1473023004: Inline functions to speedup GetElement (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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.cc ('k') | no next file » | 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 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); 1988 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array());
1989 } 1989 }
1990 1990
1991 1991
1992 void JSObject::initialize_elements() { 1992 void JSObject::initialize_elements() {
1993 FixedArrayBase* elements = map()->GetInitialElements(); 1993 FixedArrayBase* elements = map()->GetInitialElements();
1994 WRITE_FIELD(this, kElementsOffset, elements); 1994 WRITE_FIELD(this, kElementsOffset, elements);
1995 } 1995 }
1996 1996
1997 1997
1998 InterceptorInfo* JSObject::GetIndexedInterceptor() {
1999 DCHECK(map()->has_indexed_interceptor());
2000 JSFunction* constructor = JSFunction::cast(map()->GetConstructor());
2001 DCHECK(constructor->shared()->IsApiFunction());
2002 Object* result =
2003 constructor->shared()->get_api_func_data()->indexed_property_handler();
2004 return InterceptorInfo::cast(result);
2005 }
2006
2007
1998 ACCESSORS(Oddball, to_string, String, kToStringOffset) 2008 ACCESSORS(Oddball, to_string, String, kToStringOffset)
1999 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) 2009 ACCESSORS(Oddball, to_number, Object, kToNumberOffset)
2000 ACCESSORS(Oddball, type_of, String, kTypeOfOffset) 2010 ACCESSORS(Oddball, type_of, String, kTypeOfOffset)
2001 2011
2002 2012
2003 byte Oddball::kind() const { 2013 byte Oddball::kind() const {
2004 return Smi::cast(READ_FIELD(this, kKindOffset))->value(); 2014 return Smi::cast(READ_FIELD(this, kKindOffset))->value();
2005 } 2015 }
2006 2016
2007 2017
(...skipping 5882 matching lines...) Expand 10 before | Expand all | Expand 10 after
7890 #undef WRITE_INT64_FIELD 7900 #undef WRITE_INT64_FIELD
7891 #undef READ_BYTE_FIELD 7901 #undef READ_BYTE_FIELD
7892 #undef WRITE_BYTE_FIELD 7902 #undef WRITE_BYTE_FIELD
7893 #undef NOBARRIER_READ_BYTE_FIELD 7903 #undef NOBARRIER_READ_BYTE_FIELD
7894 #undef NOBARRIER_WRITE_BYTE_FIELD 7904 #undef NOBARRIER_WRITE_BYTE_FIELD
7895 7905
7896 } // namespace internal 7906 } // namespace internal
7897 } // namespace v8 7907 } // namespace v8
7898 7908
7899 #endif // V8_OBJECTS_INL_H_ 7909 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698