OLD | NEW |
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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 6101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6112 // Update code cache. | 6112 // Update code cache. |
6113 static void UpdateCodeCache(Handle<Map> map, | 6113 static void UpdateCodeCache(Handle<Map> map, |
6114 Handle<Name> name, | 6114 Handle<Name> name, |
6115 Handle<Code> code); | 6115 Handle<Code> code); |
6116 | 6116 |
6117 // Extend the descriptor array of the map with the list of descriptors. | 6117 // Extend the descriptor array of the map with the list of descriptors. |
6118 // In case of duplicates, the latest descriptor is used. | 6118 // In case of duplicates, the latest descriptor is used. |
6119 static void AppendCallbackDescriptors(Handle<Map> map, | 6119 static void AppendCallbackDescriptors(Handle<Map> map, |
6120 Handle<Object> descriptors); | 6120 Handle<Object> descriptors); |
6121 | 6121 |
| 6122 static inline int SlackForArraySize(int old_size, int size_limit); |
| 6123 |
6122 static void EnsureDescriptorSlack(Handle<Map> map, int slack); | 6124 static void EnsureDescriptorSlack(Handle<Map> map, int slack); |
6123 | 6125 |
6124 // Returns the found code or undefined if absent. | 6126 // Returns the found code or undefined if absent. |
6125 Object* FindInCodeCache(Name* name, Code::Flags flags); | 6127 Object* FindInCodeCache(Name* name, Code::Flags flags); |
6126 | 6128 |
6127 // Returns the non-negative index of the code object if it is in the | 6129 // Returns the non-negative index of the code object if it is in the |
6128 // cache and -1 otherwise. | 6130 // cache and -1 otherwise. |
6129 int IndexInCodeCache(Object* name, Code* code); | 6131 int IndexInCodeCache(Object* name, Code* code); |
6130 | 6132 |
6131 // Removes a code object from the code cache at the given index. | 6133 // Removes a code object from the code cache at the given index. |
(...skipping 4777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10909 } else { | 10911 } else { |
10910 value &= ~(1 << bit_position); | 10912 value &= ~(1 << bit_position); |
10911 } | 10913 } |
10912 return value; | 10914 return value; |
10913 } | 10915 } |
10914 }; | 10916 }; |
10915 | 10917 |
10916 } } // namespace v8::internal | 10918 } } // namespace v8::internal |
10917 | 10919 |
10918 #endif // V8_OBJECTS_H_ | 10920 #endif // V8_OBJECTS_H_ |
OLD | NEW |