| 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 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2654 | 2654 |
| 2655 | 2655 |
| 2656 void SharedFunctionInfo::set_scope_info(SerializedScopeInfo* value, | 2656 void SharedFunctionInfo::set_scope_info(SerializedScopeInfo* value, |
| 2657 WriteBarrierMode mode) { | 2657 WriteBarrierMode mode) { |
| 2658 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value)); | 2658 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value)); |
| 2659 CONDITIONAL_WRITE_BARRIER(this, kScopeInfoOffset, mode); | 2659 CONDITIONAL_WRITE_BARRIER(this, kScopeInfoOffset, mode); |
| 2660 } | 2660 } |
| 2661 | 2661 |
| 2662 | 2662 |
| 2663 bool SharedFunctionInfo::is_compiled() { | 2663 bool SharedFunctionInfo::is_compiled() { |
| 2664 // TODO(1242782): Create a code kind for uncompiled code. | 2664 return code() != Builtins::builtin(Builtins::LazyCompile); |
| 2665 return code()->kind() != Code::STUB; | |
| 2666 } | 2665 } |
| 2667 | 2666 |
| 2668 | 2667 |
| 2669 bool SharedFunctionInfo::IsApiFunction() { | 2668 bool SharedFunctionInfo::IsApiFunction() { |
| 2670 return function_data()->IsFunctionTemplateInfo(); | 2669 return function_data()->IsFunctionTemplateInfo(); |
| 2671 } | 2670 } |
| 2672 | 2671 |
| 2673 | 2672 |
| 2674 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { | 2673 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
| 2675 ASSERT(IsApiFunction()); | 2674 ASSERT(IsApiFunction()); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2766 if (map()->has_non_instance_prototype()) return map()->constructor(); | 2765 if (map()->has_non_instance_prototype()) return map()->constructor(); |
| 2767 return instance_prototype(); | 2766 return instance_prototype(); |
| 2768 } | 2767 } |
| 2769 | 2768 |
| 2770 bool JSFunction::should_have_prototype() { | 2769 bool JSFunction::should_have_prototype() { |
| 2771 return map()->function_with_prototype(); | 2770 return map()->function_with_prototype(); |
| 2772 } | 2771 } |
| 2773 | 2772 |
| 2774 | 2773 |
| 2775 bool JSFunction::is_compiled() { | 2774 bool JSFunction::is_compiled() { |
| 2776 return code()->kind() != Code::STUB; | 2775 return code() != Builtins::builtin(Builtins::LazyCompile); |
| 2777 } | 2776 } |
| 2778 | 2777 |
| 2779 | 2778 |
| 2780 int JSFunction::NumberOfLiterals() { | 2779 int JSFunction::NumberOfLiterals() { |
| 2781 return literals()->length(); | 2780 return literals()->length(); |
| 2782 } | 2781 } |
| 2783 | 2782 |
| 2784 | 2783 |
| 2785 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { | 2784 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { |
| 2786 ASSERT(0 <= id && id < kJSBuiltinsCount); | 2785 ASSERT(0 <= id && id < kJSBuiltinsCount); |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3326 #undef WRITE_INT_FIELD | 3325 #undef WRITE_INT_FIELD |
| 3327 #undef READ_SHORT_FIELD | 3326 #undef READ_SHORT_FIELD |
| 3328 #undef WRITE_SHORT_FIELD | 3327 #undef WRITE_SHORT_FIELD |
| 3329 #undef READ_BYTE_FIELD | 3328 #undef READ_BYTE_FIELD |
| 3330 #undef WRITE_BYTE_FIELD | 3329 #undef WRITE_BYTE_FIELD |
| 3331 | 3330 |
| 3332 | 3331 |
| 3333 } } // namespace v8::internal | 3332 } } // namespace v8::internal |
| 3334 | 3333 |
| 3335 #endif // V8_OBJECTS_INL_H_ | 3334 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |