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 6001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6012 | 6012 |
6013 | 6013 |
6014 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } | 6014 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } |
6015 | 6015 |
6016 | 6016 |
6017 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { | 6017 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { |
6018 return optimized_code_map() == GetHeap()->cleared_optimized_code_map(); | 6018 return optimized_code_map() == GetHeap()->cleared_optimized_code_map(); |
6019 } | 6019 } |
6020 | 6020 |
6021 | 6021 |
6022 // static | |
6023 void SharedFunctionInfo::AddToOptimizedCodeMap( | |
6024 Handle<SharedFunctionInfo> shared, Handle<Context> native_context, | |
6025 Handle<Code> code, Handle<LiteralsArray> literals, BailoutId osr_ast_id) { | |
6026 AddToOptimizedCodeMapInternal(shared, native_context, code, literals, | |
6027 osr_ast_id); | |
6028 } | |
6029 | |
6030 | |
6031 // static | |
6032 void SharedFunctionInfo::AddLiteralsToOptimizedCodeMap( | |
6033 Handle<SharedFunctionInfo> shared, Handle<Context> native_context, | |
6034 Handle<LiteralsArray> literals) { | |
6035 Isolate* isolate = shared->GetIsolate(); | |
6036 Handle<Oddball> undefined = isolate->factory()->undefined_value(); | |
6037 AddToOptimizedCodeMapInternal(shared, native_context, undefined, literals, | |
6038 BailoutId::None()); | |
6039 } | |
6040 | |
6041 | |
6042 bool JSFunction::IsOptimized() { | 6022 bool JSFunction::IsOptimized() { |
6043 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 6023 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
6044 } | 6024 } |
6045 | 6025 |
6046 | 6026 |
6047 bool JSFunction::IsMarkedForOptimization() { | 6027 bool JSFunction::IsMarkedForOptimization() { |
6048 return code() == GetIsolate()->builtins()->builtin( | 6028 return code() == GetIsolate()->builtins()->builtin( |
6049 Builtins::kCompileOptimized); | 6029 Builtins::kCompileOptimized); |
6050 } | 6030 } |
6051 | 6031 |
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7772 #undef WRITE_INT64_FIELD | 7752 #undef WRITE_INT64_FIELD |
7773 #undef READ_BYTE_FIELD | 7753 #undef READ_BYTE_FIELD |
7774 #undef WRITE_BYTE_FIELD | 7754 #undef WRITE_BYTE_FIELD |
7775 #undef NOBARRIER_READ_BYTE_FIELD | 7755 #undef NOBARRIER_READ_BYTE_FIELD |
7776 #undef NOBARRIER_WRITE_BYTE_FIELD | 7756 #undef NOBARRIER_WRITE_BYTE_FIELD |
7777 | 7757 |
7778 } // namespace internal | 7758 } // namespace internal |
7779 } // namespace v8 | 7759 } // namespace v8 |
7780 | 7760 |
7781 #endif // V8_OBJECTS_INL_H_ | 7761 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |