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

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

Issue 1761593003: Revert "Speed up the LookupIterator" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 1954
1955 int JSObject::GetHeaderSize() { return GetHeaderSize(map()->instance_type()); } 1955 int JSObject::GetHeaderSize() { return GetHeaderSize(map()->instance_type()); }
1956 1956
1957 1957
1958 int JSObject::GetHeaderSize(InstanceType type) { 1958 int JSObject::GetHeaderSize(InstanceType type) {
1959 // Check for the most common kind of JavaScript object before 1959 // Check for the most common kind of JavaScript object before
1960 // falling into the generic switch. This speeds up the internal 1960 // falling into the generic switch. This speeds up the internal
1961 // field operations considerably on average. 1961 // field operations considerably on average.
1962 if (type == JS_OBJECT_TYPE) return JSObject::kHeaderSize; 1962 if (type == JS_OBJECT_TYPE) return JSObject::kHeaderSize;
1963 switch (type) { 1963 switch (type) {
1964 case JS_SPECIAL_API_OBJECT_TYPE:
1965 return JSObject::kHeaderSize;
1966 case JS_GENERATOR_OBJECT_TYPE: 1964 case JS_GENERATOR_OBJECT_TYPE:
1967 return JSGeneratorObject::kSize; 1965 return JSGeneratorObject::kSize;
1968 case JS_MODULE_TYPE: 1966 case JS_MODULE_TYPE:
1969 return JSModule::kSize; 1967 return JSModule::kSize;
1970 case JS_GLOBAL_PROXY_TYPE: 1968 case JS_GLOBAL_PROXY_TYPE:
1971 return JSGlobalProxy::kSize; 1969 return JSGlobalProxy::kSize;
1972 case JS_GLOBAL_OBJECT_TYPE: 1970 case JS_GLOBAL_OBJECT_TYPE:
1973 return JSGlobalObject::kSize; 1971 return JSGlobalObject::kSize;
1974 case JS_BOUND_FUNCTION_TYPE: 1972 case JS_BOUND_FUNCTION_TYPE:
1975 return JSBoundFunction::kSize; 1973 return JSBoundFunction::kSize;
(...skipping 5778 matching lines...) Expand 10 before | Expand all | Expand 10 after
7754 #undef WRITE_INT64_FIELD 7752 #undef WRITE_INT64_FIELD
7755 #undef READ_BYTE_FIELD 7753 #undef READ_BYTE_FIELD
7756 #undef WRITE_BYTE_FIELD 7754 #undef WRITE_BYTE_FIELD
7757 #undef NOBARRIER_READ_BYTE_FIELD 7755 #undef NOBARRIER_READ_BYTE_FIELD
7758 #undef NOBARRIER_WRITE_BYTE_FIELD 7756 #undef NOBARRIER_WRITE_BYTE_FIELD
7759 7757
7760 } // namespace internal 7758 } // namespace internal
7761 } // namespace v8 7759 } // namespace v8
7762 7760
7763 #endif // V8_OBJECTS_INL_H_ 7761 #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