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

Unified Diff: src/objects-inl.h

Issue 1148043002: Remove obsolete Code::optimizable flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index fbef269b3b2e8eb69f9c69c54d2da05c03da43fa..73b2d4a06ae3800eba8a794ef958c41e52edb98b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4918,18 +4918,6 @@ inline void Code::set_can_have_weak_objects(bool value) {
}
-bool Code::optimizable() {
- DCHECK_EQ(FUNCTION, kind());
- return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
-}
-
-
-void Code::set_optimizable(bool value) {
- DCHECK_EQ(FUNCTION, kind());
- WRITE_BYTE_FIELD(this, kOptimizableOffset, value ? 1 : 0);
-}
-
-
bool Code::has_deoptimization_support() {
DCHECK_EQ(FUNCTION, kind());
byte flags = READ_BYTE_FIELD(this, kFullCodeFlags);
@@ -5741,11 +5729,6 @@ void SharedFunctionInfo::set_optimization_disabled(bool disable) {
set_compiler_hints(BooleanBit::set(compiler_hints(),
kOptimizationDisabled,
disable));
- // If disabling optimizations we reflect that in the code object so
- // it will not be counted as optimizable code.
- if ((code()->kind() == Code::FUNCTION) && disable) {
- code()->set_optimizable(false);
- }
}
@@ -5987,7 +5970,6 @@ void SharedFunctionInfo::TryReenableOptimization() {
set_optimization_disabled(false);
set_opt_count(0);
set_deopt_count(0);
- code()->set_optimizable(true);
}
}
@@ -6025,7 +6007,7 @@ bool JSFunction::IsOptimized() {
bool JSFunction::IsOptimizable() {
- return code()->kind() == Code::FUNCTION && code()->optimizable();
+ return code()->kind() == Code::FUNCTION && !shared()->optimization_disabled();
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698