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 3200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3211 } | 3211 } |
3212 | 3212 |
3213 | 3213 |
3214 void SharedFunctionInfo::set_strict_mode(bool value) { | 3214 void SharedFunctionInfo::set_strict_mode(bool value) { |
3215 set_compiler_hints(BooleanBit::set(compiler_hints(), | 3215 set_compiler_hints(BooleanBit::set(compiler_hints(), |
3216 kStrictModeFunction, | 3216 kStrictModeFunction, |
3217 value)); | 3217 value)); |
3218 } | 3218 } |
3219 | 3219 |
3220 | 3220 |
| 3221 bool SharedFunctionInfo::es5_native() { |
| 3222 return BooleanBit::get(compiler_hints(), kES5Native); |
| 3223 } |
| 3224 |
| 3225 |
| 3226 void SharedFunctionInfo::set_es5_native(bool value) { |
| 3227 set_compiler_hints(BooleanBit::set(compiler_hints(), |
| 3228 kES5Native, |
| 3229 value)); |
| 3230 } |
| 3231 |
| 3232 |
3221 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3233 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
3222 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3234 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
3223 | 3235 |
3224 bool Script::HasValidSource() { | 3236 bool Script::HasValidSource() { |
3225 Object* src = this->source(); | 3237 Object* src = this->source(); |
3226 if (!src->IsString()) return true; | 3238 if (!src->IsString()) return true; |
3227 String* src_str = String::cast(src); | 3239 String* src_str = String::cast(src); |
3228 if (!StringShape(src_str).IsExternal()) return true; | 3240 if (!StringShape(src_str).IsExternal()) return true; |
3229 if (src_str->IsAsciiRepresentation()) { | 3241 if (src_str->IsAsciiRepresentation()) { |
3230 return ExternalAsciiString::cast(src)->resource() != NULL; | 3242 return ExternalAsciiString::cast(src)->resource() != NULL; |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4208 #undef WRITE_INT_FIELD | 4220 #undef WRITE_INT_FIELD |
4209 #undef READ_SHORT_FIELD | 4221 #undef READ_SHORT_FIELD |
4210 #undef WRITE_SHORT_FIELD | 4222 #undef WRITE_SHORT_FIELD |
4211 #undef READ_BYTE_FIELD | 4223 #undef READ_BYTE_FIELD |
4212 #undef WRITE_BYTE_FIELD | 4224 #undef WRITE_BYTE_FIELD |
4213 | 4225 |
4214 | 4226 |
4215 } } // namespace v8::internal | 4227 } } // namespace v8::internal |
4216 | 4228 |
4217 #endif // V8_OBJECTS_INL_H_ | 4229 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |