OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3316 return shared()->formal_parameter_count() != | 3316 return shared()->formal_parameter_count() != |
3317 SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3317 SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3318 } | 3318 } |
3319 | 3319 |
3320 | 3320 |
3321 bool JSFunction::IsOptimized() { | 3321 bool JSFunction::IsOptimized() { |
3322 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 3322 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
3323 } | 3323 } |
3324 | 3324 |
3325 | 3325 |
| 3326 bool JSFunction::IsOptimizable() { |
| 3327 return code()->kind() == Code::FUNCTION && code()->optimizable(); |
| 3328 } |
| 3329 |
| 3330 |
3326 bool JSFunction::IsMarkedForLazyRecompilation() { | 3331 bool JSFunction::IsMarkedForLazyRecompilation() { |
3327 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile); | 3332 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile); |
3328 } | 3333 } |
3329 | 3334 |
3330 | 3335 |
3331 Code* JSFunction::code() { | 3336 Code* JSFunction::code() { |
3332 return Code::cast(unchecked_code()); | 3337 return Code::cast(unchecked_code()); |
3333 } | 3338 } |
3334 | 3339 |
3335 | 3340 |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4157 #undef WRITE_INT_FIELD | 4162 #undef WRITE_INT_FIELD |
4158 #undef READ_SHORT_FIELD | 4163 #undef READ_SHORT_FIELD |
4159 #undef WRITE_SHORT_FIELD | 4164 #undef WRITE_SHORT_FIELD |
4160 #undef READ_BYTE_FIELD | 4165 #undef READ_BYTE_FIELD |
4161 #undef WRITE_BYTE_FIELD | 4166 #undef WRITE_BYTE_FIELD |
4162 | 4167 |
4163 | 4168 |
4164 } } // namespace v8::internal | 4169 } } // namespace v8::internal |
4165 | 4170 |
4166 #endif // V8_OBJECTS_INL_H_ | 4171 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |