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

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: Missed a case, also turn on flag for testing. 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
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 5755 matching lines...) Expand 10 before | Expand all | Expand 10 after
5766 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) 5766 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex)
5767 ACCESSORS(DebugInfo, code, Code, kCodeIndex) 5767 ACCESSORS(DebugInfo, code, Code, kCodeIndex)
5768 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) 5768 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex)
5769 5769
5770 SMI_ACCESSORS(BreakPointInfo, code_position, kCodePositionIndex) 5770 SMI_ACCESSORS(BreakPointInfo, code_position, kCodePositionIndex)
5771 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex) 5771 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex)
5772 SMI_ACCESSORS(BreakPointInfo, statement_position, kStatementPositionIndex) 5772 SMI_ACCESSORS(BreakPointInfo, statement_position, kStatementPositionIndex)
5773 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) 5773 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
5774 5774
5775 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) 5775 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
5776 ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, 5776 ACCESSORS(SharedFunctionInfo, optimized_code_map, FixedArray,
5777 kOptimizedCodeMapOffset) 5777 kOptimizedCodeMapOffset)
5778 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) 5778 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
5779 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, 5779 ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector,
5780 kFeedbackVectorOffset) 5780 kFeedbackVectorOffset)
5781 #if TRACE_MAPS 5781 #if TRACE_MAPS
5782 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) 5782 SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset)
5783 #endif 5783 #endif
5784 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 5784 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
5785 kInstanceClassNameOffset) 5785 kInstanceClassNameOffset)
5786 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) 5786 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
5787 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 5787 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
6214 if (script_obj->IsUndefined()) return true; 6214 if (script_obj->IsUndefined()) return true;
6215 Script* script = Script::cast(script_obj); 6215 Script* script = Script::cast(script_obj);
6216 Script::Type type = static_cast<Script::Type>(script->type()); 6216 Script::Type type = static_cast<Script::Type>(script->type());
6217 return type != Script::TYPE_NORMAL; 6217 return type != Script::TYPE_NORMAL;
6218 } 6218 }
6219 6219
6220 6220
6221 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } 6221 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); }
6222 6222
6223 6223
6224 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {
6225 return optimized_code_map() == GetHeap()->cleared_optimized_code_map();
6226 }
6227
6228
6224 bool JSFunction::IsOptimized() { 6229 bool JSFunction::IsOptimized() {
6225 return code()->kind() == Code::OPTIMIZED_FUNCTION; 6230 return code()->kind() == Code::OPTIMIZED_FUNCTION;
6226 } 6231 }
6227 6232
6228 6233
6229 bool JSFunction::IsMarkedForOptimization() { 6234 bool JSFunction::IsMarkedForOptimization() {
6230 return code() == GetIsolate()->builtins()->builtin( 6235 return code() == GetIsolate()->builtins()->builtin(
6231 Builtins::kCompileOptimized); 6236 Builtins::kCompileOptimized);
6232 } 6237 }
6233 6238
(...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
8089 #undef WRITE_INT64_FIELD 8094 #undef WRITE_INT64_FIELD
8090 #undef READ_BYTE_FIELD 8095 #undef READ_BYTE_FIELD
8091 #undef WRITE_BYTE_FIELD 8096 #undef WRITE_BYTE_FIELD
8092 #undef NOBARRIER_READ_BYTE_FIELD 8097 #undef NOBARRIER_READ_BYTE_FIELD
8093 #undef NOBARRIER_WRITE_BYTE_FIELD 8098 #undef NOBARRIER_WRITE_BYTE_FIELD
8094 8099
8095 } // namespace internal 8100 } // namespace internal
8096 } // namespace v8 8101 } // namespace v8
8097 8102
8098 #endif // V8_OBJECTS_INL_H_ 8103 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.cc ('K') | « src/objects.cc ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698