OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/code_generator.h" | 5 #include "vm/code_generator.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 const Object& value = Object::Handle(arguments.ArgAt(1)); | 1654 const Object& value = Object::Handle(arguments.ArgAt(1)); |
1655 field.RecordStore(value); | 1655 field.RecordStore(value); |
1656 } | 1656 } |
1657 | 1657 |
1658 | 1658 |
1659 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { | 1659 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { |
1660 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1660 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
1661 field.EvaluateInitializer(); | 1661 field.EvaluateInitializer(); |
1662 } | 1662 } |
1663 | 1663 |
| 1664 |
| 1665 DEFINE_RUNTIME_ENTRY(GrowRegExpStack, 1) { |
| 1666 const Array& typed_data_cell = Array::CheckedHandle(arguments.ArgAt(0)); |
| 1667 ASSERT(!typed_data_cell.IsNull() && typed_data_cell.Length() == 1); |
| 1668 const TypedData& old_data = TypedData::CheckedHandle(typed_data_cell.At(0)); |
| 1669 ASSERT(!old_data.IsNull()); |
| 1670 const intptr_t cid = old_data.GetClassId(); |
| 1671 const intptr_t old_size = old_data.Length(); |
| 1672 const intptr_t new_size = 2 * old_size; |
| 1673 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 1674 const TypedData& new_data = |
| 1675 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 1676 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 1677 typed_data_cell.SetAt(0, new_data); |
| 1678 arguments.SetReturn(new_data); |
| 1679 } |
| 1680 |
| 1681 |
1664 } // namespace dart | 1682 } // namespace dart |
OLD | NEW |