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); |
| 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 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6424 } else { | 6429 } else { |
6425 value &= ~(1 << bit_position); | 6430 value &= ~(1 << bit_position); |
6426 } | 6431 } |
6427 return value; | 6432 return value; |
6428 } | 6433 } |
6429 }; | 6434 }; |
6430 | 6435 |
6431 } } // namespace v8::internal | 6436 } } // namespace v8::internal |
6432 | 6437 |
6433 #endif // V8_OBJECTS_H_ | 6438 #endif // V8_OBJECTS_H_ |
OLD | NEW |