OLD | NEW |
1 // Copyright 2011 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 |
(...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3563 kOptimizationDisabled, | 3563 kOptimizationDisabled, |
3564 disable)); | 3564 disable)); |
3565 // If disabling optimizations we reflect that in the code object so | 3565 // If disabling optimizations we reflect that in the code object so |
3566 // it will not be counted as optimizable code. | 3566 // it will not be counted as optimizable code. |
3567 if ((code()->kind() == Code::FUNCTION) && disable) { | 3567 if ((code()->kind() == Code::FUNCTION) && disable) { |
3568 code()->set_optimizable(false); | 3568 code()->set_optimizable(false); |
3569 } | 3569 } |
3570 } | 3570 } |
3571 | 3571 |
3572 | 3572 |
3573 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, strict_mode, | 3573 StrictModeFlag SharedFunctionInfo::strict_mode_flag() { |
3574 kStrictModeFunction) | 3574 return BooleanBit::get(compiler_hints(), kStrictModeFunction) |
| 3575 ? kStrictMode : kNonStrictMode; |
| 3576 } |
| 3577 |
| 3578 |
| 3579 void SharedFunctionInfo::set_strict_mode_flag(StrictModeFlag strict_mode_flag) { |
| 3580 ASSERT(strict_mode_flag == kStrictMode || |
| 3581 strict_mode_flag == kNonStrictMode); |
| 3582 bool value = strict_mode_flag == kStrictMode; |
| 3583 set_compiler_hints( |
| 3584 BooleanBit::set(compiler_hints(), kStrictModeFunction, value)); |
| 3585 } |
| 3586 |
| 3587 |
| 3588 BOOL_GETTER(SharedFunctionInfo, compiler_hints, strict_mode, |
| 3589 kStrictModeFunction) |
3575 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) | 3590 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) |
3576 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 3591 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
3577 name_should_print_as_anonymous, | 3592 name_should_print_as_anonymous, |
3578 kNameShouldPrintAsAnonymous) | 3593 kNameShouldPrintAsAnonymous) |
3579 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 3594 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
3580 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 3595 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
3581 | 3596 |
3582 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3597 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
3583 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3598 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
3584 | 3599 |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4694 #undef WRITE_INT_FIELD | 4709 #undef WRITE_INT_FIELD |
4695 #undef READ_SHORT_FIELD | 4710 #undef READ_SHORT_FIELD |
4696 #undef WRITE_SHORT_FIELD | 4711 #undef WRITE_SHORT_FIELD |
4697 #undef READ_BYTE_FIELD | 4712 #undef READ_BYTE_FIELD |
4698 #undef WRITE_BYTE_FIELD | 4713 #undef WRITE_BYTE_FIELD |
4699 | 4714 |
4700 | 4715 |
4701 } } // namespace v8::internal | 4716 } } // namespace v8::internal |
4702 | 4717 |
4703 #endif // V8_OBJECTS_INL_H_ | 4718 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |