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

Side by Side Diff: src/objects.cc

Issue 9956060: Check code kind when resetting profiler ticks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7851 matching lines...) Expand 10 before | Expand all | Expand 10 after
7862 ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubGeneric), 7862 ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubGeneric),
7863 *RawField(this, kConstructStubOffset)); 7863 *RawField(this, kConstructStubOffset));
7864 set_construct_stub(builtins->builtin(Builtins::kJSConstructStubCountdown)); 7864 set_construct_stub(builtins->builtin(Builtins::kJSConstructStubCountdown));
7865 // The map survived the gc, so there may be objects referencing it. 7865 // The map survived the gc, so there may be objects referencing it.
7866 set_live_objects_may_exist(true); 7866 set_live_objects_may_exist(true);
7867 } 7867 }
7868 7868
7869 7869
7870 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) { 7870 void SharedFunctionInfo::ResetForNewContext(int new_ic_age) {
7871 code()->ClearInlineCaches(); 7871 code()->ClearInlineCaches();
7872 code()->set_profiler_ticks(0);
7873 set_ic_age(new_ic_age); 7872 set_ic_age(new_ic_age);
7874 if (optimization_disabled() && opt_count() >= Compiler::kDefaultMaxOptCount) { 7873 if (code()->kind() == Code::FUNCTION) {
ulan 2012/04/02 12:52:30 Another kind that can appear here is Code::BUILTIN
7875 // Re-enable optimizations if they were disabled due to opt_count limit. 7874 code()->set_profiler_ticks(0);
7876 set_optimization_disabled(false); 7875 if (optimization_disabled() &&
7877 code()->set_optimizable(true); 7876 opt_count() >= Compiler::kDefaultMaxOptCount) {
7877 // Re-enable optimizations if they were disabled due to opt_count limit.
7878 set_optimization_disabled(false);
7879 code()->set_optimizable(true);
7880 }
7881 set_opt_count(0);
7878 } 7882 }
7879 set_opt_count(0);
7880 } 7883 }
7881 7884
7882 7885
7883 static void GetMinInobjectSlack(Map* map, void* data) { 7886 static void GetMinInobjectSlack(Map* map, void* data) {
7884 int slack = map->unused_property_fields(); 7887 int slack = map->unused_property_fields();
7885 if (*reinterpret_cast<int*>(data) > slack) { 7888 if (*reinterpret_cast<int*>(data) > slack) {
7886 *reinterpret_cast<int*>(data) = slack; 7889 *reinterpret_cast<int*>(data) = slack;
7887 } 7890 }
7888 } 7891 }
7889 7892
(...skipping 5073 matching lines...) Expand 10 before | Expand all | Expand 10 after
12963 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 12966 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
12964 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 12967 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
12965 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 12968 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
12966 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 12969 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
12967 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 12970 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
12968 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 12971 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
12969 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 12972 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
12970 } 12973 }
12971 12974
12972 } } // namespace v8::internal 12975 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698