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

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

Issue 1765713003: Reland "Speed up the LookupIterator" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: wrap in assertThrows 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 | « src/objects-debug.cc ('k') | src/objects-printer.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 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 1952
1953 int JSObject::GetHeaderSize() { return GetHeaderSize(map()->instance_type()); } 1953 int JSObject::GetHeaderSize() { return GetHeaderSize(map()->instance_type()); }
1954 1954
1955 1955
1956 int JSObject::GetHeaderSize(InstanceType type) { 1956 int JSObject::GetHeaderSize(InstanceType type) {
1957 // Check for the most common kind of JavaScript object before 1957 // Check for the most common kind of JavaScript object before
1958 // falling into the generic switch. This speeds up the internal 1958 // falling into the generic switch. This speeds up the internal
1959 // field operations considerably on average. 1959 // field operations considerably on average.
1960 if (type == JS_OBJECT_TYPE) return JSObject::kHeaderSize; 1960 if (type == JS_OBJECT_TYPE) return JSObject::kHeaderSize;
1961 switch (type) { 1961 switch (type) {
1962 case JS_SPECIAL_API_OBJECT_TYPE:
1963 return JSObject::kHeaderSize;
1962 case JS_GENERATOR_OBJECT_TYPE: 1964 case JS_GENERATOR_OBJECT_TYPE:
1963 return JSGeneratorObject::kSize; 1965 return JSGeneratorObject::kSize;
1964 case JS_MODULE_TYPE: 1966 case JS_MODULE_TYPE:
1965 return JSModule::kSize; 1967 return JSModule::kSize;
1966 case JS_GLOBAL_PROXY_TYPE: 1968 case JS_GLOBAL_PROXY_TYPE:
1967 return JSGlobalProxy::kSize; 1969 return JSGlobalProxy::kSize;
1968 case JS_GLOBAL_OBJECT_TYPE: 1970 case JS_GLOBAL_OBJECT_TYPE:
1969 return JSGlobalObject::kSize; 1971 return JSGlobalObject::kSize;
1970 case JS_BOUND_FUNCTION_TYPE: 1972 case JS_BOUND_FUNCTION_TYPE:
1971 return JSBoundFunction::kSize; 1973 return JSBoundFunction::kSize;
(...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after
7745 #undef WRITE_INT64_FIELD 7747 #undef WRITE_INT64_FIELD
7746 #undef READ_BYTE_FIELD 7748 #undef READ_BYTE_FIELD
7747 #undef WRITE_BYTE_FIELD 7749 #undef WRITE_BYTE_FIELD
7748 #undef NOBARRIER_READ_BYTE_FIELD 7750 #undef NOBARRIER_READ_BYTE_FIELD
7749 #undef NOBARRIER_WRITE_BYTE_FIELD 7751 #undef NOBARRIER_WRITE_BYTE_FIELD
7750 7752
7751 } // namespace internal 7753 } // namespace internal
7752 } // namespace v8 7754 } // namespace v8
7753 7755
7754 #endif // V8_OBJECTS_INL_H_ 7756 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698