| 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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 byte Map::bit_field() { | 1804 byte Map::bit_field() { |
| 1805 return READ_BYTE_FIELD(this, kBitFieldOffset); | 1805 return READ_BYTE_FIELD(this, kBitFieldOffset); |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 | 1808 |
| 1809 void Map::set_bit_field(byte value) { | 1809 void Map::set_bit_field(byte value) { |
| 1810 WRITE_BYTE_FIELD(this, kBitFieldOffset, value); | 1810 WRITE_BYTE_FIELD(this, kBitFieldOffset, value); |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 | 1813 |
| 1814 byte Map::bit_field2() { |
| 1815 return READ_BYTE_FIELD(this, kBitField2Offset); |
| 1816 } |
| 1817 |
| 1818 |
| 1819 void Map::set_bit_field2(byte value) { |
| 1820 WRITE_BYTE_FIELD(this, kBitField2Offset, value); |
| 1821 } |
| 1822 |
| 1823 |
| 1814 void Map::set_non_instance_prototype(bool value) { | 1824 void Map::set_non_instance_prototype(bool value) { |
| 1815 if (value) { | 1825 if (value) { |
| 1816 set_bit_field(bit_field() | (1 << kHasNonInstancePrototype)); | 1826 set_bit_field(bit_field() | (1 << kHasNonInstancePrototype)); |
| 1817 } else { | 1827 } else { |
| 1818 set_bit_field(bit_field() & ~(1 << kHasNonInstancePrototype)); | 1828 set_bit_field(bit_field() & ~(1 << kHasNonInstancePrototype)); |
| 1819 } | 1829 } |
| 1820 } | 1830 } |
| 1821 | 1831 |
| 1822 | 1832 |
| 1823 bool Map::has_non_instance_prototype() { | 1833 bool Map::has_non_instance_prototype() { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2068 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) | 2078 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) |
| 2069 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) | 2079 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) |
| 2070 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 2080 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
| 2071 #endif | 2081 #endif |
| 2072 | 2082 |
| 2073 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 2083 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
| 2074 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 2084 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
| 2075 kInstanceClassNameOffset) | 2085 kInstanceClassNameOffset) |
| 2076 ACCESSORS(SharedFunctionInfo, function_data, Object, | 2086 ACCESSORS(SharedFunctionInfo, function_data, Object, |
| 2077 kExternalReferenceDataOffset) | 2087 kExternalReferenceDataOffset) |
| 2078 ACCESSORS(SharedFunctionInfo, lazy_load_data, Object, kLazyLoadDataOffset) | |
| 2079 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 2088 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
| 2080 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 2089 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
| 2081 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 2090 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
| 2082 | 2091 |
| 2083 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, | 2092 BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, |
| 2084 kHiddenPrototypeBit) | 2093 kHiddenPrototypeBit) |
| 2085 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit) | 2094 BOOL_ACCESSORS(FunctionTemplateInfo, flag, undetectable, kUndetectableBit) |
| 2086 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check, | 2095 BOOL_ACCESSORS(FunctionTemplateInfo, flag, needs_access_check, |
| 2087 kNeedsAccessCheckBit) | 2096 kNeedsAccessCheckBit) |
| 2088 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression, | 2097 BOOL_ACCESSORS(SharedFunctionInfo, start_position_and_type, is_expression, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2134 // TODO(1242782): Create a code kind for uncompiled code. | 2143 // TODO(1242782): Create a code kind for uncompiled code. |
| 2135 return code()->kind() != Code::STUB; | 2144 return code()->kind() != Code::STUB; |
| 2136 } | 2145 } |
| 2137 | 2146 |
| 2138 | 2147 |
| 2139 bool JSFunction::IsBoilerplate() { | 2148 bool JSFunction::IsBoilerplate() { |
| 2140 return map() == Heap::boilerplate_function_map(); | 2149 return map() == Heap::boilerplate_function_map(); |
| 2141 } | 2150 } |
| 2142 | 2151 |
| 2143 | 2152 |
| 2144 bool JSFunction::IsLoaded() { | 2153 bool JSObject::IsLoaded() { |
| 2145 return shared()->lazy_load_data() == Heap::undefined_value(); | 2154 return !map()->needs_loading(); |
| 2146 } | 2155 } |
| 2147 | 2156 |
| 2148 | 2157 |
| 2149 Code* JSFunction::code() { | 2158 Code* JSFunction::code() { |
| 2150 return shared()->code(); | 2159 return shared()->code(); |
| 2151 } | 2160 } |
| 2152 | 2161 |
| 2153 | 2162 |
| 2154 void JSFunction::set_code(Code* value) { | 2163 void JSFunction::set_code(Code* value) { |
| 2155 shared()->set_code(value); | 2164 shared()->set_code(value); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2591 #undef WRITE_INT_FIELD | 2600 #undef WRITE_INT_FIELD |
| 2592 #undef READ_SHORT_FIELD | 2601 #undef READ_SHORT_FIELD |
| 2593 #undef WRITE_SHORT_FIELD | 2602 #undef WRITE_SHORT_FIELD |
| 2594 #undef READ_BYTE_FIELD | 2603 #undef READ_BYTE_FIELD |
| 2595 #undef WRITE_BYTE_FIELD | 2604 #undef WRITE_BYTE_FIELD |
| 2596 | 2605 |
| 2597 | 2606 |
| 2598 } } // namespace v8::internal | 2607 } } // namespace v8::internal |
| 2599 | 2608 |
| 2600 #endif // V8_OBJECTS_INL_H_ | 2609 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |