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 11849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11860 SetLength(index + 1); | 11860 SetLength(index + 1); |
| 11861 SetAt(index, value); | 11861 SetAt(index, value); |
| 11862 } | 11862 } |
| 11863 | 11863 |
| 11864 | 11864 |
| 11865 void GrowableObjectArray::Grow(intptr_t new_capacity, Heap::Space space) const { | 11865 void GrowableObjectArray::Grow(intptr_t new_capacity, Heap::Space space) const { |
| 11866 ASSERT(new_capacity > Capacity()); | 11866 ASSERT(new_capacity > Capacity()); |
| 11867 const Array& contents = Array::Handle(data()); | 11867 const Array& contents = Array::Handle(data()); |
| 11868 const Array& new_contents = | 11868 const Array& new_contents = |
| 11869 Array::Handle(Array::Grow(contents, new_capacity, space)); | 11869 Array::Handle(Array::Grow(contents, new_capacity, space)); |
| 11870 StorePointer(&(raw_ptr()->data_), new_contents.raw()); | 11870 StorePointer(&(raw_ptr()->data_), new_contents.raw()); |
|
siva
2013/02/08 23:13:34
Ditto.
Ivan Posva
2013/02/08 23:27:32
ditto.
| |
| 11871 ASSERT(AbstractTypeArguments::AreEqual( | |
| 11872 AbstractTypeArguments::Handle(new_contents.GetTypeArguments()), | |
| 11873 AbstractTypeArguments::Handle(raw_ptr()->type_arguments_))); | |
| 11874 } | 11871 } |
| 11875 | 11872 |
| 11876 | 11873 |
| 11877 RawObject* GrowableObjectArray::RemoveLast() const { | 11874 RawObject* GrowableObjectArray::RemoveLast() const { |
| 11878 ASSERT(!IsNull()); | 11875 ASSERT(!IsNull()); |
| 11879 ASSERT(Length() > 0); | 11876 ASSERT(Length() > 0); |
| 11880 intptr_t index = Length() - 1; | 11877 intptr_t index = Length() - 1; |
| 11881 const Array& contents = Array::Handle(data()); | 11878 const Array& contents = Array::Handle(data()); |
| 11882 const Object& obj = Object::Handle(contents.At(index)); | 11879 const Object& obj = Object::Handle(contents.At(index)); |
| 11883 contents.SetAt(index, Object::Handle()); | 11880 contents.SetAt(index, Object::Handle()); |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12796 } | 12793 } |
| 12797 return result.raw(); | 12794 return result.raw(); |
| 12798 } | 12795 } |
| 12799 | 12796 |
| 12800 | 12797 |
| 12801 const char* WeakProperty::ToCString() const { | 12798 const char* WeakProperty::ToCString() const { |
| 12802 return "_WeakProperty"; | 12799 return "_WeakProperty"; |
| 12803 } | 12800 } |
| 12804 | 12801 |
| 12805 } // namespace dart | 12802 } // namespace dart |
| OLD | NEW |