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 "platform/assert.h" | 5 #include "platform/assert.h" |
6 #include "vm/globals.h" | 6 #include "vm/globals.h" |
7 #if defined(TARGET_ARCH_IA32) | 7 #if defined(TARGET_ARCH_IA32) |
8 | 8 |
9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 const TypeArguments& no_type_arguments = TypeArguments::ZoneHandle(); | 478 const TypeArguments& no_type_arguments = TypeArguments::ZoneHandle(); |
479 ArgumentListNode* no_arguments = new ArgumentListNode(kPos); | 479 ArgumentListNode* no_arguments = new ArgumentListNode(kPos); |
480 test->node_sequence()->Add(new ReturnNode(kPos, new ConstructorCallNode( | 480 test->node_sequence()->Add(new ReturnNode(kPos, new ConstructorCallNode( |
481 kPos, no_type_arguments, constructor, no_arguments))); | 481 kPos, no_type_arguments, constructor, no_arguments))); |
482 } | 482 } |
483 | 483 |
484 | 484 |
485 CODEGEN_TEST_RAW_RUN(AllocateNewObjectCodegen, function) { | 485 CODEGEN_TEST_RAW_RUN(AllocateNewObjectCodegen, function) { |
486 GrowableArray<const Object*> arguments; | 486 GrowableArray<const Object*> arguments; |
487 const Array& kNoArgumentNames = Array::Handle(); | 487 const Array& kNoArgumentNames = Array::Handle(); |
488 Instance& result = Instance::Handle(); | 488 Object& result = Object::Handle(); |
489 result = DartEntry::InvokeStatic(function, arguments, kNoArgumentNames); | 489 result = DartEntry::InvokeStatic(function, arguments, kNoArgumentNames); |
| 490 EXPECT(!result.IsError()); |
490 const Library& app_lib = Library::Handle( | 491 const Library& app_lib = Library::Handle( |
491 Isolate::Current()->object_store()->registered_libraries()); | 492 Isolate::Current()->object_store()->registered_libraries()); |
492 const Class& cls = Class::Handle( | 493 const Class& cls = Class::Handle( |
493 app_lib.LookupClass(String::Handle(String::NewSymbol("A")))); | 494 app_lib.LookupClass(String::Handle(String::NewSymbol("A")))); |
494 EXPECT_EQ(cls.raw(), result.clazz()); | 495 EXPECT_EQ(cls.raw(), result.clazz()); |
495 } | 496 } |
496 | 497 |
497 } // namespace dart | 498 } // namespace dart |
498 | 499 |
499 #endif // defined TARGET_ARCH_IA32 | 500 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |