Changeset 48067 in webkit for trunk/JavaScriptCore/runtime
- Timestamp:
- Sep 4, 2009, 11:53:02 AM (16 years ago)
- Location:
- trunk/JavaScriptCore/runtime
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/ArgList.h
r47022 r48067 1 1 /* 2 2 * Copyright (C) 1999-2001 Harri Porten ([email protected]) 3 * Copyright (C) 2003, 2007, 2008, 2009 Apple Computer, Inc.3 * Copyright (C) 2003, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 24 24 25 25 #include "Register.h" 26 27 26 #include <wtf/HashSet.h> 28 27 #include <wtf/Noncopyable.h> … … 30 29 31 30 namespace JSC { 32 31 32 class MarkStack; 33 33 34 class MarkedArgumentBuffer : public Noncopyable { 34 35 private: -
trunk/JavaScriptCore/runtime/GetterSetter.cpp
r47799 r48067 33 33 JSCell::markChildren(markStack); 34 34 35 if (m_getter && !m_getter->marked())35 if (m_getter) 36 36 markStack.append(m_getter); 37 if (m_setter && !m_setter->marked())37 if (m_setter) 38 38 markStack.append(m_setter); 39 39 } -
trunk/JavaScriptCore/runtime/GlobalEvalFunction.h
r47022 r48067 36 36 JSGlobalObject* cachedGlobalObject() const { return m_cachedGlobalObject; } 37 37 38 static PassRefPtr<Structure> createStructure(JSValue prototype) 39 { 40 return Structure::create(prototype, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot)); 41 } 42 38 43 private: 39 44 virtual void markChildren(MarkStack&); -
trunk/JavaScriptCore/runtime/JSCell.cpp
r47799 r48067 106 106 JSObject* JSCell::getObject() 107 107 { 108 return isObject() ? static_cast<JSObject*>(this) : 0;108 return isObject() ? asObject(this) : 0; 109 109 } 110 110 -
trunk/JavaScriptCore/runtime/JSObject.h
r47780 r48067 254 254 JSObject* constructEmptyObject(ExecState*); 255 255 256 inline JSObject* asObject(JSCell* cell) 257 { 258 ASSERT(cell->isObject()); 259 return static_cast<JSObject*>(cell); 260 } 261 256 262 inline JSObject* asObject(JSValue value) 257 263 { 258 ASSERT(asCell(value)->isObject()); 259 return static_cast<JSObject*>(asCell(value)); 264 return asObject(value.asCell()); 260 265 } 261 266 … … 583 588 if (cell->fastGetOwnPropertySlot(exec, propertyName, slot)) 584 589 return slot.getValue(exec, propertyName); 585 ASSERT(cell->isObject()); 586 JSValue prototype = static_cast<JSObject*>(cell)->prototype(); 590 JSValue prototype = asObject(cell)->prototype(); 587 591 if (!prototype.isObject()) 588 592 return jsUndefined(); … … 609 613 if (cell->getOwnPropertySlot(exec, propertyName, slot)) 610 614 return slot.getValue(exec, propertyName); 611 ASSERT(cell->isObject()); 612 JSValue prototype = static_cast<JSObject*>(cell)->prototype(); 615 JSValue prototype = asObject(cell)->prototype(); 613 616 if (!prototype.isObject()) 614 617 return jsUndefined(); … … 658 661 { 659 662 JSCell::markChildren(markStack); 663 660 664 m_structure->markAggregate(markStack); 661 665 -
trunk/JavaScriptCore/runtime/JSWrapperObject.h
r47022 r48067 26 26 27 27 namespace JSC { 28 28 29 29 // This class is used as a base for classes such as String, 30 30 // Number, Boolean and Date which are wrappers for primitive types. … … 36 36 JSValue internalValue() const { return m_internalValue; } 37 37 void setInternalValue(JSValue); 38 38 39 static PassRefPtr<Structure> createStructure(JSValue prototype) 40 { 41 return Structure::create(prototype, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot)); 42 } 43 44 private: 39 45 virtual void markChildren(MarkStack&); 40 46 41 private:42 47 JSValue m_internalValue; 43 48 }; 44 49 45 50 inline JSWrapperObject::JSWrapperObject(PassRefPtr<Structure> structure) 46 51 : JSObject(structure) 47 52 { 48 53 } 49 54 50 55 inline void JSWrapperObject::setInternalValue(JSValue value) 51 56 { -
trunk/JavaScriptCore/runtime/MarkStack.cpp
r47022 r48067 27 27 #include "MarkStack.h" 28 28 29 namespace JSC 30 { 29 namespace JSC { 31 30 32 31 size_t MarkStack::s_pageSize = 0;
Note:
See TracChangeset
for help on using the changeset viewer.