| 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 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 ASSERT(IsApiFunction()); | 2484 ASSERT(IsApiFunction()); |
| 2485 return FunctionTemplateInfo::cast(function_data()); | 2485 return FunctionTemplateInfo::cast(function_data()); |
| 2486 } | 2486 } |
| 2487 | 2487 |
| 2488 | 2488 |
| 2489 bool SharedFunctionInfo::HasCustomCallGenerator() { | 2489 bool SharedFunctionInfo::HasCustomCallGenerator() { |
| 2490 return function_data()->IsProxy(); | 2490 return function_data()->IsProxy(); |
| 2491 } | 2491 } |
| 2492 | 2492 |
| 2493 | 2493 |
| 2494 bool JSFunction::IsBoilerplate() { | |
| 2495 return map() == Heap::boilerplate_function_map(); | |
| 2496 } | |
| 2497 | |
| 2498 | |
| 2499 bool JSFunction::IsBuiltin() { | 2494 bool JSFunction::IsBuiltin() { |
| 2500 return context()->global()->IsJSBuiltinsObject(); | 2495 return context()->global()->IsJSBuiltinsObject(); |
| 2501 } | 2496 } |
| 2502 | 2497 |
| 2503 | 2498 |
| 2504 Code* JSFunction::code() { | 2499 Code* JSFunction::code() { |
| 2505 return shared()->code(); | 2500 return shared()->code(); |
| 2506 } | 2501 } |
| 2507 | 2502 |
| 2508 | 2503 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2573 return instance_prototype(); | 2568 return instance_prototype(); |
| 2574 } | 2569 } |
| 2575 | 2570 |
| 2576 | 2571 |
| 2577 bool JSFunction::is_compiled() { | 2572 bool JSFunction::is_compiled() { |
| 2578 return shared()->is_compiled(); | 2573 return shared()->is_compiled(); |
| 2579 } | 2574 } |
| 2580 | 2575 |
| 2581 | 2576 |
| 2582 int JSFunction::NumberOfLiterals() { | 2577 int JSFunction::NumberOfLiterals() { |
| 2583 ASSERT(!IsBoilerplate()); | |
| 2584 return literals()->length(); | 2578 return literals()->length(); |
| 2585 } | 2579 } |
| 2586 | 2580 |
| 2587 | 2581 |
| 2588 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { | 2582 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { |
| 2589 ASSERT(0 <= id && id < kJSBuiltinsCount); | 2583 ASSERT(0 <= id && id < kJSBuiltinsCount); |
| 2590 return READ_FIELD(this, OffsetOfFunctionWithId(id)); | 2584 return READ_FIELD(this, OffsetOfFunctionWithId(id)); |
| 2591 } | 2585 } |
| 2592 | 2586 |
| 2593 | 2587 |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3110 #undef WRITE_INT_FIELD | 3104 #undef WRITE_INT_FIELD |
| 3111 #undef READ_SHORT_FIELD | 3105 #undef READ_SHORT_FIELD |
| 3112 #undef WRITE_SHORT_FIELD | 3106 #undef WRITE_SHORT_FIELD |
| 3113 #undef READ_BYTE_FIELD | 3107 #undef READ_BYTE_FIELD |
| 3114 #undef WRITE_BYTE_FIELD | 3108 #undef WRITE_BYTE_FIELD |
| 3115 | 3109 |
| 3116 | 3110 |
| 3117 } } // namespace v8::internal | 3111 } } // namespace v8::internal |
| 3118 | 3112 |
| 3119 #endif // V8_OBJECTS_INL_H_ | 3113 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |