OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/runtime_entry.h" | 5 #include "vm/runtime_entry.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 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 const Object& value = Object::Handle(arguments.ArgAt(1)); | 2336 const Object& value = Object::Handle(arguments.ArgAt(1)); |
2337 field.RecordStore(value); | 2337 field.RecordStore(value); |
2338 } | 2338 } |
2339 | 2339 |
2340 | 2340 |
2341 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { | 2341 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { |
2342 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 2342 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
2343 field.EvaluateInitializer(); | 2343 field.EvaluateInitializer(); |
2344 } | 2344 } |
2345 | 2345 |
2346 | |
2347 DEFINE_RUNTIME_ENTRY(GrowRegExpStack, 1) { | |
2348 const Array& typed_data_cell = Array::CheckedHandle(arguments.ArgAt(0)); | |
2349 ASSERT(!typed_data_cell.IsNull() && typed_data_cell.Length() == 1); | |
2350 const TypedData& old_data = TypedData::CheckedHandle(typed_data_cell.At(0)); | |
2351 ASSERT(!old_data.IsNull()); | |
2352 const intptr_t cid = old_data.GetClassId(); | |
2353 const intptr_t old_size = old_data.Length(); | |
2354 const intptr_t new_size = 2 * old_size; | |
2355 const intptr_t elm_size = old_data.ElementSizeInBytes(); | |
2356 const TypedData& new_data = | |
2357 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | |
2358 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | |
2359 typed_data_cell.SetAt(0, new_data); | |
2360 arguments.SetReturn(new_data); | |
2361 } | |
2362 | |
2363 } // namespace dart | 2346 } // namespace dart |
OLD | NEW |