OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5199 // Bit field containing various information collected by the compiler to | 5199 // Bit field containing various information collected by the compiler to |
5200 // drive optimization. | 5200 // drive optimization. |
5201 inline int compiler_hints(); | 5201 inline int compiler_hints(); |
5202 inline void set_compiler_hints(int value); | 5202 inline void set_compiler_hints(int value); |
5203 | 5203 |
5204 // A counter used to determine when to stress the deoptimizer with a | 5204 // A counter used to determine when to stress the deoptimizer with a |
5205 // deopt. | 5205 // deopt. |
5206 inline int deopt_counter(); | 5206 inline int deopt_counter(); |
5207 inline void set_deopt_counter(int counter); | 5207 inline void set_deopt_counter(int counter); |
5208 | 5208 |
5209 inline int profiler_ticks(); | |
5210 inline void set_profiler_ticks(int ticks); | |
5211 | |
5209 inline int ast_node_count(); | 5212 inline int ast_node_count(); |
5210 inline void set_ast_node_count(int count); | 5213 inline void set_ast_node_count(int count); |
5211 | 5214 |
5212 // Add information on assignments of the form this.x = ...; | 5215 // Add information on assignments of the form this.x = ...; |
5213 void SetThisPropertyAssignmentsInfo( | 5216 void SetThisPropertyAssignmentsInfo( |
5214 bool has_only_simple_this_property_assignments, | 5217 bool has_only_simple_this_property_assignments, |
5215 FixedArray* this_property_assignments); | 5218 FixedArray* this_property_assignments); |
5216 | 5219 |
5217 // Clear information on assignments of the form this.x = ...; | 5220 // Clear information on assignments of the form this.x = ...; |
5218 void ClearThisPropertyAssignmentsInfo(); | 5221 void ClearThisPropertyAssignmentsInfo(); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5374 kConstructStubOffset + kPointerSize; | 5377 kConstructStubOffset + kPointerSize; |
5375 static const int kFunctionDataOffset = | 5378 static const int kFunctionDataOffset = |
5376 kInstanceClassNameOffset + kPointerSize; | 5379 kInstanceClassNameOffset + kPointerSize; |
5377 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; | 5380 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; |
5378 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; | 5381 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; |
5379 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; | 5382 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; |
5380 static const int kInitialMapOffset = | 5383 static const int kInitialMapOffset = |
5381 kInferredNameOffset + kPointerSize; | 5384 kInferredNameOffset + kPointerSize; |
5382 static const int kThisPropertyAssignmentsOffset = | 5385 static const int kThisPropertyAssignmentsOffset = |
5383 kInitialMapOffset + kPointerSize; | 5386 kInitialMapOffset + kPointerSize; |
5387 static const int kProfilerTicksOffset = | |
5388 kThisPropertyAssignmentsOffset + kPointerSize; | |
Erik Corry
2012/02/08 14:09:23
This is a Smi field. Can we find another one and
Jakob Kummerow
2012/02/08 15:24:08
I'd love to, but I don't see any other Smi fields.
| |
5384 #if V8_HOST_ARCH_32_BIT | 5389 #if V8_HOST_ARCH_32_BIT |
5385 // Smi fields. | 5390 // Smi fields. |
5386 static const int kLengthOffset = | 5391 static const int kLengthOffset = |
5387 kThisPropertyAssignmentsOffset + kPointerSize; | 5392 kProfilerTicksOffset + kPointerSize; |
5388 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; | 5393 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; |
5389 static const int kExpectedNofPropertiesOffset = | 5394 static const int kExpectedNofPropertiesOffset = |
5390 kFormalParameterCountOffset + kPointerSize; | 5395 kFormalParameterCountOffset + kPointerSize; |
5391 static const int kNumLiteralsOffset = | 5396 static const int kNumLiteralsOffset = |
5392 kExpectedNofPropertiesOffset + kPointerSize; | 5397 kExpectedNofPropertiesOffset + kPointerSize; |
5393 static const int kStartPositionAndTypeOffset = | 5398 static const int kStartPositionAndTypeOffset = |
5394 kNumLiteralsOffset + kPointerSize; | 5399 kNumLiteralsOffset + kPointerSize; |
5395 static const int kEndPositionOffset = | 5400 static const int kEndPositionOffset = |
5396 kStartPositionAndTypeOffset + kPointerSize; | 5401 kStartPositionAndTypeOffset + kPointerSize; |
5397 static const int kFunctionTokenPositionOffset = | 5402 static const int kFunctionTokenPositionOffset = |
(...skipping 13 matching lines...) Expand all Loading... | |
5411 // The only reason to use smi fields instead of int fields | 5416 // The only reason to use smi fields instead of int fields |
5412 // is to allow iteration without maps decoding during | 5417 // is to allow iteration without maps decoding during |
5413 // garbage collections. | 5418 // garbage collections. |
5414 // To avoid wasting space on 64-bit architectures we use | 5419 // To avoid wasting space on 64-bit architectures we use |
5415 // the following trick: we group integer fields into pairs | 5420 // the following trick: we group integer fields into pairs |
5416 // First integer in each pair is shifted left by 1. | 5421 // First integer in each pair is shifted left by 1. |
5417 // By doing this we guarantee that LSB of each kPointerSize aligned | 5422 // By doing this we guarantee that LSB of each kPointerSize aligned |
5418 // word is not set and thus this word cannot be treated as pointer | 5423 // word is not set and thus this word cannot be treated as pointer |
5419 // to HeapObject during old space traversal. | 5424 // to HeapObject during old space traversal. |
5420 static const int kLengthOffset = | 5425 static const int kLengthOffset = |
5421 kThisPropertyAssignmentsOffset + kPointerSize; | 5426 kProfilerTicksOffset + kPointerSize; |
5422 static const int kFormalParameterCountOffset = | 5427 static const int kFormalParameterCountOffset = |
5423 kLengthOffset + kIntSize; | 5428 kLengthOffset + kIntSize; |
5424 | 5429 |
5425 static const int kExpectedNofPropertiesOffset = | 5430 static const int kExpectedNofPropertiesOffset = |
5426 kFormalParameterCountOffset + kIntSize; | 5431 kFormalParameterCountOffset + kIntSize; |
5427 static const int kNumLiteralsOffset = | 5432 static const int kNumLiteralsOffset = |
5428 kExpectedNofPropertiesOffset + kIntSize; | 5433 kExpectedNofPropertiesOffset + kIntSize; |
5429 | 5434 |
5430 static const int kEndPositionOffset = | 5435 static const int kEndPositionOffset = |
5431 kNumLiteralsOffset + kIntSize; | 5436 kNumLiteralsOffset + kIntSize; |
(...skipping 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8260 } else { | 8265 } else { |
8261 value &= ~(1 << bit_position); | 8266 value &= ~(1 << bit_position); |
8262 } | 8267 } |
8263 return value; | 8268 return value; |
8264 } | 8269 } |
8265 }; | 8270 }; |
8266 | 8271 |
8267 } } // namespace v8::internal | 8272 } } // namespace v8::internal |
8268 | 8273 |
8269 #endif // V8_OBJECTS_H_ | 8274 #endif // V8_OBJECTS_H_ |
OLD | NEW |