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

Side by Side Diff: src/objects.h

Issue 669051: - Rearrange fields in SharedFunctionInfo. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 void SharedFunctionInfoVerify(); 3273 void SharedFunctionInfoVerify();
3274 #endif 3274 #endif
3275 3275
3276 // Casting. 3276 // Casting.
3277 static inline SharedFunctionInfo* cast(Object* obj); 3277 static inline SharedFunctionInfo* cast(Object* obj);
3278 3278
3279 // Constants. 3279 // Constants.
3280 static const int kDontAdaptArgumentsSentinel = -1; 3280 static const int kDontAdaptArgumentsSentinel = -1;
3281 3281
3282 // Layout description. 3282 // Layout description.
3283 // (An even number of integers has a size that is a multiple of a pointer.) 3283 // Pointer fields.
3284 static const int kNameOffset = HeapObject::kHeaderSize; 3284 static const int kNameOffset = HeapObject::kHeaderSize;
3285 static const int kCodeOffset = kNameOffset + kPointerSize; 3285 static const int kCodeOffset = kNameOffset + kPointerSize;
3286 static const int kConstructStubOffset = kCodeOffset + kPointerSize; 3286 static const int kConstructStubOffset = kCodeOffset + kPointerSize;
3287 static const int kLengthOffset = kConstructStubOffset + kPointerSize; 3287 static const int kInstanceClassNameOffset =
3288 kConstructStubOffset + kPointerSize;
3289 static const int kExternalReferenceDataOffset =
3290 kInstanceClassNameOffset + kPointerSize;
3291 static const int kScriptOffset = kExternalReferenceDataOffset + kPointerSize;
3292 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
3293 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
3294 static const int kThisPropertyAssignmentsOffset =
3295 kInferredNameOffset + kPointerSize;
3296 // Integer fields.
3297 static const int kLengthOffset =
3298 kThisPropertyAssignmentsOffset + kPointerSize;
3288 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize; 3299 static const int kFormalParameterCountOffset = kLengthOffset + kIntSize;
3289 static const int kExpectedNofPropertiesOffset = 3300 static const int kExpectedNofPropertiesOffset =
3290 kFormalParameterCountOffset + kIntSize; 3301 kFormalParameterCountOffset + kIntSize;
3291 static const int kStartPositionAndTypeOffset = 3302 static const int kStartPositionAndTypeOffset =
3292 kExpectedNofPropertiesOffset + kIntSize; 3303 kExpectedNofPropertiesOffset + kIntSize;
3293 static const int kEndPositionOffset = kStartPositionAndTypeOffset + kIntSize; 3304 static const int kEndPositionOffset = kStartPositionAndTypeOffset + kIntSize;
3294 static const int kFunctionTokenPositionOffset = kEndPositionOffset + kIntSize; 3305 static const int kFunctionTokenPositionOffset = kEndPositionOffset + kIntSize;
3295 static const int kInstanceClassNameOffset = 3306 static const int kCompilerHintsOffset =
3296 kFunctionTokenPositionOffset + kIntSize; 3307 kFunctionTokenPositionOffset + kIntSize;
3297 static const int kExternalReferenceDataOffset =
3298 kInstanceClassNameOffset + kPointerSize;
3299 static const int kScriptOffset = kExternalReferenceDataOffset + kPointerSize;
3300 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
3301 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
3302 static const int kCompilerHintsOffset = kInferredNameOffset + kPointerSize;
3303 static const int kThisPropertyAssignmentsOffset =
3304 kCompilerHintsOffset + kPointerSize;
3305 static const int kThisPropertyAssignmentsCountOffset = 3308 static const int kThisPropertyAssignmentsCountOffset =
3306 kThisPropertyAssignmentsOffset + kPointerSize; 3309 kCompilerHintsOffset + kIntSize;
3307 static const int kSize = kThisPropertyAssignmentsCountOffset + kPointerSize; 3310 // Total size.
3311 static const int kSize = kThisPropertyAssignmentsCountOffset + kIntSize;
3308 3312
3309 private: 3313 private:
3310 // Bit positions in length_and_flg.
3311 // The least significant bit is used as the flag.
3312 static const int kFlagBit = 0;
3313 static const int kLengthShift = 1;
3314 static const int kLengthMask = ~((1 << kLengthShift) - 1);
3315
3316 // Bit positions in start_position_and_type. 3314 // Bit positions in start_position_and_type.
3317 // The source code start position is in the 30 most significant bits of 3315 // The source code start position is in the 30 most significant bits of
3318 // the start_position_and_type field. 3316 // the start_position_and_type field.
3319 static const int kIsExpressionBit = 0; 3317 static const int kIsExpressionBit = 0;
3320 static const int kIsTopLevelBit = 1; 3318 static const int kIsTopLevelBit = 1;
3321 static const int kStartPositionShift = 2; 3319 static const int kStartPositionShift = 2;
3322 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 3320 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
3323 3321
3324 // Bit positions in compiler_hints. 3322 // Bit positions in compiler_hints.
3325 static const int kHasOnlySimpleThisPropertyAssignments = 0; 3323 static const int kHasOnlySimpleThisPropertyAssignments = 0;
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
4981 } else { 4979 } else {
4982 value &= ~(1 << bit_position); 4980 value &= ~(1 << bit_position);
4983 } 4981 }
4984 return value; 4982 return value;
4985 } 4983 }
4986 }; 4984 };
4987 4985
4988 } } // namespace v8::internal 4986 } } // namespace v8::internal
4989 4987
4990 #endif // V8_OBJECTS_H_ 4988 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698