Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index 3f178c0abac12075a204d05e98b7877321b7e97b..aadf823a4a02227c0316b08ee402c0467fb810da 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -3675,6 +3675,16 @@ typename Traits::ElementType FixedTypedArray<Traits>::get_scalar(int index) { |
| return ptr[index]; |
| } |
| + |
| +template<> inline |
| +FixedTypedArray<Float64ArrayTraits>::ElementType |
| + FixedTypedArray<Float64ArrayTraits>::get_scalar(int index) { |
| + ASSERT((index >= 0) && (index < this->length())); |
| + return READ_DOUBLE_FIELD( |
| + this, FixedTypedArray<Float64ArrayTraits>::SizeFor(index)); |
|
Dmitry Lomov (no reviews)
2014/01/30 16:55:22
I am not too happy with using SizeFor here - it do
kilvadyb
2014/01/30 18:27:05
Done.
|
| +} |
| + |
| + |
| template <class Traits> |
| void FixedTypedArray<Traits>::set(int index, ElementType value) { |
| ASSERT((index >= 0) && (index < this->length())); |
| @@ -3684,6 +3694,15 @@ void FixedTypedArray<Traits>::set(int index, ElementType value) { |
| } |
| +template<> inline |
| +void FixedTypedArray<Float64ArrayTraits>::set( |
| + int index, Float64ArrayTraits::ElementType value) { |
| + ASSERT((index >= 0) && (index < this->length())); |
| + WRITE_DOUBLE_FIELD( |
| + this, FixedTypedArray<Float64ArrayTraits>::SizeFor(index), value); |
|
Dmitry Lomov (no reviews)
2014/01/30 16:55:22
Ditto
kilvadyb
2014/01/30 18:27:05
Done.
|
| +} |
| + |
| + |
| template <class Traits> |
| MaybeObject* FixedTypedArray<Traits>::get(int index) { |
| return Traits::ToObject(GetHeap(), get_scalar(index)); |