| 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 3419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3430 kOptimizationDisabled, | 3430 kOptimizationDisabled, |
| 3431 disable)); | 3431 disable)); |
| 3432 // If disabling optimizations we reflect that in the code object so | 3432 // If disabling optimizations we reflect that in the code object so |
| 3433 // it will not be counted as optimizable code. | 3433 // it will not be counted as optimizable code. |
| 3434 if ((code()->kind() == Code::FUNCTION) && disable) { | 3434 if ((code()->kind() == Code::FUNCTION) && disable) { |
| 3435 code()->set_optimizable(false); | 3435 code()->set_optimizable(false); |
| 3436 } | 3436 } |
| 3437 } | 3437 } |
| 3438 | 3438 |
| 3439 | 3439 |
| 3440 BOOL_ACCESSORS(SharedFunctionInfo, | 3440 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, strict_mode, |
| 3441 compiler_hints, | |
| 3442 strict_mode, | |
| 3443 kStrictModeFunction) | 3441 kStrictModeFunction) |
| 3444 | 3442 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) |
| 3445 | 3443 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
| 3446 bool SharedFunctionInfo::native() { | 3444 name_should_print_as_anonymous, |
| 3447 return BooleanBit::get(compiler_hints(), kNative); | 3445 kNameShouldPrintAsAnonymous) |
| 3448 } | 3446 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
| 3449 | 3447 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
| 3450 | |
| 3451 void SharedFunctionInfo::set_native(bool value) { | |
| 3452 set_compiler_hints(BooleanBit::set(compiler_hints(), | |
| 3453 kNative, | |
| 3454 value)); | |
| 3455 } | |
| 3456 | |
| 3457 | |
| 3458 bool SharedFunctionInfo::bound() { | |
| 3459 return BooleanBit::get(compiler_hints(), kBoundFunction); | |
| 3460 } | |
| 3461 | |
| 3462 | |
| 3463 void SharedFunctionInfo::set_bound(bool value) { | |
| 3464 set_compiler_hints(BooleanBit::set(compiler_hints(), | |
| 3465 kBoundFunction, | |
| 3466 value)); | |
| 3467 } | |
| 3468 | |
| 3469 | 3448 |
| 3470 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3449 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
| 3471 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3450 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
| 3472 | 3451 |
| 3473 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 3452 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
| 3474 | 3453 |
| 3475 bool Script::HasValidSource() { | 3454 bool Script::HasValidSource() { |
| 3476 Object* src = this->source(); | 3455 Object* src = this->source(); |
| 3477 if (!src->IsString()) return true; | 3456 if (!src->IsString()) return true; |
| 3478 String* src_str = String::cast(src); | 3457 String* src_str = String::cast(src); |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4481 #undef WRITE_INT_FIELD | 4460 #undef WRITE_INT_FIELD |
| 4482 #undef READ_SHORT_FIELD | 4461 #undef READ_SHORT_FIELD |
| 4483 #undef WRITE_SHORT_FIELD | 4462 #undef WRITE_SHORT_FIELD |
| 4484 #undef READ_BYTE_FIELD | 4463 #undef READ_BYTE_FIELD |
| 4485 #undef WRITE_BYTE_FIELD | 4464 #undef WRITE_BYTE_FIELD |
| 4486 | 4465 |
| 4487 | 4466 |
| 4488 } } // namespace v8::internal | 4467 } } // namespace v8::internal |
| 4489 | 4468 |
| 4490 #endif // V8_OBJECTS_INL_H_ | 4469 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |