OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4163 inline int code_age(); | 4163 inline int code_age(); |
4164 inline void set_code_age(int age); | 4164 inline void set_code_age(int age); |
4165 | 4165 |
4166 // Indicates whether optimizations have been disabled for this | 4166 // Indicates whether optimizations have been disabled for this |
4167 // shared function info. If a function is repeatedly optimized or if | 4167 // shared function info. If a function is repeatedly optimized or if |
4168 // we cannot optimize the function we disable optimization to avoid | 4168 // we cannot optimize the function we disable optimization to avoid |
4169 // spending time attempting to optimize it again. | 4169 // spending time attempting to optimize it again. |
4170 inline bool optimization_disabled(); | 4170 inline bool optimization_disabled(); |
4171 inline void set_optimization_disabled(bool value); | 4171 inline void set_optimization_disabled(bool value); |
4172 | 4172 |
4173 // Indicates whether the function is a strict mode function. | |
4174 inline bool strict_mode(); | |
4175 inline void set_strict_mode(bool value); | |
Lasse Reichstein
2011/02/03 12:36:01
Is the argument needed? I.e., do we ever set a fun
Martin Maly
2011/02/04 01:02:34
Strictly speaking, the argument is not needed (ass
| |
4176 | |
4173 // Indicates whether or not the code in the shared function support | 4177 // Indicates whether or not the code in the shared function support |
4174 // deoptimization. | 4178 // deoptimization. |
4175 inline bool has_deoptimization_support(); | 4179 inline bool has_deoptimization_support(); |
4176 | 4180 |
4177 // Enable deoptimization support through recompiled code. | 4181 // Enable deoptimization support through recompiled code. |
4178 void EnableDeoptimizationSupport(Code* recompiled); | 4182 void EnableDeoptimizationSupport(Code* recompiled); |
4179 | 4183 |
4180 // Lookup the bailout ID and ASSERT that it exists in the non-optimized | 4184 // Lookup the bailout ID and ASSERT that it exists in the non-optimized |
4181 // code, returns whether it asserted (i.e., always true if assertions are | 4185 // code, returns whether it asserted (i.e., always true if assertions are |
4182 // disabled). | 4186 // disabled). |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4344 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 4348 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
4345 | 4349 |
4346 // Bit positions in compiler_hints. | 4350 // Bit positions in compiler_hints. |
4347 static const int kHasOnlySimpleThisPropertyAssignments = 0; | 4351 static const int kHasOnlySimpleThisPropertyAssignments = 0; |
4348 static const int kTryFullCodegen = 1; | 4352 static const int kTryFullCodegen = 1; |
4349 static const int kAllowLazyCompilation = 2; | 4353 static const int kAllowLazyCompilation = 2; |
4350 static const int kLiveObjectsMayExist = 3; | 4354 static const int kLiveObjectsMayExist = 3; |
4351 static const int kCodeAgeShift = 4; | 4355 static const int kCodeAgeShift = 4; |
4352 static const int kCodeAgeMask = 0x7; | 4356 static const int kCodeAgeMask = 0x7; |
4353 static const int kOptimizationDisabled = 7; | 4357 static const int kOptimizationDisabled = 7; |
4358 static const int kStrictModeFunction = 8; | |
4354 | 4359 |
4355 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 4360 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
4356 }; | 4361 }; |
4357 | 4362 |
4358 | 4363 |
4359 // JSFunction describes JavaScript functions. | 4364 // JSFunction describes JavaScript functions. |
4360 class JSFunction: public JSObject { | 4365 class JSFunction: public JSObject { |
4361 public: | 4366 public: |
4362 // [prototype_or_initial_map]: | 4367 // [prototype_or_initial_map]: |
4363 DECL_ACCESSORS(prototype_or_initial_map, Object) | 4368 DECL_ACCESSORS(prototype_or_initial_map, Object) |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4827 static const int kPrefixSize = 0; | 4832 static const int kPrefixSize = 0; |
4828 static const int kEntrySize = 2; | 4833 static const int kEntrySize = 2; |
4829 }; | 4834 }; |
4830 | 4835 |
4831 | 4836 |
4832 class CompilationCacheTable: public HashTable<CompilationCacheShape, | 4837 class CompilationCacheTable: public HashTable<CompilationCacheShape, |
4833 HashTableKey*> { | 4838 HashTableKey*> { |
4834 public: | 4839 public: |
4835 // Find cached value for a string key, otherwise return null. | 4840 // Find cached value for a string key, otherwise return null. |
4836 Object* Lookup(String* src); | 4841 Object* Lookup(String* src); |
4837 Object* LookupEval(String* src, Context* context); | 4842 Object* LookupEval(String* src, Context* context, bool is_strict); |
4838 Object* LookupRegExp(String* source, JSRegExp::Flags flags); | 4843 Object* LookupRegExp(String* source, JSRegExp::Flags flags); |
4839 MaybeObject* Put(String* src, Object* value); | 4844 MaybeObject* Put(String* src, Object* value); |
4840 MaybeObject* PutEval(String* src, Context* context, Object* value); | 4845 MaybeObject* PutEval(String* src, |
4846 Context* context, | |
4847 SharedFunctionInfo* value); | |
Martin Maly
2011/02/02 23:56:22
All callers passed SharedFunctionInfo so it seems
| |
4841 MaybeObject* PutRegExp(String* src, JSRegExp::Flags flags, FixedArray* value); | 4848 MaybeObject* PutRegExp(String* src, JSRegExp::Flags flags, FixedArray* value); |
4842 | 4849 |
4843 // Remove given value from cache. | 4850 // Remove given value from cache. |
4844 void Remove(Object* value); | 4851 void Remove(Object* value); |
4845 | 4852 |
4846 static inline CompilationCacheTable* cast(Object* obj); | 4853 static inline CompilationCacheTable* cast(Object* obj); |
4847 | 4854 |
4848 private: | 4855 private: |
4849 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); | 4856 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); |
4850 }; | 4857 }; |
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6424 } else { | 6431 } else { |
6425 value &= ~(1 << bit_position); | 6432 value &= ~(1 << bit_position); |
6426 } | 6433 } |
6427 return value; | 6434 return value; |
6428 } | 6435 } |
6429 }; | 6436 }; |
6430 | 6437 |
6431 } } // namespace v8::internal | 6438 } } // namespace v8::internal |
6432 | 6439 |
6433 #endif // V8_OBJECTS_H_ | 6440 #endif // V8_OBJECTS_H_ |
OLD | NEW |