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

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

Issue 2918001: Move serialized scope info from Code object to SharedFunctionInfo. (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-debug.cc ('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 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex) 2489 ACCESSORS(DebugInfo, code, Code, kPatchedCodeIndex)
2490 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) 2490 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex)
2491 2491
2492 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex) 2492 ACCESSORS(BreakPointInfo, code_position, Smi, kCodePositionIndex)
2493 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex) 2493 ACCESSORS(BreakPointInfo, source_position, Smi, kSourcePositionIndex)
2494 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex) 2494 ACCESSORS(BreakPointInfo, statement_position, Smi, kStatementPositionIndex)
2495 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) 2495 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex)
2496 #endif 2496 #endif
2497 2497
2498 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) 2498 ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset)
2499 ACCESSORS(SharedFunctionInfo, scope_info, Object, kScopeInfoOffset)
2499 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) 2500 ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
2500 ACCESSORS(SharedFunctionInfo, instance_class_name, Object, 2501 ACCESSORS(SharedFunctionInfo, instance_class_name, Object,
2501 kInstanceClassNameOffset) 2502 kInstanceClassNameOffset)
2502 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) 2503 ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset)
2503 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) 2504 ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset)
2504 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) 2505 ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset)
2505 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) 2506 ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset)
2506 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object, 2507 ACCESSORS(SharedFunctionInfo, this_property_assignments, Object,
2507 kThisPropertyAssignmentsOffset) 2508 kThisPropertyAssignmentsOffset)
2508 2509
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 2802
2802 JSValue* JSValue::cast(Object* obj) { 2803 JSValue* JSValue::cast(Object* obj) {
2803 ASSERT(obj->IsJSValue()); 2804 ASSERT(obj->IsJSValue());
2804 ASSERT(HeapObject::cast(obj)->Size() == JSValue::kSize); 2805 ASSERT(HeapObject::cast(obj)->Size() == JSValue::kSize);
2805 return reinterpret_cast<JSValue*>(obj); 2806 return reinterpret_cast<JSValue*>(obj);
2806 } 2807 }
2807 2808
2808 2809
2809 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) 2810 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset)
2810 ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset) 2811 ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset)
2811 INT_ACCESSORS(Code, sinfo_size, kSInfoSizeOffset)
2812 2812
2813 2813
2814 byte* Code::instruction_start() { 2814 byte* Code::instruction_start() {
2815 return FIELD_ADDR(this, kHeaderSize); 2815 return FIELD_ADDR(this, kHeaderSize);
2816 } 2816 }
2817 2817
2818 2818
2819 byte* Code::instruction_end() { 2819 byte* Code::instruction_end() {
2820 return instruction_start() + instruction_size(); 2820 return instruction_start() + instruction_size();
2821 } 2821 }
(...skipping 23 matching lines...) Expand all
2845 return instruction_start(); 2845 return instruction_start();
2846 } 2846 }
2847 2847
2848 2848
2849 bool Code::contains(byte* pc) { 2849 bool Code::contains(byte* pc) {
2850 return (instruction_start() <= pc) && 2850 return (instruction_start() <= pc) &&
2851 (pc < instruction_start() + instruction_size()); 2851 (pc < instruction_start() + instruction_size());
2852 } 2852 }
2853 2853
2854 2854
2855 byte* Code::sinfo_start() {
2856 return FIELD_ADDR(this, kHeaderSize + body_size());
2857 }
2858
2859
2860 ACCESSORS(JSArray, length, Object, kLengthOffset) 2855 ACCESSORS(JSArray, length, Object, kLengthOffset)
2861 2856
2862 2857
2863 ACCESSORS(JSRegExp, data, Object, kDataOffset) 2858 ACCESSORS(JSRegExp, data, Object, kDataOffset)
2864 2859
2865 2860
2866 JSRegExp::Type JSRegExp::TypeTag() { 2861 JSRegExp::Type JSRegExp::TypeTag() {
2867 Object* data = this->data(); 2862 Object* data = this->data();
2868 if (data->IsUndefined()) return JSRegExp::NOT_COMPILED; 2863 if (data->IsUndefined()) return JSRegExp::NOT_COMPILED;
2869 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex)); 2864 Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex));
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 #undef WRITE_INT_FIELD 3297 #undef WRITE_INT_FIELD
3303 #undef READ_SHORT_FIELD 3298 #undef READ_SHORT_FIELD
3304 #undef WRITE_SHORT_FIELD 3299 #undef WRITE_SHORT_FIELD
3305 #undef READ_BYTE_FIELD 3300 #undef READ_BYTE_FIELD
3306 #undef WRITE_BYTE_FIELD 3301 #undef WRITE_BYTE_FIELD
3307 3302
3308 3303
3309 } } // namespace v8::internal 3304 } } // namespace v8::internal
3310 3305
3311 #endif // V8_OBJECTS_INL_H_ 3306 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698