Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/objects-inl.h

Issue 2908009: Create a separate class to encapsulate ScopeInfo serialization.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698