OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 5942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5953 reinterpret_cast<Object*>(value), | 5953 reinterpret_cast<Object*>(value), |
5954 mode); | 5954 mode); |
5955 } | 5955 } |
5956 | 5956 |
5957 | 5957 |
5958 bool SharedFunctionInfo::is_compiled() { | 5958 bool SharedFunctionInfo::is_compiled() { |
5959 return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy); | 5959 return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy); |
5960 } | 5960 } |
5961 | 5961 |
5962 | 5962 |
| 5963 bool SharedFunctionInfo::is_simple_parameter_list() { |
| 5964 return scope_info()->IsSimpleParameterList(); |
| 5965 } |
| 5966 |
| 5967 |
5963 bool SharedFunctionInfo::IsApiFunction() { | 5968 bool SharedFunctionInfo::IsApiFunction() { |
5964 return function_data()->IsFunctionTemplateInfo(); | 5969 return function_data()->IsFunctionTemplateInfo(); |
5965 } | 5970 } |
5966 | 5971 |
5967 | 5972 |
5968 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { | 5973 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
5969 DCHECK(IsApiFunction()); | 5974 DCHECK(IsApiFunction()); |
5970 return FunctionTemplateInfo::cast(function_data()); | 5975 return FunctionTemplateInfo::cast(function_data()); |
5971 } | 5976 } |
5972 | 5977 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6226 bool JSFunction::should_have_prototype() { | 6231 bool JSFunction::should_have_prototype() { |
6227 return map()->function_with_prototype(); | 6232 return map()->function_with_prototype(); |
6228 } | 6233 } |
6229 | 6234 |
6230 | 6235 |
6231 bool JSFunction::is_compiled() { | 6236 bool JSFunction::is_compiled() { |
6232 return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy); | 6237 return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy); |
6233 } | 6238 } |
6234 | 6239 |
6235 | 6240 |
| 6241 bool JSFunction::is_simple_parameter_list() { |
| 6242 return shared()->is_simple_parameter_list(); |
| 6243 } |
| 6244 |
| 6245 |
6236 FixedArray* JSFunction::literals() { | 6246 FixedArray* JSFunction::literals() { |
6237 DCHECK(!shared()->bound()); | 6247 DCHECK(!shared()->bound()); |
6238 return literals_or_bindings(); | 6248 return literals_or_bindings(); |
6239 } | 6249 } |
6240 | 6250 |
6241 | 6251 |
6242 void JSFunction::set_literals(FixedArray* literals) { | 6252 void JSFunction::set_literals(FixedArray* literals) { |
6243 DCHECK(!shared()->bound()); | 6253 DCHECK(!shared()->bound()); |
6244 set_literals_or_bindings(literals); | 6254 set_literals_or_bindings(literals); |
6245 } | 6255 } |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7622 #undef READ_SHORT_FIELD | 7632 #undef READ_SHORT_FIELD |
7623 #undef WRITE_SHORT_FIELD | 7633 #undef WRITE_SHORT_FIELD |
7624 #undef READ_BYTE_FIELD | 7634 #undef READ_BYTE_FIELD |
7625 #undef WRITE_BYTE_FIELD | 7635 #undef WRITE_BYTE_FIELD |
7626 #undef NOBARRIER_READ_BYTE_FIELD | 7636 #undef NOBARRIER_READ_BYTE_FIELD |
7627 #undef NOBARRIER_WRITE_BYTE_FIELD | 7637 #undef NOBARRIER_WRITE_BYTE_FIELD |
7628 | 7638 |
7629 } } // namespace v8::internal | 7639 } } // namespace v8::internal |
7630 | 7640 |
7631 #endif // V8_OBJECTS_INL_H_ | 7641 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |