OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
6 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
(...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3667 Value* argument_names_value = Bind(cinstr); | 3667 Value* argument_names_value = Bind(cinstr); |
3668 arguments->Add(PushArgument(argument_names_value)); | 3668 arguments->Add(PushArgument(argument_names_value)); |
3669 | 3669 |
3670 // List existingArgumentNames. | 3670 // List existingArgumentNames. |
3671 Value* existing_argument_names_value = | 3671 Value* existing_argument_names_value = |
3672 Bind(new ConstantInstr(Array::ZoneHandle())); | 3672 Bind(new ConstantInstr(Array::ZoneHandle())); |
3673 arguments->Add(PushArgument(existing_argument_names_value)); | 3673 arguments->Add(PushArgument(existing_argument_names_value)); |
3674 // Resolve and call NoSuchMethodError._throwNew. | 3674 // Resolve and call NoSuchMethodError._throwNew. |
3675 const Library& core_lib = Library::Handle(Library::CoreLibrary()); | 3675 const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
3676 const Class& cls = Class::Handle( | 3676 const Class& cls = Class::Handle( |
3677 core_lib.LookupClass(Symbols::NoSuchMethodError(), NULL)); | 3677 core_lib.LookupClass(Symbols::NoSuchMethodError())); |
3678 ASSERT(!cls.IsNull()); | 3678 ASSERT(!cls.IsNull()); |
3679 const Function& func = Function::ZoneHandle( | 3679 const Function& func = Function::ZoneHandle( |
3680 Resolver::ResolveStatic(cls, | 3680 Resolver::ResolveStatic(cls, |
3681 PrivateCoreLibName(Symbols::ThrowNew()), | 3681 PrivateCoreLibName(Symbols::ThrowNew()), |
3682 arguments->length(), | 3682 arguments->length(), |
3683 Object::null_array(), | 3683 Object::null_array(), |
3684 Resolver::kIsQualified)); | 3684 Resolver::kIsQualified)); |
3685 ASSERT(!func.IsNull()); | 3685 ASSERT(!func.IsNull()); |
3686 return new StaticCallInstr(token_pos, | 3686 return new StaticCallInstr(token_pos, |
3687 func, | 3687 func, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3814 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3814 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
3815 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3815 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
3816 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3816 OS::SNPrint(chars, len, kFormat, function_name, reason); |
3817 const Error& error = Error::Handle( | 3817 const Error& error = Error::Handle( |
3818 LanguageError::New(String::Handle(String::New(chars)))); | 3818 LanguageError::New(String::Handle(String::New(chars)))); |
3819 Isolate::Current()->long_jump_base()->Jump(1, error); | 3819 Isolate::Current()->long_jump_base()->Jump(1, error); |
3820 } | 3820 } |
3821 | 3821 |
3822 | 3822 |
3823 } // namespace dart | 3823 } // namespace dart |
OLD | NEW |