OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 5210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5221 | 5221 |
5222 | 5222 |
5223 void SharedFunctionInfo::ReplaceCode(Code* value) { | 5223 void SharedFunctionInfo::ReplaceCode(Code* value) { |
5224 // If the GC metadata field is already used then the function was | 5224 // If the GC metadata field is already used then the function was |
5225 // enqueued as a code flushing candidate and we remove it now. | 5225 // enqueued as a code flushing candidate and we remove it now. |
5226 if (code()->gc_metadata() != NULL) { | 5226 if (code()->gc_metadata() != NULL) { |
5227 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); | 5227 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); |
5228 flusher->EvictCandidate(this); | 5228 flusher->EvictCandidate(this); |
5229 } | 5229 } |
5230 | 5230 |
5231 #ifdef DEBUG | |
5232 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL); | 5231 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL); |
5233 Code::VerifyRecompiledCode(code(), value); | |
5234 #endif // DEBUG | |
5235 | 5232 |
5236 set_code(value); | 5233 set_code(value); |
5237 | 5234 |
5238 if (is_compiled()) set_never_compiled(false); | 5235 if (is_compiled()) set_never_compiled(false); |
5239 } | 5236 } |
5240 | 5237 |
5241 | 5238 |
5242 ScopeInfo* SharedFunctionInfo::scope_info() const { | 5239 ScopeInfo* SharedFunctionInfo::scope_info() const { |
5243 return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset)); | 5240 return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset)); |
5244 } | 5241 } |
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7096 #undef READ_SHORT_FIELD | 7093 #undef READ_SHORT_FIELD |
7097 #undef WRITE_SHORT_FIELD | 7094 #undef WRITE_SHORT_FIELD |
7098 #undef READ_BYTE_FIELD | 7095 #undef READ_BYTE_FIELD |
7099 #undef WRITE_BYTE_FIELD | 7096 #undef WRITE_BYTE_FIELD |
7100 #undef NOBARRIER_READ_BYTE_FIELD | 7097 #undef NOBARRIER_READ_BYTE_FIELD |
7101 #undef NOBARRIER_WRITE_BYTE_FIELD | 7098 #undef NOBARRIER_WRITE_BYTE_FIELD |
7102 | 7099 |
7103 } } // namespace v8::internal | 7100 } } // namespace v8::internal |
7104 | 7101 |
7105 #endif // V8_OBJECTS_INL_H_ | 7102 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |