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 6109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6120 | 6120 |
6121 #endif | 6121 #endif |
6122 | 6122 |
6123 | 6123 |
6124 BOOL_GETTER(SharedFunctionInfo, | 6124 BOOL_GETTER(SharedFunctionInfo, |
6125 compiler_hints, | 6125 compiler_hints, |
6126 optimization_disabled, | 6126 optimization_disabled, |
6127 kOptimizationDisabled) | 6127 kOptimizationDisabled) |
6128 | 6128 |
6129 AbstractCode* SharedFunctionInfo::abstract_code() { | 6129 AbstractCode* SharedFunctionInfo::abstract_code() { |
6130 if (HasBytecodeArray()) { | 6130 if ((!is_compiled() && HasBytecodeArray()) || IsInterpreted()) { |
6131 return AbstractCode::cast(bytecode_array()); | 6131 return AbstractCode::cast(bytecode_array()); |
6132 } else { | 6132 } else { |
6133 return AbstractCode::cast(code()); | 6133 return AbstractCode::cast(code()); |
6134 } | 6134 } |
6135 } | 6135 } |
6136 | 6136 |
6137 void SharedFunctionInfo::set_optimization_disabled(bool disable) { | 6137 void SharedFunctionInfo::set_optimization_disabled(bool disable) { |
6138 set_compiler_hints(BooleanBit::set(compiler_hints(), | 6138 set_compiler_hints(BooleanBit::set(compiler_hints(), |
6139 kOptimizationDisabled, | 6139 kOptimizationDisabled, |
6140 disable)); | 6140 disable)); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6538 void Map::InobjectSlackTrackingStep() { | 6538 void Map::InobjectSlackTrackingStep() { |
6539 if (!IsInobjectSlackTrackingInProgress()) return; | 6539 if (!IsInobjectSlackTrackingInProgress()) return; |
6540 int counter = construction_counter(); | 6540 int counter = construction_counter(); |
6541 set_construction_counter(counter - 1); | 6541 set_construction_counter(counter - 1); |
6542 if (counter == kSlackTrackingCounterEnd) { | 6542 if (counter == kSlackTrackingCounterEnd) { |
6543 CompleteInobjectSlackTracking(); | 6543 CompleteInobjectSlackTracking(); |
6544 } | 6544 } |
6545 } | 6545 } |
6546 | 6546 |
6547 AbstractCode* JSFunction::abstract_code() { | 6547 AbstractCode* JSFunction::abstract_code() { |
6548 if (IsInterpreted()) { | 6548 if ((!is_compiled() && shared()->HasBytecodeArray()) || IsInterpreted()) { |
6549 return AbstractCode::cast(shared()->bytecode_array()); | 6549 return AbstractCode::cast(shared()->bytecode_array()); |
6550 } else { | 6550 } else { |
6551 return AbstractCode::cast(code()); | 6551 return AbstractCode::cast(code()); |
6552 } | 6552 } |
6553 } | 6553 } |
6554 | 6554 |
6555 Code* JSFunction::code() { | 6555 Code* JSFunction::code() { |
6556 return Code::cast( | 6556 return Code::cast( |
6557 Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); | 6557 Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); |
6558 } | 6558 } |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8431 #undef WRITE_INT64_FIELD | 8431 #undef WRITE_INT64_FIELD |
8432 #undef READ_BYTE_FIELD | 8432 #undef READ_BYTE_FIELD |
8433 #undef WRITE_BYTE_FIELD | 8433 #undef WRITE_BYTE_FIELD |
8434 #undef NOBARRIER_READ_BYTE_FIELD | 8434 #undef NOBARRIER_READ_BYTE_FIELD |
8435 #undef NOBARRIER_WRITE_BYTE_FIELD | 8435 #undef NOBARRIER_WRITE_BYTE_FIELD |
8436 | 8436 |
8437 } // namespace internal | 8437 } // namespace internal |
8438 } // namespace v8 | 8438 } // namespace v8 |
8439 | 8439 |
8440 #endif // V8_OBJECTS_INL_H_ | 8440 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |