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

Unified Diff: src/objects.cc

Issue 59153007: Revert "Implement Math.sin, cos and tan using table lookup and spline interpolation." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 703f9aaf9ca57d6906e319da1f2c916fdb60d7c8..441c25e70c649aecb7b54f49d5670c1daf136569 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9747,6 +9747,20 @@ bool JSFunction::EnsureCompiled(Handle<JSFunction> function,
}
+bool JSFunction::IsInlineable() {
+ if (IsBuiltin()) return false;
+ SharedFunctionInfo* shared_info = shared();
+ // Check that the function has a script associated with it.
+ if (!shared_info->script()->IsScript()) return false;
+ if (shared_info->optimization_disabled()) return false;
+ Code* code = shared_info->code();
+ if (code->kind() == Code::OPTIMIZED_FUNCTION) return true;
+ // If we never ran this (unlikely) then lets try to optimize it.
+ if (code->kind() != Code::FUNCTION) return true;
+ return code->optimizable();
+}
+
+
void JSObject::OptimizeAsPrototype(Handle<JSObject> object) {
if (object->IsGlobalObject()) return;
@@ -10015,16 +10029,6 @@ Handle<Object> SharedFunctionInfo::GetSourceCode() {
}
-bool SharedFunctionInfo::IsInlineable() {
- // Check that the function has a script associated with it.
- if (!script()->IsScript()) return false;
- if (optimization_disabled()) return false;
- // If we never ran this (unlikely) then lets try to optimize it.
- if (code()->kind() != Code::FUNCTION) return true;
- return code()->optimizable();
-}
-
-
int SharedFunctionInfo::SourceSize() {
return end_position() - start_position();
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698