Chromium Code Reviews| Index: src/runtime/runtime-array.cc |
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc |
| index 1617245daf3206fce4638c57e388f88c226f7f8a..d58daeaaa9677a984d034cbbd88ad428dac70a71 100644 |
| --- a/src/runtime/runtime-array.cc |
| +++ b/src/runtime/runtime-array.cc |
| @@ -58,19 +58,26 @@ RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { |
| RUNTIME_FUNCTION(Runtime_FixedArrayGet) { |
| SealHandleScope shs(isolate); |
| DCHECK(args.length() == 2); |
| - CONVERT_ARG_CHECKED(FixedArray, object, 0); |
| + CONVERT_ARG_CHECKED(FixedArrayBase, object, 0); |
| CONVERT_SMI_ARG_CHECKED(index, 1); |
| - return object->get(index); |
| + if (object->IsTypeFeedbackVector()) { |
| + return TypeFeedbackVector::cast(object)->get(index); |
|
Hannes Payer (out of office)
2015/07/01 09:44:36
The type feedback vector should actually have to s
|
| + } |
| + return FixedArray::cast(object)->get(index); |
| } |
| RUNTIME_FUNCTION(Runtime_FixedArraySet) { |
| SealHandleScope shs(isolate); |
| DCHECK(args.length() == 3); |
| - CONVERT_ARG_CHECKED(FixedArray, object, 0); |
| + CONVERT_ARG_CHECKED(FixedArrayBase, object, 0); |
| CONVERT_SMI_ARG_CHECKED(index, 1); |
| CONVERT_ARG_CHECKED(Object, value, 2); |
| - object->set(index, value); |
| + if (object->IsTypeFeedbackVector()) { |
| + TypeFeedbackVector::cast(object)->set(index, value); |
| + } else { |
| + FixedArray::cast(object)->set(index, value); |
| + } |
| return isolate->heap()->undefined_value(); |
| } |