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 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3527 kOptimizationDisabled, | 3527 kOptimizationDisabled, |
3528 disable)); | 3528 disable)); |
3529 // If disabling optimizations we reflect that in the code object so | 3529 // If disabling optimizations we reflect that in the code object so |
3530 // it will not be counted as optimizable code. | 3530 // it will not be counted as optimizable code. |
3531 if ((code()->kind() == Code::FUNCTION) && disable) { | 3531 if ((code()->kind() == Code::FUNCTION) && disable) { |
3532 code()->set_optimizable(false); | 3532 code()->set_optimizable(false); |
3533 } | 3533 } |
3534 } | 3534 } |
3535 | 3535 |
3536 | 3536 |
3537 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, strict_mode, | 3537 BOOL_ACCESSORS(SharedFunctionInfo, |
| 3538 compiler_hints, |
| 3539 strict_mode, |
3538 kStrictModeFunction) | 3540 kStrictModeFunction) |
3539 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) | 3541 |
3540 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 3542 |
3541 name_should_print_as_anonymous, | 3543 bool SharedFunctionInfo::native() { |
3542 kNameShouldPrintAsAnonymous) | 3544 return BooleanBit::get(compiler_hints(), kNative); |
3543 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 3545 } |
| 3546 |
| 3547 |
| 3548 void SharedFunctionInfo::set_native(bool value) { |
| 3549 set_compiler_hints(BooleanBit::set(compiler_hints(), |
| 3550 kNative, |
| 3551 value)); |
| 3552 } |
| 3553 |
| 3554 |
| 3555 bool SharedFunctionInfo::bound() { |
| 3556 return BooleanBit::get(compiler_hints(), kBoundFunction); |
| 3557 } |
| 3558 |
| 3559 |
| 3560 void SharedFunctionInfo::set_bound(bool value) { |
| 3561 set_compiler_hints(BooleanBit::set(compiler_hints(), |
| 3562 kBoundFunction, |
| 3563 value)); |
| 3564 } |
| 3565 |
3544 | 3566 |
3545 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3567 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
3546 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3568 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
3547 | 3569 |
3548 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 3570 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
3549 | 3571 |
3550 bool Script::HasValidSource() { | 3572 bool Script::HasValidSource() { |
3551 Object* src = this->source(); | 3573 Object* src = this->source(); |
3552 if (!src->IsString()) return true; | 3574 if (!src->IsString()) return true; |
3553 String* src_str = String::cast(src); | 3575 String* src_str = String::cast(src); |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4605 #undef WRITE_INT_FIELD | 4627 #undef WRITE_INT_FIELD |
4606 #undef READ_SHORT_FIELD | 4628 #undef READ_SHORT_FIELD |
4607 #undef WRITE_SHORT_FIELD | 4629 #undef WRITE_SHORT_FIELD |
4608 #undef READ_BYTE_FIELD | 4630 #undef READ_BYTE_FIELD |
4609 #undef WRITE_BYTE_FIELD | 4631 #undef WRITE_BYTE_FIELD |
4610 | 4632 |
4611 | 4633 |
4612 } } // namespace v8::internal | 4634 } } // namespace v8::internal |
4613 | 4635 |
4614 #endif // V8_OBJECTS_INL_H_ | 4636 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |