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

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

Issue 8352039: Cleanup ScopeInfo and SerializedScopeInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Converted ScopeInfo accessors to CamelCase. Created 9 years, 1 month 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
« src/frames.cc ('K') | « 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 556 }
557 557
558 558
559 bool Object::IsGlobalContext() { 559 bool Object::IsGlobalContext() {
560 return Object::IsHeapObject() && 560 return Object::IsHeapObject() &&
561 HeapObject::cast(this)->map() == 561 HeapObject::cast(this)->map() ==
562 HeapObject::cast(this)->GetHeap()->global_context_map(); 562 HeapObject::cast(this)->GetHeap()->global_context_map();
563 } 563 }
564 564
565 565
566 bool Object::IsSerializedScopeInfo() { 566 bool Object::IsScopeInfo() {
567 return Object::IsHeapObject() && 567 return Object::IsHeapObject() &&
568 HeapObject::cast(this)->map() == 568 HeapObject::cast(this)->map() ==
569 HeapObject::cast(this)->GetHeap()->serialized_scope_info_map(); 569 HeapObject::cast(this)->GetHeap()->scope_info_map();
570 } 570 }
571 571
572 572
573 TYPE_CHECKER(JSFunction, JS_FUNCTION_TYPE) 573 TYPE_CHECKER(JSFunction, JS_FUNCTION_TYPE)
574 574
575 575
576 template <> inline bool Is<JSFunction>(Object* obj) { 576 template <> inline bool Is<JSFunction>(Object* obj) {
577 return obj->IsJSFunction(); 577 return obj->IsJSFunction();
578 } 578 }
579 579
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 2008
2009 2009
2010 CAST_ACCESSOR(FixedArray) 2010 CAST_ACCESSOR(FixedArray)
2011 CAST_ACCESSOR(FixedDoubleArray) 2011 CAST_ACCESSOR(FixedDoubleArray)
2012 CAST_ACCESSOR(DescriptorArray) 2012 CAST_ACCESSOR(DescriptorArray)
2013 CAST_ACCESSOR(DeoptimizationInputData) 2013 CAST_ACCESSOR(DeoptimizationInputData)
2014 CAST_ACCESSOR(DeoptimizationOutputData) 2014 CAST_ACCESSOR(DeoptimizationOutputData)
2015 CAST_ACCESSOR(SymbolTable) 2015 CAST_ACCESSOR(SymbolTable)
2016 CAST_ACCESSOR(JSFunctionResultCache) 2016 CAST_ACCESSOR(JSFunctionResultCache)
2017 CAST_ACCESSOR(NormalizedMapCache) 2017 CAST_ACCESSOR(NormalizedMapCache)
2018 CAST_ACCESSOR(ScopeInfo)
2018 CAST_ACCESSOR(CompilationCacheTable) 2019 CAST_ACCESSOR(CompilationCacheTable)
2019 CAST_ACCESSOR(CodeCacheHashTable) 2020 CAST_ACCESSOR(CodeCacheHashTable)
2020 CAST_ACCESSOR(PolymorphicCodeCacheHashTable) 2021 CAST_ACCESSOR(PolymorphicCodeCacheHashTable)
2021 CAST_ACCESSOR(MapCache) 2022 CAST_ACCESSOR(MapCache)
2022 CAST_ACCESSOR(String) 2023 CAST_ACCESSOR(String)
2023 CAST_ACCESSOR(SeqString) 2024 CAST_ACCESSOR(SeqString)
2024 CAST_ACCESSOR(SeqAsciiString) 2025 CAST_ACCESSOR(SeqAsciiString)
2025 CAST_ACCESSOR(SeqTwoByteString) 2026 CAST_ACCESSOR(SeqTwoByteString)
2026 CAST_ACCESSOR(SlicedString) 2027 CAST_ACCESSOR(SlicedString)
2027 CAST_ACCESSOR(ConsString) 2028 CAST_ACCESSOR(ConsString)
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset)); 3539 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset));
3539 } 3540 }
3540 3541
3541 3542
3542 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { 3543 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
3543 WRITE_FIELD(this, kCodeOffset, value); 3544 WRITE_FIELD(this, kCodeOffset, value);
3544 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode); 3545 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode);
3545 } 3546 }
3546 3547
3547 3548
3548 SerializedScopeInfo* SharedFunctionInfo::scope_info() { 3549 ScopeInfo* SharedFunctionInfo::scope_info() {
3549 return reinterpret_cast<SerializedScopeInfo*>( 3550 return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset));
3550 READ_FIELD(this, kScopeInfoOffset));
3551 } 3551 }
3552 3552
3553 3553
3554 void SharedFunctionInfo::set_scope_info(SerializedScopeInfo* value, 3554 void SharedFunctionInfo::set_scope_info(ScopeInfo* value,
3555 WriteBarrierMode mode) { 3555 WriteBarrierMode mode) {
3556 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value)); 3556 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value));
3557 CONDITIONAL_WRITE_BARRIER(GetHeap(), 3557 CONDITIONAL_WRITE_BARRIER(GetHeap(),
3558 this, 3558 this,
3559 kScopeInfoOffset, 3559 kScopeInfoOffset,
3560 reinterpret_cast<Object*>(value), 3560 reinterpret_cast<Object*>(value),
3561 mode); 3561 mode);
3562 } 3562 }
3563 3563
3564 3564
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
4614 #undef WRITE_INT_FIELD 4614 #undef WRITE_INT_FIELD
4615 #undef READ_SHORT_FIELD 4615 #undef READ_SHORT_FIELD
4616 #undef WRITE_SHORT_FIELD 4616 #undef WRITE_SHORT_FIELD
4617 #undef READ_BYTE_FIELD 4617 #undef READ_BYTE_FIELD
4618 #undef WRITE_BYTE_FIELD 4618 #undef WRITE_BYTE_FIELD
4619 4619
4620 4620
4621 } } // namespace v8::internal 4621 } } // namespace v8::internal
4622 4622
4623 #endif // V8_OBJECTS_INL_H_ 4623 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/frames.cc ('K') | « src/objects.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698