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 3291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3302 return shared()->formal_parameter_count() != | 3302 return shared()->formal_parameter_count() != |
3303 SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3303 SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3304 } | 3304 } |
3305 | 3305 |
3306 | 3306 |
3307 bool JSFunction::IsOptimized() { | 3307 bool JSFunction::IsOptimized() { |
3308 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 3308 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
3309 } | 3309 } |
3310 | 3310 |
3311 | 3311 |
| 3312 bool JSFunction::IsOptimizable() { |
| 3313 return code()->kind() == Code::FUNCTION && code()->optimizable(); |
| 3314 } |
| 3315 |
| 3316 |
3312 bool JSFunction::IsMarkedForLazyRecompilation() { | 3317 bool JSFunction::IsMarkedForLazyRecompilation() { |
3313 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile); | 3318 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile); |
3314 } | 3319 } |
3315 | 3320 |
3316 | 3321 |
3317 Code* JSFunction::code() { | 3322 Code* JSFunction::code() { |
3318 return Code::cast(unchecked_code()); | 3323 return Code::cast(unchecked_code()); |
3319 } | 3324 } |
3320 | 3325 |
3321 | 3326 |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4143 #undef WRITE_INT_FIELD | 4148 #undef WRITE_INT_FIELD |
4144 #undef READ_SHORT_FIELD | 4149 #undef READ_SHORT_FIELD |
4145 #undef WRITE_SHORT_FIELD | 4150 #undef WRITE_SHORT_FIELD |
4146 #undef READ_BYTE_FIELD | 4151 #undef READ_BYTE_FIELD |
4147 #undef WRITE_BYTE_FIELD | 4152 #undef WRITE_BYTE_FIELD |
4148 | 4153 |
4149 | 4154 |
4150 } } // namespace v8::internal | 4155 } } // namespace v8::internal |
4151 | 4156 |
4152 #endif // V8_OBJECTS_INL_H_ | 4157 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |