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

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

Issue 1409163007: [turbofan] We can inline property access for all primitives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/mjsunit/compiler/boolean-protototype.js » ('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 4879 matching lines...) Expand 10 before | Expand all | Expand 10 after
4890 } 4890 }
4891 4891
4892 4892
4893 bool Map::CanTransition() { 4893 bool Map::CanTransition() {
4894 // Only JSObject and subtypes have map transitions and back pointers. 4894 // Only JSObject and subtypes have map transitions and back pointers.
4895 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE); 4895 STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE);
4896 return instance_type() >= FIRST_JS_OBJECT_TYPE; 4896 return instance_type() >= FIRST_JS_OBJECT_TYPE;
4897 } 4897 }
4898 4898
4899 4899
4900 bool Map::IsBooleanMap() { return this == GetHeap()->boolean_map(); }
4900 bool Map::IsPrimitiveMap() { 4901 bool Map::IsPrimitiveMap() {
4901 STATIC_ASSERT(FIRST_PRIMITIVE_TYPE == FIRST_TYPE); 4902 STATIC_ASSERT(FIRST_PRIMITIVE_TYPE == FIRST_TYPE);
4902 return instance_type() <= LAST_PRIMITIVE_TYPE; 4903 return instance_type() <= LAST_PRIMITIVE_TYPE;
4903 } 4904 }
4904 bool Map::IsJSObjectMap() { 4905 bool Map::IsJSObjectMap() {
4905 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); 4906 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
4906 return instance_type() >= FIRST_JS_OBJECT_TYPE; 4907 return instance_type() >= FIRST_JS_OBJECT_TYPE;
4907 } 4908 }
4908 bool Map::IsJSArrayMap() { return instance_type() == JS_ARRAY_TYPE; } 4909 bool Map::IsJSArrayMap() { return instance_type() == JS_ARRAY_TYPE; }
4909 bool Map::IsJSFunctionMap() { return instance_type() == JS_FUNCTION_TYPE; } 4910 bool Map::IsJSFunctionMap() { return instance_type() == JS_FUNCTION_TYPE; }
(...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after
8129 #undef WRITE_INT64_FIELD 8130 #undef WRITE_INT64_FIELD
8130 #undef READ_BYTE_FIELD 8131 #undef READ_BYTE_FIELD
8131 #undef WRITE_BYTE_FIELD 8132 #undef WRITE_BYTE_FIELD
8132 #undef NOBARRIER_READ_BYTE_FIELD 8133 #undef NOBARRIER_READ_BYTE_FIELD
8133 #undef NOBARRIER_WRITE_BYTE_FIELD 8134 #undef NOBARRIER_WRITE_BYTE_FIELD
8134 8135
8135 } // namespace internal 8136 } // namespace internal
8136 } // namespace v8 8137 } // namespace v8
8137 8138
8138 #endif // V8_OBJECTS_INL_H_ 8139 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/compiler/boolean-protototype.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698