| 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/dart_entry.h" | 5 #include "vm/dart_entry.h" |
| 6 | 6 |
| 7 #include "vm/code_generator.h" | 7 #include "vm/code_generator.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
| 10 #include "vm/resolver.h" | 10 #include "vm/resolver.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 descriptor.MakeImmutable(); | 160 descriptor.MakeImmutable(); |
| 161 descriptor ^= descriptor.Canonicalize(); | 161 descriptor ^= descriptor.Canonicalize(); |
| 162 return descriptor; | 162 return descriptor; |
| 163 } | 163 } |
| 164 | 164 |
| 165 | 165 |
| 166 RawObject* DartLibraryCalls::ExceptionCreate( | 166 RawObject* DartLibraryCalls::ExceptionCreate( |
| 167 const Library& lib, | 167 const Library& lib, |
| 168 const String& class_name, | 168 const String& class_name, |
| 169 const GrowableArray<const Object*>& arguments) { | 169 const GrowableArray<const Object*>& arguments) { |
| 170 const Class& cls = Class::Handle(lib.LookupClass(class_name)); | 170 const Class& cls = Class::Handle(lib.LookupClassAllowPrivate(class_name)); |
| 171 ASSERT(!cls.IsNull()); | 171 ASSERT(!cls.IsNull()); |
| 172 // For now, we only support a non-parameterized or raw type. | 172 // For now, we only support a non-parameterized or raw type. |
| 173 const Instance& exception_object = Instance::Handle(Instance::New(cls)); | 173 const Instance& exception_object = Instance::Handle(Instance::New(cls)); |
| 174 GrowableArray<const Object*> constructor_arguments(arguments.length() + 2); | 174 GrowableArray<const Object*> constructor_arguments(arguments.length() + 2); |
| 175 constructor_arguments.Add(&exception_object); | 175 constructor_arguments.Add(&exception_object); |
| 176 constructor_arguments.Add(&Smi::Handle(Smi::New(Function::kCtorPhaseAll))); | 176 constructor_arguments.Add(&Smi::Handle(Smi::New(Function::kCtorPhaseAll))); |
| 177 constructor_arguments.AddArray(arguments); | 177 constructor_arguments.AddArray(arguments); |
| 178 | 178 |
| 179 const String& period = String::Handle(Symbols::Dot()); | 179 const String& period = String::Handle(Symbols::Dot()); |
| 180 String& constructor_name = String::Handle(String::Concat(class_name, period)); | 180 String& constructor_name = String::Handle(String::Concat(class_name, period)); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 const String& func_name = String::Handle(Field::GetterName(field_name)); | 314 const String& func_name = String::Handle(Field::GetterName(field_name)); |
| 315 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); | 315 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); |
| 316 ASSERT(!func.IsNull()); | 316 ASSERT(!func.IsNull()); |
| 317 GrowableArray<const Object*> arguments; | 317 GrowableArray<const Object*> arguments; |
| 318 const Array& kNoArgumentNames = Array::Handle(); | 318 const Array& kNoArgumentNames = Array::Handle(); |
| 319 return DartEntry::InvokeDynamic(port, func, arguments, kNoArgumentNames); | 319 return DartEntry::InvokeDynamic(port, func, arguments, kNoArgumentNames); |
| 320 } | 320 } |
| 321 | 321 |
| 322 | 322 |
| 323 } // namespace dart | 323 } // namespace dart |
| OLD | NEW |