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

Unified Diff: src/objects-inl.h

Issue 5767002: Merge math function ids and custom call generator ids. (Closed)
Patch Set: arm and x64 fixes. Created 10 years 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/runtime.h » ('j') | src/stub-cache.h » ('J')
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 591012805b0c8c44d3009c2deb5ed80ceeae81cb..5cbebd9770d319c439fbc3b2c9051dfc75449511 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3036,27 +3036,19 @@ FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
}
-bool SharedFunctionInfo::HasCustomCallGenerator() {
+bool SharedFunctionInfo::HasBuiltinFunctionId() {
return function_data()->IsSmi();
}
-MathFunctionId SharedFunctionInfo::math_function_id() {
- return static_cast<MathFunctionId>(
- (compiler_hints() >> kMathFunctionShift) & kMathFunctionMask);
+bool SharedFunctionInfo::IsBuiltinMathFunction() {
+ return HasBuiltinFunctionId() && builtin_function_id() >= kMathFloor;
Erik Corry 2010/12/13 14:08:17 Let's have a real name for this, like kFirstMathFu
Vitaly Repeshko 2010/12/14 18:55:33 Done.
}
-void SharedFunctionInfo::set_math_function_id(int math_fn) {
- ASSERT(math_fn <= max_math_id_number());
- set_compiler_hints(compiler_hints() |
- ((math_fn & kMathFunctionMask) << kMathFunctionShift));
-}
-
-
-int SharedFunctionInfo::custom_call_generator_id() {
- ASSERT(HasCustomCallGenerator());
- return Smi::cast(function_data())->value();
+BuiltinFunctionId SharedFunctionInfo::builtin_function_id() {
+ ASSERT(HasBuiltinFunctionId());
+ return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value());
}
« no previous file with comments | « src/objects.h ('k') | src/runtime.h » ('j') | src/stub-cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698