| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4987 // Bit field containing various information collected by the compiler to | 4987 // Bit field containing various information collected by the compiler to |
| 4988 // drive optimization. | 4988 // drive optimization. |
| 4989 inline int compiler_hints(); | 4989 inline int compiler_hints(); |
| 4990 inline void set_compiler_hints(int value); | 4990 inline void set_compiler_hints(int value); |
| 4991 | 4991 |
| 4992 // A counter used to determine when to stress the deoptimizer with a | 4992 // A counter used to determine when to stress the deoptimizer with a |
| 4993 // deopt. | 4993 // deopt. |
| 4994 inline Smi* deopt_counter(); | 4994 inline Smi* deopt_counter(); |
| 4995 inline void set_deopt_counter(Smi* counter); | 4995 inline void set_deopt_counter(Smi* counter); |
| 4996 | 4996 |
| 4997 // Add information on assignments of the form this.x = ...; | 4997 inline int profiler_ticks(); |
| 4998 inline void set_profiler_ticks(int ticks); |
| 4999 |
| 5000 // Add information on assignments of the form this.x = ...; |
| 4998 void SetThisPropertyAssignmentsInfo( | 5001 void SetThisPropertyAssignmentsInfo( |
| 4999 bool has_only_simple_this_property_assignments, | 5002 bool has_only_simple_this_property_assignments, |
| 5000 FixedArray* this_property_assignments); | 5003 FixedArray* this_property_assignments); |
| 5001 | 5004 |
| 5002 // Clear information on assignments of the form this.x = ...; | 5005 // Clear information on assignments of the form this.x = ...; |
| 5003 void ClearThisPropertyAssignmentsInfo(); | 5006 void ClearThisPropertyAssignmentsInfo(); |
| 5004 | 5007 |
| 5005 // Indicate that this function only consists of assignments of the form | 5008 // Indicate that this function only consists of assignments of the form |
| 5006 // this.x = y; where y is either a constant or refers to an argument. | 5009 // this.x = y; where y is either a constant or refers to an argument. |
| 5007 inline bool has_only_simple_this_property_assignments(); | 5010 inline bool has_only_simple_this_property_assignments(); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5166 kInstanceClassNameOffset + kPointerSize; | 5169 kInstanceClassNameOffset + kPointerSize; |
| 5167 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; | 5170 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; |
| 5168 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; | 5171 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; |
| 5169 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; | 5172 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; |
| 5170 static const int kInitialMapOffset = | 5173 static const int kInitialMapOffset = |
| 5171 kInferredNameOffset + kPointerSize; | 5174 kInferredNameOffset + kPointerSize; |
| 5172 static const int kThisPropertyAssignmentsOffset = | 5175 static const int kThisPropertyAssignmentsOffset = |
| 5173 kInitialMapOffset + kPointerSize; | 5176 kInitialMapOffset + kPointerSize; |
| 5174 static const int kDeoptCounterOffset = | 5177 static const int kDeoptCounterOffset = |
| 5175 kThisPropertyAssignmentsOffset + kPointerSize; | 5178 kThisPropertyAssignmentsOffset + kPointerSize; |
| 5179 static const int kProfilerTicksOffset = |
| 5180 kDeoptCounterOffset + kPointerSize; |
| 5176 #if V8_HOST_ARCH_32_BIT | 5181 #if V8_HOST_ARCH_32_BIT |
| 5177 // Smi fields. | 5182 // Smi fields. |
| 5178 static const int kLengthOffset = | 5183 static const int kLengthOffset = |
| 5179 kDeoptCounterOffset + kPointerSize; | 5184 kProfilerTicksOffset + kPointerSize; |
| 5180 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; | 5185 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; |
| 5181 static const int kExpectedNofPropertiesOffset = | 5186 static const int kExpectedNofPropertiesOffset = |
| 5182 kFormalParameterCountOffset + kPointerSize; | 5187 kFormalParameterCountOffset + kPointerSize; |
| 5183 static const int kNumLiteralsOffset = | 5188 static const int kNumLiteralsOffset = |
| 5184 kExpectedNofPropertiesOffset + kPointerSize; | 5189 kExpectedNofPropertiesOffset + kPointerSize; |
| 5185 static const int kStartPositionAndTypeOffset = | 5190 static const int kStartPositionAndTypeOffset = |
| 5186 kNumLiteralsOffset + kPointerSize; | 5191 kNumLiteralsOffset + kPointerSize; |
| 5187 static const int kEndPositionOffset = | 5192 static const int kEndPositionOffset = |
| 5188 kStartPositionAndTypeOffset + kPointerSize; | 5193 kStartPositionAndTypeOffset + kPointerSize; |
| 5189 static const int kFunctionTokenPositionOffset = | 5194 static const int kFunctionTokenPositionOffset = |
| (...skipping 10 matching lines...) Expand all Loading... |
| 5200 // The only reason to use smi fields instead of int fields | 5205 // The only reason to use smi fields instead of int fields |
| 5201 // is to allow iteration without maps decoding during | 5206 // is to allow iteration without maps decoding during |
| 5202 // garbage collections. | 5207 // garbage collections. |
| 5203 // To avoid wasting space on 64-bit architectures we use | 5208 // To avoid wasting space on 64-bit architectures we use |
| 5204 // the following trick: we group integer fields into pairs | 5209 // the following trick: we group integer fields into pairs |
| 5205 // First integer in each pair is shifted left by 1. | 5210 // First integer in each pair is shifted left by 1. |
| 5206 // By doing this we guarantee that LSB of each kPointerSize aligned | 5211 // By doing this we guarantee that LSB of each kPointerSize aligned |
| 5207 // word is not set and thus this word cannot be treated as pointer | 5212 // word is not set and thus this word cannot be treated as pointer |
| 5208 // to HeapObject during old space traversal. | 5213 // to HeapObject during old space traversal. |
| 5209 static const int kLengthOffset = | 5214 static const int kLengthOffset = |
| 5210 kDeoptCounterOffset + kPointerSize; | 5215 kProfilerTicksOffset + kPointerSize; |
| 5211 static const int kFormalParameterCountOffset = | 5216 static const int kFormalParameterCountOffset = |
| 5212 kLengthOffset + kIntSize; | 5217 kLengthOffset + kIntSize; |
| 5213 | 5218 |
| 5214 static const int kExpectedNofPropertiesOffset = | 5219 static const int kExpectedNofPropertiesOffset = |
| 5215 kFormalParameterCountOffset + kIntSize; | 5220 kFormalParameterCountOffset + kIntSize; |
| 5216 static const int kNumLiteralsOffset = | 5221 static const int kNumLiteralsOffset = |
| 5217 kExpectedNofPropertiesOffset + kIntSize; | 5222 kExpectedNofPropertiesOffset + kIntSize; |
| 5218 | 5223 |
| 5219 static const int kEndPositionOffset = | 5224 static const int kEndPositionOffset = |
| 5220 kNumLiteralsOffset + kIntSize; | 5225 kNumLiteralsOffset + kIntSize; |
| (...skipping 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7983 } else { | 7988 } else { |
| 7984 value &= ~(1 << bit_position); | 7989 value &= ~(1 << bit_position); |
| 7985 } | 7990 } |
| 7986 return value; | 7991 return value; |
| 7987 } | 7992 } |
| 7988 }; | 7993 }; |
| 7989 | 7994 |
| 7990 } } // namespace v8::internal | 7995 } } // namespace v8::internal |
| 7991 | 7996 |
| 7992 #endif // V8_OBJECTS_H_ | 7997 #endif // V8_OBJECTS_H_ |
| OLD | NEW |