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

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: Rebased to include removal of stack height tracking and strict mode flag changes. 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
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 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset)); 3538 return reinterpret_cast<Code*>(READ_FIELD(this, kCodeOffset));
3539 } 3539 }
3540 3540
3541 3541
3542 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) { 3542 void SharedFunctionInfo::set_code(Code* value, WriteBarrierMode mode) {
3543 WRITE_FIELD(this, kCodeOffset, value); 3543 WRITE_FIELD(this, kCodeOffset, value);
3544 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode); 3544 CONDITIONAL_WRITE_BARRIER(value->GetHeap(), this, kCodeOffset, value, mode);
3545 } 3545 }
3546 3546
3547 3547
3548 SerializedScopeInfo* SharedFunctionInfo::scope_info() { 3548 ScopeInfo* SharedFunctionInfo::scope_info() {
3549 return reinterpret_cast<SerializedScopeInfo*>( 3549 return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset));
3550 READ_FIELD(this, kScopeInfoOffset));
3551 } 3550 }
3552 3551
3553 3552
3554 void SharedFunctionInfo::set_scope_info(SerializedScopeInfo* value, 3553 void SharedFunctionInfo::set_scope_info(ScopeInfo* value,
3555 WriteBarrierMode mode) { 3554 WriteBarrierMode mode) {
3556 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value)); 3555 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value));
3557 CONDITIONAL_WRITE_BARRIER(GetHeap(), 3556 CONDITIONAL_WRITE_BARRIER(GetHeap(),
3558 this, 3557 this,
3559 kScopeInfoOffset, 3558 kScopeInfoOffset,
3560 reinterpret_cast<Object*>(value), 3559 reinterpret_cast<Object*>(value),
3561 mode); 3560 mode);
3562 } 3561 }
3563 3562
3564 3563
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
4614 #undef WRITE_INT_FIELD 4613 #undef WRITE_INT_FIELD
4615 #undef READ_SHORT_FIELD 4614 #undef READ_SHORT_FIELD
4616 #undef WRITE_SHORT_FIELD 4615 #undef WRITE_SHORT_FIELD
4617 #undef READ_BYTE_FIELD 4616 #undef READ_BYTE_FIELD
4618 #undef WRITE_BYTE_FIELD 4617 #undef WRITE_BYTE_FIELD
4619 4618
4620 4619
4621 } } // namespace v8::internal 4620 } } // namespace v8::internal
4622 4621
4623 #endif // V8_OBJECTS_INL_H_ 4622 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698