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 5295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5306 DECL_BOOLEAN_ACCESSORS(name_should_print_as_anonymous) | 5306 DECL_BOOLEAN_ACCESSORS(name_should_print_as_anonymous) |
5307 | 5307 |
5308 // Indicates whether the function is a bound function created using | 5308 // Indicates whether the function is a bound function created using |
5309 // the bind function. | 5309 // the bind function. |
5310 DECL_BOOLEAN_ACCESSORS(bound) | 5310 DECL_BOOLEAN_ACCESSORS(bound) |
5311 | 5311 |
5312 // Indicates that the function is anonymous (the name field can be set | 5312 // Indicates that the function is anonymous (the name field can be set |
5313 // through the API, which does not change this flag). | 5313 // through the API, which does not change this flag). |
5314 DECL_BOOLEAN_ACCESSORS(is_anonymous) | 5314 DECL_BOOLEAN_ACCESSORS(is_anonymous) |
5315 | 5315 |
5316 // Indicates that the function cannot be crankshafted. | 5316 // Is this a function or top-level/eval code. |
5317 DECL_BOOLEAN_ACCESSORS(dont_crankshaft) | 5317 DECL_BOOLEAN_ACCESSORS(is_function) |
| 5318 |
| 5319 // Indicates that the function cannot be optimized. |
| 5320 DECL_BOOLEAN_ACCESSORS(dont_optimize) |
5318 | 5321 |
5319 // Indicates that the function cannot be inlined. | 5322 // Indicates that the function cannot be inlined. |
5320 DECL_BOOLEAN_ACCESSORS(dont_inline) | 5323 DECL_BOOLEAN_ACCESSORS(dont_inline) |
5321 | 5324 |
5322 // Indicates whether or not the code in the shared function support | 5325 // Indicates whether or not the code in the shared function support |
5323 // deoptimization. | 5326 // deoptimization. |
5324 inline bool has_deoptimization_support(); | 5327 inline bool has_deoptimization_support(); |
5325 | 5328 |
5326 // Enable deoptimization support through recompiled code. | 5329 // Enable deoptimization support through recompiled code. |
5327 void EnableDeoptimizationSupport(Code* recompiled); | 5330 void EnableDeoptimizationSupport(Code* recompiled); |
5328 | 5331 |
5329 // Disable (further) attempted optimization of all functions sharing this | 5332 // Disable (further) attempted optimization of all functions sharing this |
5330 // shared function info. The function is the one we actually tried to | 5333 // shared function info. |
5331 // optimize. | 5334 void DisableOptimization(); |
5332 void DisableOptimization(JSFunction* function); | |
5333 | 5335 |
5334 // Lookup the bailout ID and ASSERT that it exists in the non-optimized | 5336 // Lookup the bailout ID and ASSERT that it exists in the non-optimized |
5335 // code, returns whether it asserted (i.e., always true if assertions are | 5337 // code, returns whether it asserted (i.e., always true if assertions are |
5336 // disabled). | 5338 // disabled). |
5337 bool VerifyBailoutId(int id); | 5339 bool VerifyBailoutId(int id); |
5338 | 5340 |
5339 // Check whether a inlined constructor can be generated with the given | 5341 // Check whether a inlined constructor can be generated with the given |
5340 // prototype. | 5342 // prototype. |
5341 bool CanGenerateInlineConstructor(Object* prototype); | 5343 bool CanGenerateInlineConstructor(Object* prototype); |
5342 | 5344 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5520 kCodeAgeShift, | 5522 kCodeAgeShift, |
5521 kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize, | 5523 kOptimizationDisabled = kCodeAgeShift + kCodeAgeSize, |
5522 kStrictModeFunction, | 5524 kStrictModeFunction, |
5523 kExtendedModeFunction, | 5525 kExtendedModeFunction, |
5524 kUsesArguments, | 5526 kUsesArguments, |
5525 kHasDuplicateParameters, | 5527 kHasDuplicateParameters, |
5526 kNative, | 5528 kNative, |
5527 kBoundFunction, | 5529 kBoundFunction, |
5528 kIsAnonymous, | 5530 kIsAnonymous, |
5529 kNameShouldPrintAsAnonymous, | 5531 kNameShouldPrintAsAnonymous, |
5530 kDontCrankshaft, | 5532 kIsFunction, |
| 5533 kDontOptimize, |
5531 kDontInline, | 5534 kDontInline, |
5532 kCompilerHintsCount // Pseudo entry | 5535 kCompilerHintsCount // Pseudo entry |
5533 }; | 5536 }; |
5534 | 5537 |
5535 private: | 5538 private: |
5536 #if V8_HOST_ARCH_32_BIT | 5539 #if V8_HOST_ARCH_32_BIT |
5537 // On 32 bit platforms, compiler hints is a smi. | 5540 // On 32 bit platforms, compiler hints is a smi. |
5538 static const int kCompilerHintsSmiTagSize = kSmiTagSize; | 5541 static const int kCompilerHintsSmiTagSize = kSmiTagSize; |
5539 static const int kCompilerHintsSize = kPointerSize; | 5542 static const int kCompilerHintsSize = kPointerSize; |
5540 #else | 5543 #else |
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8296 } else { | 8299 } else { |
8297 value &= ~(1 << bit_position); | 8300 value &= ~(1 << bit_position); |
8298 } | 8301 } |
8299 return value; | 8302 return value; |
8300 } | 8303 } |
8301 }; | 8304 }; |
8302 | 8305 |
8303 } } // namespace v8::internal | 8306 } } // namespace v8::internal |
8304 | 8307 |
8305 #endif // V8_OBJECTS_H_ | 8308 #endif // V8_OBJECTS_H_ |
OLD | NEW |