| OLD | NEW |
| 1 // Copyright 2010 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 4240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4252 bool has_only_simple_this_property_assignments, | 4252 bool has_only_simple_this_property_assignments, |
| 4253 FixedArray* this_property_assignments); | 4253 FixedArray* this_property_assignments); |
| 4254 | 4254 |
| 4255 // Clear information on assignments of the form this.x = ...; | 4255 // Clear information on assignments of the form this.x = ...; |
| 4256 void ClearThisPropertyAssignmentsInfo(); | 4256 void ClearThisPropertyAssignmentsInfo(); |
| 4257 | 4257 |
| 4258 // Indicate that this function only consists of assignments of the form | 4258 // Indicate that this function only consists of assignments of the form |
| 4259 // this.x = y; where y is either a constant or refers to an argument. | 4259 // this.x = y; where y is either a constant or refers to an argument. |
| 4260 inline bool has_only_simple_this_property_assignments(); | 4260 inline bool has_only_simple_this_property_assignments(); |
| 4261 | 4261 |
| 4262 inline bool try_full_codegen(); | |
| 4263 inline void set_try_full_codegen(bool flag); | |
| 4264 | |
| 4265 // Indicates if this function can be lazy compiled. | 4262 // Indicates if this function can be lazy compiled. |
| 4266 // This is used to determine if we can safely flush code from a function | 4263 // This is used to determine if we can safely flush code from a function |
| 4267 // when doing GC if we expect that the function will no longer be used. | 4264 // when doing GC if we expect that the function will no longer be used. |
| 4268 inline bool allows_lazy_compilation(); | 4265 inline bool allows_lazy_compilation(); |
| 4269 inline void set_allows_lazy_compilation(bool flag); | 4266 inline void set_allows_lazy_compilation(bool flag); |
| 4270 | 4267 |
| 4271 // Indicates how many full GCs this function has survived with assigned | 4268 // Indicates how many full GCs this function has survived with assigned |
| 4272 // code object. Used to determine when it is relatively safe to flush | 4269 // code object. Used to determine when it is relatively safe to flush |
| 4273 // this code object and replace it with lazy compilation stub. | 4270 // this code object and replace it with lazy compilation stub. |
| 4274 // Age is reset when GC notices that the code object is referenced | 4271 // Age is reset when GC notices that the code object is referenced |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4454 // Bit positions in start_position_and_type. | 4451 // Bit positions in start_position_and_type. |
| 4455 // The source code start position is in the 30 most significant bits of | 4452 // The source code start position is in the 30 most significant bits of |
| 4456 // the start_position_and_type field. | 4453 // the start_position_and_type field. |
| 4457 static const int kIsExpressionBit = 0; | 4454 static const int kIsExpressionBit = 0; |
| 4458 static const int kIsTopLevelBit = 1; | 4455 static const int kIsTopLevelBit = 1; |
| 4459 static const int kStartPositionShift = 2; | 4456 static const int kStartPositionShift = 2; |
| 4460 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 4457 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
| 4461 | 4458 |
| 4462 // Bit positions in compiler_hints. | 4459 // Bit positions in compiler_hints. |
| 4463 static const int kHasOnlySimpleThisPropertyAssignments = 0; | 4460 static const int kHasOnlySimpleThisPropertyAssignments = 0; |
| 4464 static const int kTryFullCodegen = 1; | 4461 static const int kAllowLazyCompilation = 1; |
| 4465 static const int kAllowLazyCompilation = 2; | 4462 static const int kLiveObjectsMayExist = 2; |
| 4466 static const int kLiveObjectsMayExist = 3; | 4463 static const int kCodeAgeShift = 3; |
| 4467 static const int kCodeAgeShift = 4; | |
| 4468 static const int kCodeAgeMask = 0x7; | 4464 static const int kCodeAgeMask = 0x7; |
| 4469 static const int kOptimizationDisabled = 7; | 4465 static const int kOptimizationDisabled = 6; |
| 4470 static const int kStrictModeFunction = 8; | 4466 static const int kStrictModeFunction = 7; |
| 4471 | 4467 |
| 4472 private: | 4468 private: |
| 4473 #if V8_HOST_ARCH_32_BIT | 4469 #if V8_HOST_ARCH_32_BIT |
| 4474 // On 32 bit platforms, compiler hints is a smi. | 4470 // On 32 bit platforms, compiler hints is a smi. |
| 4475 static const int kCompilerHintsSmiTagSize = kSmiTagSize; | 4471 static const int kCompilerHintsSmiTagSize = kSmiTagSize; |
| 4476 static const int kCompilerHintsSize = kPointerSize; | 4472 static const int kCompilerHintsSize = kPointerSize; |
| 4477 #else | 4473 #else |
| 4478 // On 64 bit platforms, compiler hints is not a smi, see comment above. | 4474 // On 64 bit platforms, compiler hints is not a smi, see comment above. |
| 4479 static const int kCompilerHintsSmiTagSize = 0; | 4475 static const int kCompilerHintsSmiTagSize = 0; |
| 4480 static const int kCompilerHintsSize = kIntSize; | 4476 static const int kCompilerHintsSize = kIntSize; |
| (...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6657 } else { | 6653 } else { |
| 6658 value &= ~(1 << bit_position); | 6654 value &= ~(1 << bit_position); |
| 6659 } | 6655 } |
| 6660 return value; | 6656 return value; |
| 6661 } | 6657 } |
| 6662 }; | 6658 }; |
| 6663 | 6659 |
| 6664 } } // namespace v8::internal | 6660 } } // namespace v8::internal |
| 6665 | 6661 |
| 6666 #endif // V8_OBJECTS_H_ | 6662 #endif // V8_OBJECTS_H_ |
| OLD | NEW |