Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: runtime/vm/code_generator.cc

Issue 800433004: Use a typed array for the irregexp stack. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: naming Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698