OLD | NEW |
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 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3199 } | 3199 } |
3200 | 3200 |
3201 | 3201 |
3202 void SharedFunctionInfo::set_deopt_counter(Smi* value) { | 3202 void SharedFunctionInfo::set_deopt_counter(Smi* value) { |
3203 WRITE_FIELD(this, kDeoptCounterOffset, value); | 3203 WRITE_FIELD(this, kDeoptCounterOffset, value); |
3204 } | 3204 } |
3205 | 3205 |
3206 | 3206 |
3207 bool SharedFunctionInfo::is_compiled() { | 3207 bool SharedFunctionInfo::is_compiled() { |
3208 return code() != | 3208 return code() != |
3209 Isolate::Current()->builtins()->builtin(Builtins::LazyCompile); | 3209 Isolate::Current()->builtins()->builtin(Builtins::kLazyCompile); |
3210 } | 3210 } |
3211 | 3211 |
3212 | 3212 |
3213 bool SharedFunctionInfo::IsApiFunction() { | 3213 bool SharedFunctionInfo::IsApiFunction() { |
3214 return function_data()->IsFunctionTemplateInfo(); | 3214 return function_data()->IsFunctionTemplateInfo(); |
3215 } | 3215 } |
3216 | 3216 |
3217 | 3217 |
3218 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { | 3218 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
3219 ASSERT(IsApiFunction()); | 3219 ASSERT(IsApiFunction()); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3259 SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3259 SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3260 } | 3260 } |
3261 | 3261 |
3262 | 3262 |
3263 bool JSFunction::IsOptimized() { | 3263 bool JSFunction::IsOptimized() { |
3264 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 3264 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
3265 } | 3265 } |
3266 | 3266 |
3267 | 3267 |
3268 bool JSFunction::IsMarkedForLazyRecompilation() { | 3268 bool JSFunction::IsMarkedForLazyRecompilation() { |
3269 return code() == GetIsolate()->builtins()->builtin(Builtins::LazyRecompile); | 3269 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile); |
3270 } | 3270 } |
3271 | 3271 |
3272 | 3272 |
3273 Code* JSFunction::code() { | 3273 Code* JSFunction::code() { |
3274 return Code::cast(unchecked_code()); | 3274 return Code::cast(unchecked_code()); |
3275 } | 3275 } |
3276 | 3276 |
3277 | 3277 |
3278 Code* JSFunction::unchecked_code() { | 3278 Code* JSFunction::unchecked_code() { |
3279 return reinterpret_cast<Code*>( | 3279 return reinterpret_cast<Code*>( |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3373 if (map()->has_non_instance_prototype()) return map()->constructor(); | 3373 if (map()->has_non_instance_prototype()) return map()->constructor(); |
3374 return instance_prototype(); | 3374 return instance_prototype(); |
3375 } | 3375 } |
3376 | 3376 |
3377 bool JSFunction::should_have_prototype() { | 3377 bool JSFunction::should_have_prototype() { |
3378 return map()->function_with_prototype(); | 3378 return map()->function_with_prototype(); |
3379 } | 3379 } |
3380 | 3380 |
3381 | 3381 |
3382 bool JSFunction::is_compiled() { | 3382 bool JSFunction::is_compiled() { |
3383 return code() != GetIsolate()->builtins()->builtin(Builtins::LazyCompile); | 3383 return code() != GetIsolate()->builtins()->builtin(Builtins::kLazyCompile); |
3384 } | 3384 } |
3385 | 3385 |
3386 | 3386 |
3387 int JSFunction::NumberOfLiterals() { | 3387 int JSFunction::NumberOfLiterals() { |
3388 return literals()->length(); | 3388 return literals()->length(); |
3389 } | 3389 } |
3390 | 3390 |
3391 | 3391 |
3392 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { | 3392 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { |
3393 ASSERT(id < kJSBuiltinsCount); // id is unsigned. | 3393 ASSERT(id < kJSBuiltinsCount); // id is unsigned. |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4099 #undef WRITE_INT_FIELD | 4099 #undef WRITE_INT_FIELD |
4100 #undef READ_SHORT_FIELD | 4100 #undef READ_SHORT_FIELD |
4101 #undef WRITE_SHORT_FIELD | 4101 #undef WRITE_SHORT_FIELD |
4102 #undef READ_BYTE_FIELD | 4102 #undef READ_BYTE_FIELD |
4103 #undef WRITE_BYTE_FIELD | 4103 #undef WRITE_BYTE_FIELD |
4104 | 4104 |
4105 | 4105 |
4106 } } // namespace v8::internal | 4106 } } // namespace v8::internal |
4107 | 4107 |
4108 #endif // V8_OBJECTS_INL_H_ | 4108 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |