Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1947 void Class::set_token_pos(intptr_t token_pos) const { | 1947 void Class::set_token_pos(intptr_t token_pos) const { |
| 1948 ASSERT(token_pos >= 0); | 1948 ASSERT(token_pos >= 0); |
| 1949 raw_ptr()->token_pos_ = token_pos; | 1949 raw_ptr()->token_pos_ = token_pos; |
| 1950 } | 1950 } |
| 1951 | 1951 |
| 1952 | 1952 |
| 1953 void Class::set_is_interface() const { | 1953 void Class::set_is_interface() const { |
| 1954 set_state_bits(InterfaceBit::update(true, raw_ptr()->state_bits_)); | 1954 set_state_bits(InterfaceBit::update(true, raw_ptr()->state_bits_)); |
| 1955 } | 1955 } |
| 1956 | 1956 |
| 1957 | |
| 1958 void Class::set_is_implemented() const { | |
| 1959 set_state_bits(ImplementedBit::update(true, raw_ptr()->state_bits_)); | |
| 1960 } | |
| 1961 | |
| 1962 | |
| 1957 void Class::set_is_abstract() const { | 1963 void Class::set_is_abstract() const { |
| 1958 set_state_bits(AbstractBit::update(true, raw_ptr()->state_bits_)); | 1964 set_state_bits(AbstractBit::update(true, raw_ptr()->state_bits_)); |
| 1959 } | 1965 } |
| 1960 | 1966 |
| 1961 | 1967 |
| 1962 void Class::set_is_const() const { | 1968 void Class::set_is_const() const { |
| 1963 set_state_bits(ConstBit::update(true, raw_ptr()->state_bits_)); | 1969 set_state_bits(ConstBit::update(true, raw_ptr()->state_bits_)); |
| 1964 } | 1970 } |
| 1965 | 1971 |
| 1966 | 1972 |
| 1967 void Class::set_is_finalized() const { | 1973 void Class::set_is_finalized() const { |
| 1968 ASSERT(!is_finalized()); | 1974 ASSERT(!is_finalized()); |
| 1969 set_state_bits(StateBits::update(RawClass::kFinalized, | 1975 set_state_bits(StateBits::update(RawClass::kFinalized, |
| 1970 raw_ptr()->state_bits_)); | 1976 raw_ptr()->state_bits_)); |
| 1971 } | 1977 } |
| 1972 | 1978 |
| 1973 | 1979 |
| 1974 void Class::set_is_prefinalized() const { | 1980 void Class::set_is_prefinalized() const { |
| 1975 ASSERT(!is_finalized()); | 1981 ASSERT(!is_finalized()); |
| 1976 set_state_bits(StateBits::update(RawClass::kPreFinalized, | 1982 set_state_bits(StateBits::update(RawClass::kPreFinalized, |
| 1977 raw_ptr()->state_bits_)); | 1983 raw_ptr()->state_bits_)); |
| 1978 } | 1984 } |
| 1979 | 1985 |
| 1980 | 1986 |
| 1981 void Class::set_interfaces(const Array& value) const { | 1987 void Class::set_interfaces(const Array& value) const { |
| 1982 // Verification and resolving of interfaces occurs in finalizer. | 1988 // Verification and resolving of interfaces occurs in finalizer. |
| 1983 ASSERT(!value.IsNull()); | 1989 ASSERT(!value.IsNull()); |
| 1984 StorePointer(&raw_ptr()->interfaces_, value.raw()); | 1990 StorePointer(&raw_ptr()->interfaces_, value.raw()); |
| 1985 } | 1991 } |
| 1986 | 1992 |
|
regis
2012/11/28 22:32:17
Did you remove the blank line by accident?
srdjan
2012/11/28 22:43:50
Done.
| |
| 1987 | |
| 1988 void Class::AddDirectSubclass(const Class& subclass) const { | 1993 void Class::AddDirectSubclass(const Class& subclass) const { |
| 1989 ASSERT(!subclass.IsNull()); | 1994 ASSERT(!subclass.IsNull()); |
| 1990 ASSERT(subclass.SuperClass() == raw()); | 1995 ASSERT(subclass.SuperClass() == raw()); |
| 1991 // Do not keep track of the direct subclasses of class Object. | 1996 // Do not keep track of the direct subclasses of class Object. |
| 1992 ASSERT(!IsObjectClass()); | 1997 ASSERT(!IsObjectClass()); |
| 1993 GrowableObjectArray& direct_subclasses = | 1998 GrowableObjectArray& direct_subclasses = |
| 1994 GrowableObjectArray::Handle(raw_ptr()->direct_subclasses_); | 1999 GrowableObjectArray::Handle(raw_ptr()->direct_subclasses_); |
| 1995 if (direct_subclasses.IsNull()) { | 2000 if (direct_subclasses.IsNull()) { |
| 1996 direct_subclasses = GrowableObjectArray::New(4, Heap::kOld); | 2001 direct_subclasses = GrowableObjectArray::New(4, Heap::kOld); |
| 1997 StorePointer(&raw_ptr()->direct_subclasses_, direct_subclasses.raw()); | 2002 StorePointer(&raw_ptr()->direct_subclasses_, direct_subclasses.raw()); |
| (...skipping 10245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12243 } | 12248 } |
| 12244 return result.raw(); | 12249 return result.raw(); |
| 12245 } | 12250 } |
| 12246 | 12251 |
| 12247 | 12252 |
| 12248 const char* WeakProperty::ToCString() const { | 12253 const char* WeakProperty::ToCString() const { |
| 12249 return "_WeakProperty"; | 12254 return "_WeakProperty"; |
| 12250 } | 12255 } |
| 12251 | 12256 |
| 12252 } // namespace dart | 12257 } // namespace dart |
| OLD | NEW |