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) | |
4812 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 4810 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
4813 name_should_print_as_anonymous, | 4811 name_should_print_as_anonymous, |
4814 kNameShouldPrintAsAnonymous) | 4812 kNameShouldPrintAsAnonymous) |
4815 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 4813 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
4816 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 4814 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
4817 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) | 4815 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) |
4818 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, | 4816 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_optimize, |
4819 kDontOptimize) | 4817 kDontOptimize) |
4820 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) | 4818 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) |
4821 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) | 4819 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4862 | (start_position_and_type() & ~kStartPositionMask)); | 4860 | (start_position_and_type() & ~kStartPositionMask)); |
4863 } | 4861 } |
4864 | 4862 |
4865 | 4863 |
4866 Code* SharedFunctionInfo::code() { | 4864 Code* SharedFunctionInfo::code() { |
4867 return Code::cast(READ_FIELD(this, kCodeOffset)); | 4865 return Code::cast(READ_FIELD(this, kCodeOffset)); |
4868 } | 4866 } |
4869 | 4867 |
4870 | 4868 |
4871 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { | 4869 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { |
4872 ASSERT(value->kind() != Code::OPTIMIZED_FUNCTION); | |
4873 WRITE_FIELD(this, kCodeOffset, value); | 4870 WRITE_FIELD(this, kCodeOffset, value); |
4874 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode); | 4871 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode); |
4875 } | 4872 } |
4876 | 4873 |
4877 | 4874 |
4878 void SharedFunctionInfo::ReplaceCode(Code* value) { | 4875 void SharedFunctionInfo::ReplaceCode(Code* value) { |
4879 // If the GC metadata field is already used then the function was | 4876 // If the GC metadata field is already used then the function was |
4880 // enqueued as a code flushing candidate and we remove it now. | 4877 // enqueued as a code flushing candidate and we remove it now. |
4881 if (code()->gc_metadata() != NULL) { | 4878 if (code()->gc_metadata() != NULL) { |
4882 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); | 4879 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6413 #undef WRITE_UINT32_FIELD | 6410 #undef WRITE_UINT32_FIELD |
6414 #undef READ_SHORT_FIELD | 6411 #undef READ_SHORT_FIELD |
6415 #undef WRITE_SHORT_FIELD | 6412 #undef WRITE_SHORT_FIELD |
6416 #undef READ_BYTE_FIELD | 6413 #undef READ_BYTE_FIELD |
6417 #undef WRITE_BYTE_FIELD | 6414 #undef WRITE_BYTE_FIELD |
6418 | 6415 |
6419 | 6416 |
6420 } } // namespace v8::internal | 6417 } } // namespace v8::internal |
6421 | 6418 |
6422 #endif // V8_OBJECTS_INL_H_ | 6419 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |