| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 5326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5337 profiler_ticks, | 5337 profiler_ticks, |
| 5338 kProfilerTicksOffset) | 5338 kProfilerTicksOffset) |
| 5339 | 5339 |
| 5340 #endif | 5340 #endif |
| 5341 | 5341 |
| 5342 | 5342 |
| 5343 BOOL_GETTER(SharedFunctionInfo, | 5343 BOOL_GETTER(SharedFunctionInfo, |
| 5344 compiler_hints, | 5344 compiler_hints, |
| 5345 optimization_disabled, | 5345 optimization_disabled, |
| 5346 kOptimizationDisabled) | 5346 kOptimizationDisabled) |
| 5347 BOOL_GETTER(SharedFunctionInfo, |
| 5348 compiler_hints, |
| 5349 optimistic_optimizations, |
| 5350 kOptimisticOptimizations) |
| 5351 |
| 5352 |
| 5353 bool SharedFunctionInfo::use_optimistic_optimizations() { |
| 5354 return BooleanBit::get(compiler_hints(), kOptimisticOptimizations) |
| 5355 ? false : true; |
| 5356 } |
| 5357 |
| 5358 |
| 5359 void SharedFunctionInfo::disable_optimistic_optimizations() { |
| 5360 set_compiler_hints(BooleanBit::set(compiler_hints(), |
| 5361 kOptimisticOptimizations, |
| 5362 true)); |
| 5363 } |
| 5347 | 5364 |
| 5348 | 5365 |
| 5349 void SharedFunctionInfo::set_optimization_disabled(bool disable) { | 5366 void SharedFunctionInfo::set_optimization_disabled(bool disable) { |
| 5350 set_compiler_hints(BooleanBit::set(compiler_hints(), | 5367 set_compiler_hints(BooleanBit::set(compiler_hints(), |
| 5351 kOptimizationDisabled, | 5368 kOptimizationDisabled, |
| 5352 disable)); | 5369 disable)); |
| 5353 // If disabling optimizations we reflect that in the code object so | 5370 // If disabling optimizations we reflect that in the code object so |
| 5354 // it will not be counted as optimizable code. | 5371 // it will not be counted as optimizable code. |
| 5355 if ((code()->kind() == Code::FUNCTION) && disable) { | 5372 if ((code()->kind() == Code::FUNCTION) && disable) { |
| 5356 code()->set_optimizable(false); | 5373 code()->set_optimizable(false); |
| (...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6985 #undef READ_SHORT_FIELD | 7002 #undef READ_SHORT_FIELD |
| 6986 #undef WRITE_SHORT_FIELD | 7003 #undef WRITE_SHORT_FIELD |
| 6987 #undef READ_BYTE_FIELD | 7004 #undef READ_BYTE_FIELD |
| 6988 #undef WRITE_BYTE_FIELD | 7005 #undef WRITE_BYTE_FIELD |
| 6989 #undef NOBARRIER_READ_BYTE_FIELD | 7006 #undef NOBARRIER_READ_BYTE_FIELD |
| 6990 #undef NOBARRIER_WRITE_BYTE_FIELD | 7007 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 6991 | 7008 |
| 6992 } } // namespace v8::internal | 7009 } } // namespace v8::internal |
| 6993 | 7010 |
| 6994 #endif // V8_OBJECTS_INL_H_ | 7011 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |