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

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

Issue 6580038: [Isolates] Merge from bleeding_edge, revisions 5934-6100. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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 | « src/objects-debug.cc ('k') | src/parser.h » ('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 3117 matching lines...) Expand 10 before | Expand all | Expand 10 after
3128 return function_data()->IsFunctionTemplateInfo(); 3128 return function_data()->IsFunctionTemplateInfo();
3129 } 3129 }
3130 3130
3131 3131
3132 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { 3132 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() {
3133 ASSERT(IsApiFunction()); 3133 ASSERT(IsApiFunction());
3134 return FunctionTemplateInfo::cast(function_data()); 3134 return FunctionTemplateInfo::cast(function_data());
3135 } 3135 }
3136 3136
3137 3137
3138 bool SharedFunctionInfo::HasCustomCallGenerator() { 3138 bool SharedFunctionInfo::HasBuiltinFunctionId() {
3139 return function_data()->IsSmi(); 3139 return function_data()->IsSmi();
3140 } 3140 }
3141 3141
3142 3142
3143 MathFunctionId SharedFunctionInfo::math_function_id() { 3143 bool SharedFunctionInfo::IsBuiltinMathFunction() {
3144 return static_cast<MathFunctionId>( 3144 return HasBuiltinFunctionId() &&
3145 (compiler_hints() >> kMathFunctionShift) & kMathFunctionMask); 3145 builtin_function_id() >= kFirstMathFunctionId;
3146 } 3146 }
3147 3147
3148 3148
3149 void SharedFunctionInfo::set_math_function_id(int math_fn) { 3149 BuiltinFunctionId SharedFunctionInfo::builtin_function_id() {
3150 ASSERT(math_fn <= max_math_id_number()); 3150 ASSERT(HasBuiltinFunctionId());
3151 set_compiler_hints(compiler_hints() | 3151 return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value());
3152 ((math_fn & kMathFunctionMask) << kMathFunctionShift));
3153 }
3154
3155
3156 int SharedFunctionInfo::custom_call_generator_id() {
3157 ASSERT(HasCustomCallGenerator());
3158 return Smi::cast(function_data())->value();
3159 } 3152 }
3160 3153
3161 3154
3162 int SharedFunctionInfo::code_age() { 3155 int SharedFunctionInfo::code_age() {
3163 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask; 3156 return (compiler_hints() >> kCodeAgeShift) & kCodeAgeMask;
3164 } 3157 }
3165 3158
3166 3159
3167 void SharedFunctionInfo::set_code_age(int code_age) { 3160 void SharedFunctionInfo::set_code_age(int code_age) {
3168 set_compiler_hints(compiler_hints() | 3161 set_compiler_hints(compiler_hints() |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
4013 #undef WRITE_INT_FIELD 4006 #undef WRITE_INT_FIELD
4014 #undef READ_SHORT_FIELD 4007 #undef READ_SHORT_FIELD
4015 #undef WRITE_SHORT_FIELD 4008 #undef WRITE_SHORT_FIELD
4016 #undef READ_BYTE_FIELD 4009 #undef READ_BYTE_FIELD
4017 #undef WRITE_BYTE_FIELD 4010 #undef WRITE_BYTE_FIELD
4018 4011
4019 4012
4020 } } // namespace v8::internal 4013 } } // namespace v8::internal
4021 4014
4022 #endif // V8_OBJECTS_INL_H_ 4015 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698