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 "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 }; | 297 }; |
298 | 298 |
299 // ICs store extra state in a Code object. The default extra state is | 299 // ICs store extra state in a Code object. The default extra state is |
300 // kNoExtraICState. | 300 // kNoExtraICState. |
301 typedef int ExtraICState; | 301 typedef int ExtraICState; |
302 static const ExtraICState kNoExtraICState = 0; | 302 static const ExtraICState kNoExtraICState = 0; |
303 | 303 |
304 // Instance size sentinel for objects of variable size. | 304 // Instance size sentinel for objects of variable size. |
305 const int kVariableSizeSentinel = 0; | 305 const int kVariableSizeSentinel = 0; |
306 | 306 |
| 307 // We may store the unsigned bit field as signed Smi value and do not |
| 308 // use the sign bit. |
307 const int kStubMajorKeyBits = 7; | 309 const int kStubMajorKeyBits = 7; |
308 const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; | 310 const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1; |
309 | 311 |
310 // All Maps have a field instance_type containing a InstanceType. | 312 // All Maps have a field instance_type containing a InstanceType. |
311 // It describes the type of the instances. | 313 // It describes the type of the instances. |
312 // | 314 // |
313 // As an example, a JavaScript object is a heap object and its map | 315 // As an example, a JavaScript object is a heap object and its map |
314 // instance_type is JS_OBJECT_TYPE. | 316 // instance_type is JS_OBJECT_TYPE. |
315 // | 317 // |
316 // The names of the string instance types are intended to systematically | 318 // The names of the string instance types are intended to systematically |
317 // mirror their encoding in the instance_type field of the map. The default | 319 // mirror their encoding in the instance_type field of the map. The default |
318 // encoding is considered TWO_BYTE. It is not mentioned in the name. ASCII | 320 // encoding is considered TWO_BYTE. It is not mentioned in the name. ASCII |
(...skipping 10898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11217 } else { | 11219 } else { |
11218 value &= ~(1 << bit_position); | 11220 value &= ~(1 << bit_position); |
11219 } | 11221 } |
11220 return value; | 11222 return value; |
11221 } | 11223 } |
11222 }; | 11224 }; |
11223 | 11225 |
11224 } } // namespace v8::internal | 11226 } } // namespace v8::internal |
11225 | 11227 |
11226 #endif // V8_OBJECTS_H_ | 11228 #endif // V8_OBJECTS_H_ |
OLD | NEW |