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

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

Issue 11125005: Support for type dynamic in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_builder.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 "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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698