Chromium Code Reviews| 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(GrowTypedData, 1) { | |
|
Vyacheslav Egorov (Google)
2015/01/20 16:26:24
The name is a bit confusing: but I can't come up w
zerny-google
2015/01/21 12:03:11
Since I've changed the call to take a typed-data c
Vyacheslav Egorov (Google)
2015/01/21 12:10:00
Agreed. Maybe GrowRegExpStack then?
| |
| 1666 const TypedData& old_data = TypedData::CheckedHandle(arguments.ArgAt(0)); | |
| 1667 ASSERT(!old_data.IsNull()); | |
| 1668 const intptr_t cid = old_data.GetClassId(); | |
| 1669 const intptr_t old_size = old_data.Length(); | |
| 1670 const intptr_t new_size = 2 * old_size; | |
| 1671 const intptr_t elm_size = old_data.ElementSizeInBytes(); | |
| 1672 const TypedData& new_data = | |
| 1673 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | |
| 1674 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | |
| 1675 arguments.SetReturn(new_data); | |
| 1676 } | |
| 1677 | |
| 1678 | |
| 1664 } // namespace dart | 1679 } // namespace dart |
| OLD | NEW |