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 6118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6129 | 6129 |
6130 | 6130 |
6131 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } | 6131 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } |
6132 | 6132 |
6133 | 6133 |
6134 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { | 6134 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { |
6135 return optimized_code_map() == GetHeap()->cleared_optimized_code_map(); | 6135 return optimized_code_map() == GetHeap()->cleared_optimized_code_map(); |
6136 } | 6136 } |
6137 | 6137 |
6138 | 6138 |
| 6139 // static |
| 6140 void SharedFunctionInfo::AddToOptimizedCodeMap( |
| 6141 Handle<SharedFunctionInfo> shared, Handle<Context> native_context, |
| 6142 Handle<Code> code, Handle<LiteralsArray> literals, BailoutId osr_ast_id) { |
| 6143 AddToOptimizedCodeMapInternal(shared, native_context, code, literals, |
| 6144 osr_ast_id); |
| 6145 } |
| 6146 |
| 6147 |
| 6148 // static |
| 6149 void SharedFunctionInfo::AddLiteralsToOptimizedCodeMap( |
| 6150 Handle<SharedFunctionInfo> shared, Handle<Context> native_context, |
| 6151 Handle<LiteralsArray> literals, BailoutId osr_ast_id) { |
| 6152 Isolate* isolate = shared->GetIsolate(); |
| 6153 Handle<Oddball> undefined = isolate->factory()->undefined_value(); |
| 6154 AddToOptimizedCodeMapInternal(shared, native_context, undefined, literals, |
| 6155 osr_ast_id); |
| 6156 } |
| 6157 |
| 6158 |
6139 bool JSFunction::IsOptimized() { | 6159 bool JSFunction::IsOptimized() { |
6140 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 6160 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
6141 } | 6161 } |
6142 | 6162 |
6143 | 6163 |
6144 bool JSFunction::IsMarkedForOptimization() { | 6164 bool JSFunction::IsMarkedForOptimization() { |
6145 return code() == GetIsolate()->builtins()->builtin( | 6165 return code() == GetIsolate()->builtins()->builtin( |
6146 Builtins::kCompileOptimized); | 6166 Builtins::kCompileOptimized); |
6147 } | 6167 } |
6148 | 6168 |
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7868 #undef WRITE_INT64_FIELD | 7888 #undef WRITE_INT64_FIELD |
7869 #undef READ_BYTE_FIELD | 7889 #undef READ_BYTE_FIELD |
7870 #undef WRITE_BYTE_FIELD | 7890 #undef WRITE_BYTE_FIELD |
7871 #undef NOBARRIER_READ_BYTE_FIELD | 7891 #undef NOBARRIER_READ_BYTE_FIELD |
7872 #undef NOBARRIER_WRITE_BYTE_FIELD | 7892 #undef NOBARRIER_WRITE_BYTE_FIELD |
7873 | 7893 |
7874 } // namespace internal | 7894 } // namespace internal |
7875 } // namespace v8 | 7895 } // namespace v8 |
7876 | 7896 |
7877 #endif // V8_OBJECTS_INL_H_ | 7897 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |