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

Unified Diff: src/objects-inl.h

Issue 9866030: Move profiler_ticks to Code object, don't walk the stack when patching ICs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 809671a88b0148406b84f1ba1ac218ce606bd51f..40901579cfbfed86dd0bec25c364f1b8838bae79 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3088,6 +3088,18 @@ void Code::set_allow_osr_at_loop_nesting_level(int level) {
}
+int Code::profiler_ticks() {
+ ASSERT(kind() == FUNCTION);
+ return READ_BYTE_FIELD(this, kProfilerTicksOffset);
ulan 2012/03/27 11:40:58 Now profiler ticks have to fit into one byte, and
Jakob Kummerow 2012/03/27 12:19:10 Done.
+}
+
+
+void Code::set_profiler_ticks(int ticks) {
ulan 2012/03/27 11:40:58 ASSERT(ticks < 256);
Jakob Kummerow 2012/03/27 12:19:10 Done.
+ ASSERT(kind() == FUNCTION);
+ WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks);
+}
+
+
unsigned Code::stack_slots() {
ASSERT(kind() == OPTIMIZED_FUNCTION);
return READ_UINT32_FIELD(this, kStackSlotsOffset);
@@ -3507,6 +3519,7 @@ ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
ACCESSORS(SharedFunctionInfo, this_property_assignments, Object,
kThisPropertyAssignmentsOffset)
+SMI_ACCESSORS(SharedFunctionInfo, ic_age, kICAgeOffset)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype,
@@ -3557,8 +3570,6 @@ SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset)
SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
SMI_ACCESSORS(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset)
-SMI_ACCESSORS(SharedFunctionInfo, profiler_ticks, kProfilerTicksOffset)
-SMI_ACCESSORS(SharedFunctionInfo, ic_age, kICAgeOffset)
#else
#define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \
@@ -3612,11 +3623,6 @@ PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, opt_count, kOptCountOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, deopt_counter, kDeoptCounterOffset)
-
-PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
- profiler_ticks,
- kProfilerTicksOffset)
-PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, ic_age, kICAgeOffset)
#endif

Powered by Google App Engine
This is Rietveld 408576698