| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4800 } | 4800 } |
| 4801 | 4801 |
| 4802 | 4802 |
| 4803 bool SharedFunctionInfo::is_classic_mode() { | 4803 bool SharedFunctionInfo::is_classic_mode() { |
| 4804 return !BooleanBit::get(compiler_hints(), kStrictModeFunction); | 4804 return !BooleanBit::get(compiler_hints(), kStrictModeFunction); |
| 4805 } | 4805 } |
| 4806 | 4806 |
| 4807 BOOL_GETTER(SharedFunctionInfo, compiler_hints, is_extended_mode, | 4807 BOOL_GETTER(SharedFunctionInfo, compiler_hints, is_extended_mode, |
| 4808 kExtendedModeFunction) | 4808 kExtendedModeFunction) |
| 4809 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) | 4809 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) |
| 4810 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, inline_builtin, |
| 4811 kInlineBuiltin) |
| 4810 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 4812 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
| 4811 name_should_print_as_anonymous, | 4813 name_should_print_as_anonymous, |
| 4812 kNameShouldPrintAsAnonymous) | 4814 kNameShouldPrintAsAnonymous) |
| 4813 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 4815 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
| 4814 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 4816 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
| 4815 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) | 4817 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) |
| 4816 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, | 4818 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, |
| 4817 kDontOptimize) | 4819 kDontOptimize) |
| 4818 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) | 4820 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) |
| 4819 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) | 4821 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4860 | (start_position_and_type() & ~kStartPositionMask)); | 4862 | (start_position_and_type() & ~kStartPositionMask)); |
| 4861 } | 4863 } |
| 4862 | 4864 |
| 4863 | 4865 |
| 4864 Code* SharedFunctionInfo::code() { | 4866 Code* SharedFunctionInfo::code() { |
| 4865 return Code::cast(READ_FIELD(this, kCodeOffset)); | 4867 return Code::cast(READ_FIELD(this, kCodeOffset)); |
| 4866 } | 4868 } |
| 4867 | 4869 |
| 4868 | 4870 |
| 4869 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { | 4871 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { |
| 4872 ASSERT(value->kind() != Code::OPTIMIZED_FUNCTION); |
| 4870 WRITE_FIELD(this, kCodeOffset, value); | 4873 WRITE_FIELD(this, kCodeOffset, value); |
| 4871 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode); | 4874 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode); |
| 4872 } | 4875 } |
| 4873 | 4876 |
| 4874 | 4877 |
| 4875 void SharedFunctionInfo::ReplaceCode(Code* value) { | 4878 void SharedFunctionInfo::ReplaceCode(Code* value) { |
| 4876 // If the GC metadata field is already used then the function was | 4879 // If the GC metadata field is already used then the function was |
| 4877 // enqueued as a code flushing candidate and we remove it now. | 4880 // enqueued as a code flushing candidate and we remove it now. |
| 4878 if (code()->gc_metadata() != NULL) { | 4881 if (code()->gc_metadata() != NULL) { |
| 4879 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); | 4882 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); |
| (...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6400 #undef WRITE_UINT32_FIELD | 6403 #undef WRITE_UINT32_FIELD |
| 6401 #undef READ_SHORT_FIELD | 6404 #undef READ_SHORT_FIELD |
| 6402 #undef WRITE_SHORT_FIELD | 6405 #undef WRITE_SHORT_FIELD |
| 6403 #undef READ_BYTE_FIELD | 6406 #undef READ_BYTE_FIELD |
| 6404 #undef WRITE_BYTE_FIELD | 6407 #undef WRITE_BYTE_FIELD |
| 6405 | 6408 |
| 6406 | 6409 |
| 6407 } } // namespace v8::internal | 6410 } } // namespace v8::internal |
| 6408 | 6411 |
| 6409 #endif // V8_OBJECTS_INL_H_ | 6412 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |