| 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 3536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3547 | 3547 |
| 3548 | 3548 |
| 3549 BOOL_GETTER(SharedFunctionInfo, compiler_hints, strict_mode, | 3549 BOOL_GETTER(SharedFunctionInfo, compiler_hints, strict_mode, |
| 3550 kStrictModeFunction) | 3550 kStrictModeFunction) |
| 3551 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) | 3551 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) |
| 3552 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 3552 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
| 3553 name_should_print_as_anonymous, | 3553 name_should_print_as_anonymous, |
| 3554 kNameShouldPrintAsAnonymous) | 3554 kNameShouldPrintAsAnonymous) |
| 3555 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 3555 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
| 3556 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 3556 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
| 3557 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_primitive, kIsPrimitive) |
| 3558 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_inlineable, kIsInlineable) |
| 3559 |
| 3560 |
| 3561 int SharedFunctionInfo::ast_node_count() { |
| 3562 return (compiler_hints() >> kAstNodeCountShift) & kAstNodeCountMask; |
| 3563 } |
| 3564 |
| 3565 |
| 3566 void SharedFunctionInfo::set_ast_node_count(int ast_node_count) { |
| 3567 if (ast_node_count > kAstNodeCountMask) { |
| 3568 ast_node_count = kAstNodeCountMask; |
| 3569 } |
| 3570 set_compiler_hints((compiler_hints() & |
| 3571 (~(kAstNodeCountMask << kAstNodeCountShift))) | |
| 3572 (ast_node_count << kAstNodeCountShift)); |
| 3573 } |
| 3574 |
| 3557 | 3575 |
| 3558 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 3576 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
| 3559 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 3577 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
| 3560 | 3578 |
| 3561 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 3579 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
| 3562 | 3580 |
| 3563 bool Script::HasValidSource() { | 3581 bool Script::HasValidSource() { |
| 3564 Object* src = this->source(); | 3582 Object* src = this->source(); |
| 3565 if (!src->IsString()) return true; | 3583 if (!src->IsString()) return true; |
| 3566 String* src_str = String::cast(src); | 3584 String* src_str = String::cast(src); |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4669 #undef WRITE_INT_FIELD | 4687 #undef WRITE_INT_FIELD |
| 4670 #undef READ_SHORT_FIELD | 4688 #undef READ_SHORT_FIELD |
| 4671 #undef WRITE_SHORT_FIELD | 4689 #undef WRITE_SHORT_FIELD |
| 4672 #undef READ_BYTE_FIELD | 4690 #undef READ_BYTE_FIELD |
| 4673 #undef WRITE_BYTE_FIELD | 4691 #undef WRITE_BYTE_FIELD |
| 4674 | 4692 |
| 4675 | 4693 |
| 4676 } } // namespace v8::internal | 4694 } } // namespace v8::internal |
| 4677 | 4695 |
| 4678 #endif // V8_OBJECTS_INL_H_ | 4696 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |