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 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) | 2504 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) |
2505 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 2505 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) |
2506 | 2506 |
2507 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) | 2507 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) |
2508 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) | 2508 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) |
2509 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) | 2509 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) |
2510 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 2510 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) |
2511 #endif | 2511 #endif |
2512 | 2512 |
2513 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) | 2513 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
2514 ACCESSORS(SharedFunctionInfo, scope_info, Object, kScopeInfoOffset) | |
2515 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) | 2514 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
2516 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, | 2515 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
2517 kInstanceClassNameOffset) | 2516 kInstanceClassNameOffset) |
2518 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) | 2517 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
2519 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) | 2518 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
2520 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) | 2519 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
2521 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) | 2520 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
2522 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, | 2521 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, |
2523 kThisPropertyAssignmentsOffset) | 2522 kThisPropertyAssignmentsOffset) |
2524 | 2523 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 return Code::cast(READ_FIELD(this, kCodeOffset)); | 2640 return Code::cast(READ_FIELD(this, kCodeOffset)); |
2642 } | 2641 } |
2643 | 2642 |
2644 | 2643 |
2645 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { | 2644 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { |
2646 WRITE_FIELD(this, kCodeOffset, value); | 2645 WRITE_FIELD(this, kCodeOffset, value); |
2647 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); | 2646 CONDITIONAL_WRITE_BARRIER(this, kCodeOffset, mode); |
2648 } | 2647 } |
2649 | 2648 |
2650 | 2649 |
| 2650 SerializedScopeInfo* SharedFunctionInfo::scope_info() { |
| 2651 return reinterpret_cast<SerializedScopeInfo*>( |
| 2652 READ_FIELD(this, kScopeInfoOffset)); |
| 2653 } |
| 2654 |
| 2655 |
| 2656 void SharedFunctionInfo::set_scope_info(SerializedScopeInfo* value, |
| 2657 WriteBarrierMode mode) { |
| 2658 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value)); |
| 2659 CONDITIONAL_WRITE_BARRIER(this, kScopeInfoOffset, mode); |
| 2660 } |
| 2661 |
| 2662 |
2651 bool SharedFunctionInfo::is_compiled() { | 2663 bool SharedFunctionInfo::is_compiled() { |
2652 // TODO(1242782): Create a code kind for uncompiled code. | 2664 // TODO(1242782): Create a code kind for uncompiled code. |
2653 return code()->kind() != Code::STUB; | 2665 return code()->kind() != Code::STUB; |
2654 } | 2666 } |
2655 | 2667 |
2656 | 2668 |
2657 bool SharedFunctionInfo::IsApiFunction() { | 2669 bool SharedFunctionInfo::IsApiFunction() { |
2658 return function_data()->IsFunctionTemplateInfo(); | 2670 return function_data()->IsFunctionTemplateInfo(); |
2659 } | 2671 } |
2660 | 2672 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3312 #undef WRITE_INT_FIELD | 3324 #undef WRITE_INT_FIELD |
3313 #undef READ_SHORT_FIELD | 3325 #undef READ_SHORT_FIELD |
3314 #undef WRITE_SHORT_FIELD | 3326 #undef WRITE_SHORT_FIELD |
3315 #undef READ_BYTE_FIELD | 3327 #undef READ_BYTE_FIELD |
3316 #undef WRITE_BYTE_FIELD | 3328 #undef WRITE_BYTE_FIELD |
3317 | 3329 |
3318 | 3330 |
3319 } } // namespace v8::internal | 3331 } } // namespace v8::internal |
3320 | 3332 |
3321 #endif // V8_OBJECTS_INL_H_ | 3333 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |