| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 return Code::cast(READ_FIELD(this, kCodeOffset)); | 2983 return Code::cast(READ_FIELD(this, kCodeOffset)); |
| 2984 } | 2984 } |
| 2985 | 2985 |
| 2986 | 2986 |
| 2987 Code* SharedFunctionInfo::unchecked_code() { | 2987 Code* SharedFunctionInfo::unchecked_code() { |
| 2988 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset)); | 2988 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset)); |
| 2989 } | 2989 } |
| 2990 | 2990 |
| 2991 | 2991 |
| 2992 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { | 2992 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { |
| 2993 // If optimization has been disabled for the shared function info, | |
| 2994 // reflect that in the code object so it will not be counted as | |
| 2995 // optimizable code. | |
| 2996 ASSERT(value->kind() != Code::FUNCTION || | |
| 2997 !value->optimizable() || | |
| 2998 this->code() == Builtins::builtin(Builtins::Illegal) || | |
| 2999 this->allows_lazy_compilation()); | |
| 3000 WRITE_FIELD(this, kCodeOffset, value); | 2993 WRITE_FIELD(this, kCodeOffset, value); |
| 3001 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); | 2994 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); |
| 3002 } | 2995 } |
| 3003 | 2996 |
| 3004 | 2997 |
| 3005 SerializedScopeInfo* SharedFunctionInfo::scope_info() { | 2998 SerializedScopeInfo* SharedFunctionInfo::scope_info() { |
| 3006 return reinterpret_cast<SerializedScopeInfo*>( | 2999 return reinterpret_cast<SerializedScopeInfo*>( |
| 3007 READ_FIELD(this, kScopeInfoOffset)); | 3000 READ_FIELD(this, kScopeInfoOffset)); |
| 3008 } | 3001 } |
| 3009 | 3002 |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3850 #undef WRITE_INT_FIELD | 3843 #undef WRITE_INT_FIELD |
| 3851 #undef READ_SHORT_FIELD | 3844 #undef READ_SHORT_FIELD |
| 3852 #undef WRITE_SHORT_FIELD | 3845 #undef WRITE_SHORT_FIELD |
| 3853 #undef READ_BYTE_FIELD | 3846 #undef READ_BYTE_FIELD |
| 3854 #undef WRITE_BYTE_FIELD | 3847 #undef WRITE_BYTE_FIELD |
| 3855 | 3848 |
| 3856 | 3849 |
| 3857 } } // namespace v8::internal | 3850 } } // namespace v8::internal |
| 3858 | 3851 |
| 3859 #endif // V8_OBJECTS_INL_H_ | 3852 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |