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

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

Issue 977283002: Display call site data for functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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
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/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.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_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3223 " (() => new MyClass())();\n" 3223 " (() => new MyClass())();\n"
3224 "}\n"; 3224 "}\n";
3225 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); 3225 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
3226 EXPECT_VALID(lib); 3226 EXPECT_VALID(lib);
3227 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); 3227 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
3228 EXPECT_ERROR( 3228 EXPECT_ERROR(
3229 result, 3229 result,
3230 "Unhandled exception:\n" 3230 "Unhandled exception:\n"
3231 "MyException\n" 3231 "MyException\n"
3232 "#0 baz (test-lib:2:3)\n" 3232 "#0 baz (test-lib:2:3)\n"
3233 "#1 _OtherClass._OtherClass._named (test-lib:7:8)\n" 3233 "#1 _OtherClass._OtherClass._named (test-lib:7:5)\n"
3234 "#2 globalVar= (test-lib:12:7)\n" 3234 "#2 globalVar= (test-lib:12:7)\n"
3235 "#3 _bar (test-lib:16:3)\n" 3235 "#3 _bar (test-lib:16:3)\n"
3236 "#4 MyClass.field (test-lib:25:9)\n" 3236 "#4 MyClass.field (test-lib:25:5)\n"
3237 "#5 MyClass.foo.fooHelper (test-lib:30:7)\n" 3237 "#5 MyClass.foo.fooHelper (test-lib:30:7)\n"
3238 "#6 MyClass.foo (test-lib:32:14)\n" 3238 "#6 MyClass.foo (test-lib:32:14)\n"
3239 "#7 MyClass.MyClass.<anonymous closure> (test-lib:21:15)\n" 3239 "#7 MyClass.MyClass.<anonymous closure> (test-lib:21:12)\n"
3240 "#8 MyClass.MyClass (test-lib:21:18)\n" 3240 "#8 MyClass.MyClass (test-lib:21:18)\n"
3241 "#9 main.<anonymous closure> (test-lib:37:14)\n" 3241 "#9 main.<anonymous closure> (test-lib:37:14)\n"
3242 "#10 main (test-lib:37:24)"); 3242 "#10 main (test-lib:37:24)");
3243 } 3243 }
3244 3244
3245 3245
3246 TEST_CASE(WeakProperty_PreserveCrossGen) { 3246 TEST_CASE(WeakProperty_PreserveCrossGen) {
3247 Isolate* isolate = Isolate::Current(); 3247 Isolate* isolate = Isolate::Current();
3248 WeakProperty& weak = WeakProperty::Handle(); 3248 WeakProperty& weak = WeakProperty::Handle();
3249 { 3249 {
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
4478 EXPECT_VALID(h_result); 4478 EXPECT_VALID(h_result);
4479 Integer& result = Integer::Handle(); 4479 Integer& result = Integer::Handle();
4480 result ^= Api::UnwrapHandle(h_result); 4480 result ^= Api::UnwrapHandle(h_result);
4481 String& foo = String::Handle(String::New("foo")); 4481 String& foo = String::Handle(String::New("foo"));
4482 Integer& expected = Integer::Handle(); 4482 Integer& expected = Integer::Handle();
4483 expected ^= foo.HashCode(); 4483 expected ^= foo.HashCode();
4484 EXPECT(result.IsIdenticalTo(expected)); 4484 EXPECT(result.IsIdenticalTo(expected));
4485 } 4485 }
4486 4486
4487 } // namespace dart 4487 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698