OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2523 } | 2523 } |
2524 | 2524 |
2525 | 2525 |
2526 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { | 2526 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
2527 ASSERT(IsApiFunction()); | 2527 ASSERT(IsApiFunction()); |
2528 return FunctionTemplateInfo::cast(function_data()); | 2528 return FunctionTemplateInfo::cast(function_data()); |
2529 } | 2529 } |
2530 | 2530 |
2531 | 2531 |
2532 bool SharedFunctionInfo::HasCustomCallGenerator() { | 2532 bool SharedFunctionInfo::HasCustomCallGenerator() { |
2533 return function_data()->IsProxy(); | 2533 return function_data()->IsSmi(); |
2534 } | 2534 } |
2535 | 2535 |
2536 | 2536 |
| 2537 int SharedFunctionInfo::custom_call_generator_id() { |
| 2538 ASSERT(HasCustomCallGenerator()); |
| 2539 return Smi::cast(function_data())->value(); |
| 2540 } |
| 2541 |
| 2542 |
2537 bool JSFunction::IsBuiltin() { | 2543 bool JSFunction::IsBuiltin() { |
2538 return context()->global()->IsJSBuiltinsObject(); | 2544 return context()->global()->IsJSBuiltinsObject(); |
2539 } | 2545 } |
2540 | 2546 |
2541 | 2547 |
2542 Code* JSFunction::code() { | 2548 Code* JSFunction::code() { |
2543 return shared()->code(); | 2549 return shared()->code(); |
2544 } | 2550 } |
2545 | 2551 |
2546 | 2552 |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3151 #undef WRITE_INT_FIELD | 3157 #undef WRITE_INT_FIELD |
3152 #undef READ_SHORT_FIELD | 3158 #undef READ_SHORT_FIELD |
3153 #undef WRITE_SHORT_FIELD | 3159 #undef WRITE_SHORT_FIELD |
3154 #undef READ_BYTE_FIELD | 3160 #undef READ_BYTE_FIELD |
3155 #undef WRITE_BYTE_FIELD | 3161 #undef WRITE_BYTE_FIELD |
3156 | 3162 |
3157 | 3163 |
3158 } } // namespace v8::internal | 3164 } } // namespace v8::internal |
3159 | 3165 |
3160 #endif // V8_OBJECTS_INL_H_ | 3166 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |