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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_api_message.h" | 10 #include "vm/dart_api_message.h" |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 timer1.Start(); | 885 timer1.Start(); |
886 { | 886 { |
887 TestIsolateScope __test_isolate__; | 887 TestIsolateScope __test_isolate__; |
888 | 888 |
889 Isolate* isolate = Isolate::Current(); | 889 Isolate* isolate = Isolate::Current(); |
890 Zone zone(isolate); | 890 Zone zone(isolate); |
891 HandleScope scope(isolate); | 891 HandleScope scope(isolate); |
892 | 892 |
893 // Create a test library and Load up a test script in it. | 893 // Create a test library and Load up a test script in it. |
894 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); | 894 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); |
895 ClassFinalizer::FinalizePendingClasses(); | 895 ClassFinalizer::FinalizeAllClasses(); |
896 timer1.Stop(); | 896 timer1.Stop(); |
897 OS::PrintErr("Without Snapshot: %dus\n", timer1.TotalElapsedTime()); | 897 OS::PrintErr("Without Snapshot: %dus\n", timer1.TotalElapsedTime()); |
898 | 898 |
899 // Write snapshot with object content. | 899 // Write snapshot with object content. |
900 SnapshotWriter writer(Snapshot::kFull, &buffer, &malloc_allocator); | 900 SnapshotWriter writer(Snapshot::kFull, &buffer, &malloc_allocator); |
901 writer.WriteFullSnapshot(); | 901 writer.WriteFullSnapshot(); |
902 | 902 |
903 // Invoke a function which returns an object. | 903 // Invoke a function which returns an object. |
904 Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("FieldsTest")); | 904 Dart_Handle cls = Dart_GetClass(lib, Dart_NewString("FieldsTest")); |
905 Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL); | 905 Dart_Handle result = Dart_Invoke(cls, Dart_NewString("testMain"), 0, NULL); |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 EXPECT(Dart_ErrorHasException(result)); | 1562 EXPECT(Dart_ErrorHasException(result)); |
1563 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", | 1563 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", |
1564 Dart_GetError(result)); | 1564 Dart_GetError(result)); |
1565 | 1565 |
1566 Dart_ExitScope(); | 1566 Dart_ExitScope(); |
1567 } | 1567 } |
1568 | 1568 |
1569 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1569 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
1570 | 1570 |
1571 } // namespace dart | 1571 } // namespace dart |
OLD | NEW |