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_api.h" | 5 #include "include/dart_api.h" |
6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
7 #include "platform/json.h" | 7 #include "platform/json.h" |
8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
(...skipping 4657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4668 // Check the variable type. | 4668 // Check the variable type. |
4669 type = Dart_VariableType(var); | 4669 type = Dart_VariableType(var); |
4670 EXPECT_VALID(type); | 4670 EXPECT_VALID(type); |
4671 cls_name = Dart_ClassName(type); | 4671 cls_name = Dart_ClassName(type); |
4672 EXPECT_VALID(cls_name); | 4672 EXPECT_VALID(cls_name); |
4673 cls_name_cstr = ""; | 4673 cls_name_cstr = ""; |
4674 EXPECT_VALID(Dart_StringToCString(cls_name, &cls_name_cstr)); | 4674 EXPECT_VALID(Dart_StringToCString(cls_name, &cls_name_cstr)); |
4675 if (FLAG_enable_type_checks) { | 4675 if (FLAG_enable_type_checks) { |
4676 EXPECT_STREQ("int", cls_name_cstr); | 4676 EXPECT_STREQ("int", cls_name_cstr); |
4677 } else { | 4677 } else { |
4678 EXPECT_STREQ("Dynamic", cls_name_cstr); | 4678 EXPECT_STREQ("dynamic", cls_name_cstr); |
4679 } | 4679 } |
4680 } | 4680 } |
4681 | 4681 |
4682 | 4682 |
4683 static void BuildVariableDescription(TextBuffer* buffer, Dart_Handle var) { | 4683 static void BuildVariableDescription(TextBuffer* buffer, Dart_Handle var) { |
4684 buffer->Clear(); | 4684 buffer->Clear(); |
4685 Dart_Handle name = Dart_VariableName(var); | 4685 Dart_Handle name = Dart_VariableName(var); |
4686 EXPECT_VALID(name); | 4686 EXPECT_VALID(name); |
4687 const char* name_cstr = ""; | 4687 const char* name_cstr = ""; |
4688 EXPECT_VALID(Dart_StringToCString(name, &name_cstr)); | 4688 EXPECT_VALID(Dart_StringToCString(name, &name_cstr)); |
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7143 EXPECT(o2 == reinterpret_cast<void*>(&p2)); | 7143 EXPECT(o2 == reinterpret_cast<void*>(&p2)); |
7144 } | 7144 } |
7145 Dart_ExitScope(); | 7145 Dart_ExitScope(); |
7146 isolate->heap()->CollectGarbage(Heap::kOld); | 7146 isolate->heap()->CollectGarbage(Heap::kOld); |
7147 EXPECT_EQ(0, isolate->heap()->PeerCount()); | 7147 EXPECT_EQ(0, isolate->heap()->PeerCount()); |
7148 } | 7148 } |
7149 | 7149 |
7150 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 7150 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
7151 | 7151 |
7152 } // namespace dart | 7152 } // namespace dart |
OLD | NEW |