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

Side by Side Diff: src/objects.h

Issue 428183003: Fix issue with storing 31-bit bitfield as Smi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reverted v8.h Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.h ('k') | src/objects-inl.h » ('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 #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
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
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_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698