| 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 "vm/assembler.h" | 5 #include "vm/assembler.h" |
| 6 #include "vm/bigint_operations.h" | 6 #include "vm/bigint_operations.h" |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3465 // Same field. | 3465 // Same field. |
| 3466 EXPECT_EQ(field_b.raw(), field_b_from_index.raw()); | 3466 EXPECT_EQ(field_b.raw(), field_b_from_index.raw()); |
| 3467 } | 3467 } |
| 3468 | 3468 |
| 3469 | 3469 |
| 3470 TEST_CASE(FindFunctionIndex) { | 3470 TEST_CASE(FindFunctionIndex) { |
| 3471 // Tests both FindFunctionIndex and FindImplicitClosureFunctionIndex. | 3471 // Tests both FindFunctionIndex and FindImplicitClosureFunctionIndex. |
| 3472 const char* kScriptChars = | 3472 const char* kScriptChars = |
| 3473 "class A {\n" | 3473 "class A {\n" |
| 3474 " void a() {}\n" | 3474 " void a() {}\n" |
| 3475 " void b() { return a; }\n" | 3475 " Function b() { return a; }\n" |
| 3476 "}\n" | 3476 "}\n" |
| 3477 "class B {\n" | 3477 "class B {\n" |
| 3478 " dynamic d() {}\n" | 3478 " dynamic d() {}\n" |
| 3479 "}\n" | 3479 "}\n" |
| 3480 "var x;\n" | 3480 "var x;\n" |
| 3481 "test() {\n" | 3481 "test() {\n" |
| 3482 " x = new A().b();\n" | 3482 " x = new A().b();\n" |
| 3483 " x();\n" | 3483 " x();\n" |
| 3484 " new B();\n" | 3484 " new B();\n" |
| 3485 " return x;\n" | 3485 " return x;\n" |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3982 // Simple map. | 3982 // Simple map. |
| 3983 // | 3983 // |
| 3984 // TODO(turnidge): Consider showing something like: {1: 2, 2: 'otter'} | 3984 // TODO(turnidge): Consider showing something like: {1: 2, 2: 'otter'} |
| 3985 result = Dart_GetField(lib, NewString("simple_map")); | 3985 result = Dart_GetField(lib, NewString("simple_map")); |
| 3986 EXPECT_VALID(result); | 3986 EXPECT_VALID(result); |
| 3987 obj ^= Api::UnwrapHandle(result); | 3987 obj ^= Api::UnwrapHandle(result); |
| 3988 EXPECT_STREQ("Instance of '_LinkedHashMap'", obj.ToUserCString()); | 3988 EXPECT_STREQ("Instance of '_LinkedHashMap'", obj.ToUserCString()); |
| 3989 } | 3989 } |
| 3990 | 3990 |
| 3991 } // namespace dart | 3991 } // namespace dart |
| OLD | NEW |