Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: runtime/vm/code_generator_test.cc

Issue 10414084: Replace linked list of loaded libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) || defined(TARGET_ARCH_X64) 7 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
8 8
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 kPos, no_type_arguments, constructor, no_arguments, allocated))); 481 kPos, no_type_arguments, constructor, no_arguments, allocated)));
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 Object& result = Object::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 EXPECT(!result.IsError());
491 const Library& app_lib = Library::Handle( 491 const GrowableObjectArray& libs = GrowableObjectArray::Handle(
492 Isolate::Current()->object_store()->registered_libraries()); 492 Isolate::Current()->object_store()->libraries());
493 ASSERT(!libs.IsNull());
494 // App lib is the last one that was loaded.
495 intptr_t num_libs = libs.Length();
496 Library& app_lib = Library::Handle();
497 app_lib ^= libs.At(num_libs - 1);
498 ASSERT(!app_lib.IsNull());
493 const Class& cls = Class::Handle( 499 const Class& cls = Class::Handle(
494 app_lib.LookupClass(String::Handle(String::NewSymbol("A")))); 500 app_lib.LookupClass(String::Handle(String::NewSymbol("A"))));
495 EXPECT_EQ(cls.raw(), result.clazz()); 501 EXPECT_EQ(cls.raw(), result.clazz());
496 } 502 }
497 503
498 } // namespace dart 504 } // namespace dart
499 505
500 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) 506 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64)
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698