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 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2977 kOptimizationDisabled, | 2977 kOptimizationDisabled, |
2978 disable)); | 2978 disable)); |
2979 // If disabling optimizations we reflect that in the code object so | 2979 // If disabling optimizations we reflect that in the code object so |
2980 // it will not be counted as optimizable code. | 2980 // it will not be counted as optimizable code. |
2981 if ((code()->kind() == Code::FUNCTION) && disable) { | 2981 if ((code()->kind() == Code::FUNCTION) && disable) { |
2982 code()->set_optimizable(false); | 2982 code()->set_optimizable(false); |
2983 } | 2983 } |
2984 } | 2984 } |
2985 | 2985 |
2986 | 2986 |
| 2987 bool SharedFunctionInfo::strict_mode() { |
| 2988 return BooleanBit::get(compiler_hints(), kStrictModeFunction); |
| 2989 } |
| 2990 |
| 2991 |
| 2992 void SharedFunctionInfo::set_strict_mode(bool value) { |
| 2993 set_compiler_hints(BooleanBit::set(compiler_hints(), |
| 2994 kStrictModeFunction, |
| 2995 value)); |
| 2996 } |
| 2997 |
| 2998 |
2987 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 2999 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
2988 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3000 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
2989 | 3001 |
2990 bool Script::HasValidSource() { | 3002 bool Script::HasValidSource() { |
2991 Object* src = this->source(); | 3003 Object* src = this->source(); |
2992 if (!src->IsString()) return true; | 3004 if (!src->IsString()) return true; |
2993 String* src_str = String::cast(src); | 3005 String* src_str = String::cast(src); |
2994 if (!StringShape(src_str).IsExternal()) return true; | 3006 if (!StringShape(src_str).IsExternal()) return true; |
2995 if (src_str->IsAsciiRepresentation()) { | 3007 if (src_str->IsAsciiRepresentation()) { |
2996 return ExternalAsciiString::cast(src)->resource() != NULL; | 3008 return ExternalAsciiString::cast(src)->resource() != NULL; |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3876 #undef WRITE_INT_FIELD | 3888 #undef WRITE_INT_FIELD |
3877 #undef READ_SHORT_FIELD | 3889 #undef READ_SHORT_FIELD |
3878 #undef WRITE_SHORT_FIELD | 3890 #undef WRITE_SHORT_FIELD |
3879 #undef READ_BYTE_FIELD | 3891 #undef READ_BYTE_FIELD |
3880 #undef WRITE_BYTE_FIELD | 3892 #undef WRITE_BYTE_FIELD |
3881 | 3893 |
3882 | 3894 |
3883 } } // namespace v8::internal | 3895 } } // namespace v8::internal |
3884 | 3896 |
3885 #endif // V8_OBJECTS_INL_H_ | 3897 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |