Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: src/objects-inl.h

Issue 1433923002: Maintain a FixedArray for the optimized code map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5699 matching lines...) Expand 10 before | Expand all | Expand 10 after
5710 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) 5710 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex)
5711 ACCESSORS(DebugInfo, code, Code, kCodeIndex) 5711 ACCESSORS(DebugInfo, code, Code, kCodeIndex)
5712 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) 5712 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex)
5713 5713
5714 SMI_ACCESSORS(BreakPointInfo, code_position, kCodePositionIndex) 5714 SMI_ACCESSORS(BreakPointInfo, code_position, kCodePositionIndex)
5715 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex) 5715 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex)
5716 SMI_ACCESSORS(BreakPointInfo, statement_position, kStatementPositionIndex) 5716 SMI_ACCESSORS(BreakPointInfo, statement_position, kStatementPositionIndex)
5717 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) 5717 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
5718 5718
5719 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) 5719 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
5720 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, 5720 ACCESSORS(SharedFunctionInfo, optimized_code_map, FixedArray,
5721 kOptimizedCodeMapOffset) 5721 kOptimizedCodeMapOffset)
5722 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) 5722 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
5723 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, 5723 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector,
5724 kFeedbackVectorOffset) 5724 kFeedbackVectorOffset)
5725 #if TRACE_MAPS 5725 #if TRACE_MAPS
5726 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) 5726 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset)
5727 #endif 5727 #endif
5728 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 5728 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
5729 kInstanceClassNameOffset) 5729 kInstanceClassNameOffset)
5730 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) 5730 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
5731 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 5731 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
6158 if (script_obj->IsUndefined()) return true; 6158 if (script_obj->IsUndefined()) return true;
6159 Script* script = Script::cast(script_obj); 6159 Script* script = Script::cast(script_obj);
6160 Script::Type type = static_cast<Script::Type>(script->type()); 6160 Script::Type type = static_cast<Script::Type>(script->type());
6161 return type != Script::TYPE_NORMAL; 6161 return type != Script::TYPE_NORMAL;
6162 } 6162 }
6163 6163
6164 6164
6165 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } 6165 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); }
6166 6166
6167 6167
6168 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {
6169 return optimized_code_map() == GetHeap()->cleared_optimized_code_map();
6170 }
6171
6172
6168 bool JSFunction::IsOptimized() { 6173 bool JSFunction::IsOptimized() {
6169 return code()->kind() == Code::OPTIMIZED_FUNCTION; 6174 return code()->kind() == Code::OPTIMIZED_FUNCTION;
6170 } 6175 }
6171 6176
6172 6177
6173 bool JSFunction::IsMarkedForOptimization() { 6178 bool JSFunction::IsMarkedForOptimization() {
6174 return code() == GetIsolate()->builtins()->builtin( 6179 return code() == GetIsolate()->builtins()->builtin(
6175 Builtins::kCompileOptimized); 6180 Builtins::kCompileOptimized);
6176 } 6181 }
6177 6182
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
7881 #undef WRITE_INT64_FIELD 7886 #undef WRITE_INT64_FIELD
7882 #undef READ_BYTE_FIELD 7887 #undef READ_BYTE_FIELD
7883 #undef WRITE_BYTE_FIELD 7888 #undef WRITE_BYTE_FIELD
7884 #undef NOBARRIER_READ_BYTE_FIELD 7889 #undef NOBARRIER_READ_BYTE_FIELD
7885 #undef NOBARRIER_WRITE_BYTE_FIELD 7890 #undef NOBARRIER_WRITE_BYTE_FIELD
7886 7891
7887 } // namespace internal 7892 } // namespace internal
7888 } // namespace v8 7893 } // namespace v8
7889 7894
7890 #endif // V8_OBJECTS_INL_H_ 7895 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698