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

Side by Side Diff: src/objects-inl.h

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-debug.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after
2978 return function_data()->IsFunctionTemplateInfo(); 2978 return function_data()->IsFunctionTemplateInfo();
2979 } 2979 }
2980 2980
2981 2981
2982 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { 2982 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
2983 ASSERT(IsApiFunction()); 2983 ASSERT(IsApiFunction());
2984 return FunctionTemplateInfo::cast(function_data()); 2984 return FunctionTemplateInfo::cast(function_data());
2985 } 2985 }
2986 2986
2987 2987
2988 bool SharedFunctionInfo::HasCustomCallGenerator() { 2988 bool SharedFunctionInfo::HasBuiltinFunctionId() {
2989 return function_data()->IsSmi(); 2989 return function_data()->IsSmi();
2990 } 2990 }
2991 2991
2992 2992
2993 MathFunctionId SharedFunctionInfo::math_function_id() { 2993 bool SharedFunctionInfo::IsBuiltinMathFunction() {
2994 return static_cast<MathFunctionId>( 2994 return HasBuiltinFunctionId() &&
2995 (compiler_hints() >> kMathFunctionShift) & kMathFunctionMask); 2995 builtin_function_id() >= kFirstMathFunctionId;
2996 } 2996 }
2997 2997
2998 2998
2999 void SharedFunctionInfo::set_math_function_id(int math_fn) { 2999 BuiltinFunctionId SharedFunctionInfo::builtin_function_id() {
3000 ASSERT(math_fn <= max_math_id_number()); 3000 ASSERT(HasBuiltinFunctionId());
3001 set_compiler_hints(compiler_hints() | 3001 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value());
3002 ((math_fn & kMathFunctionMask) << kMathFunctionShift));
3003 }
3004
3005
3006 int SharedFunctionInfo::custom_call_generator_id() {
3007 ASSERT(HasCustomCallGenerator());
3008 return Smi::cast(function_data())->value();
3009 } 3002 }
3010 3003
3011 3004
3012 int SharedFunctionInfo::code_age() { 3005 int SharedFunctionInfo::code_age() {
3013 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask; 3006 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask;
3014 } 3007 }
3015 3008
3016 3009
3017 void SharedFunctionInfo::set_code_age(int code_age) { 3010 void SharedFunctionInfo::set_code_age(int code_age) {
3018 set_compiler_hints(compiler_hints() | 3011 set_compiler_hints(compiler_hints() |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
3801 #undef WRITE_INT_FIELD 3794 #undef WRITE_INT_FIELD
3802 #undef READ_SHORT_FIELD 3795 #undef READ_SHORT_FIELD
3803 #undef WRITE_SHORT_FIELD 3796 #undef WRITE_SHORT_FIELD
3804 #undef READ_BYTE_FIELD 3797 #undef READ_BYTE_FIELD
3805 #undef WRITE_BYTE_FIELD 3798 #undef WRITE_BYTE_FIELD
3806 3799
3807 3800
3808 } } // namespace v8::internal 3801 } } // namespace v8::internal
3809 3802
3810 #endif // V8_OBJECTS_INL_H_ 3803 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698