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

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

Issue 27226004: Allow access to context variables in optimized/inlined frames. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/thread.h" 9 #include "vm/thread.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 SetBreakpointAtEntry("", "breakpointNow"); 543 SetBreakpointAtEntry("", "breakpointNow");
544 544
545 // Run the code and inspect the stack. 545 // Run the code and inspect the stack.
546 stack_buffer[0] = '\0'; 546 stack_buffer[0] = '\0';
547 dart_args[0] = Dart_True(); 547 dart_args[0] = Dart_True();
548 dart_args[1] = Dart_NewInteger(kLowThreshold); 548 dart_args[1] = Dart_NewInteger(kLowThreshold);
549 EXPECT_VALID(Dart_Invoke(script_lib, NewString("test"), 2, dart_args)); 549 EXPECT_VALID(Dart_Invoke(script_lib, NewString("test"), 2, dart_args));
550 if (optimize) { 550 if (optimize) {
551 EXPECT_STREQ("[0] breakpointNow { }\n" 551 EXPECT_STREQ("[0] breakpointNow { }\n"
552 "[1] helper { a = 50 b = 99 stop = null }\n" 552 "[1] helper { a = 50 b = 99 stop = null }\n"
553 "[2] <anonymous closure> { x = <unknown> stop = <unknown>" 553 "[2] <anonymous closure> { x = 5 i = 99 stop = true"
554 " value = null }\n" 554 " value = null }\n"
555 "[3] anotherMiddleMan { func = null }\n" 555 "[3] anotherMiddleMan { func = null }\n"
556 "[4] middleMan { limit = 100 value = 242550 }\n" 556 "[4] middleMan { x = 5 limit = 100 stop = true"
557 " value = 242550 i = 99 }\n"
557 "[5] test { stop = true limit = 100 }\n", 558 "[5] test { stop = true limit = 100 }\n",
558 stack_buffer); 559 stack_buffer);
559 } else { 560 } else {
560 EXPECT_STREQ("[0] breakpointNow { }\n" 561 EXPECT_STREQ("[0] breakpointNow { }\n"
561 "[1] helper { a = 50 b = 99 stop = true }\n" 562 "[1] helper { a = 50 b = 99 stop = true }\n"
562 "[2] <anonymous closure> { x = 5 i = 99 stop = true" 563 "[2] <anonymous closure> { x = 5 i = 99 stop = true"
563 " value = 10 }\n" 564 " value = 10 }\n"
564 "[3] anotherMiddleMan {" 565 "[3] anotherMiddleMan {"
565 " func = Closure: (dynamic) => dynamic }\n" 566 " func = Closure: (dynamic) => dynamic }\n"
566 "[4] middleMan { x = 5 limit = 100 stop = true" 567 "[4] middleMan { x = 5 limit = 100 stop = true"
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 2017
2017 Dart_Handle list_type = Dart_InstanceGetType(list_access_test_obj); 2018 Dart_Handle list_type = Dart_InstanceGetType(list_access_test_obj);
2018 Dart_Handle super_type = Dart_GetSupertype(list_type); 2019 Dart_Handle super_type = Dart_GetSupertype(list_type);
2019 EXPECT(!Dart_IsError(super_type)); 2020 EXPECT(!Dart_IsError(super_type));
2020 super_type = Dart_GetSupertype(super_type); 2021 super_type = Dart_GetSupertype(super_type);
2021 EXPECT(!Dart_IsError(super_type)); 2022 EXPECT(!Dart_IsError(super_type));
2022 EXPECT(super_type == Dart_Null()); 2023 EXPECT(super_type == Dart_Null());
2023 } 2024 }
2024 2025
2025 } // namespace dart 2026 } // namespace dart
OLDNEW
« runtime/vm/debugger.cc ('K') | « runtime/vm/debugger.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698