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/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 String::New(bound_error.ToErrorCString())); | 194 String::New(bound_error.ToErrorCString())); |
195 Exceptions::CreateAndThrowTypeError( | 195 Exceptions::CreateAndThrowTypeError( |
196 location, Symbols::Empty(), Symbols::Empty(), | 196 location, Symbols::Empty(), Symbols::Empty(), |
197 Symbols::Empty(), bound_error_message); | 197 Symbols::Empty(), bound_error_message); |
198 UNREACHABLE(); | 198 UNREACHABLE(); |
199 } | 199 } |
200 } else { | 200 } else { |
201 type_arguments = | 201 type_arguments = |
202 type_arguments.InstantiateAndCanonicalizeFrom(instantiator, NULL); | 202 type_arguments.InstantiateAndCanonicalizeFrom(instantiator, NULL); |
203 } | 203 } |
204 ASSERT(type_arguments.IsInstantiated()); | 204 ASSERT(type_arguments.IsNull() || type_arguments.IsInstantiated()); |
205 arguments.SetReturn(type_arguments); | 205 arguments.SetReturn(type_arguments); |
206 } | 206 } |
207 | 207 |
208 | 208 |
209 // Allocate a new context large enough to hold the given number of variables. | 209 // Allocate a new context large enough to hold the given number of variables. |
210 // Arg0: number of variables. | 210 // Arg0: number of variables. |
211 // Return value: newly allocated context. | 211 // Return value: newly allocated context. |
212 DEFINE_RUNTIME_ENTRY(AllocateContext, 1) { | 212 DEFINE_RUNTIME_ENTRY(AllocateContext, 1) { |
213 const Smi& num_variables = Smi::CheckedHandle(arguments.ArgAt(0)); | 213 const Smi& num_variables = Smi::CheckedHandle(arguments.ArgAt(0)); |
214 arguments.SetReturn(Context::Handle(Context::New(num_variables.Value()))); | 214 arguments.SetReturn(Context::Handle(Context::New(num_variables.Value()))); |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 // of the given value. | 1548 // of the given value. |
1549 // Arg0: Field object; | 1549 // Arg0: Field object; |
1550 // Arg1: Value that is being stored. | 1550 // Arg1: Value that is being stored. |
1551 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { | 1551 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { |
1552 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1552 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
1553 const Object& value = Object::Handle(arguments.ArgAt(1)); | 1553 const Object& value = Object::Handle(arguments.ArgAt(1)); |
1554 field.UpdateGuardedCidAndLength(value); | 1554 field.UpdateGuardedCidAndLength(value); |
1555 } | 1555 } |
1556 | 1556 |
1557 } // namespace dart | 1557 } // namespace dart |
OLD | NEW |