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

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

Issue 1220193009: Migrate most uses of Isolate::current_zone to Thread::zone. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger_test.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 "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 const String& func_name = String::Handle(func.name()); 397 const String& func_name = String::Handle(func.name());
398 Class& func_class = Class::Handle(func.Owner()); 398 Class& func_class = Class::Handle(func.Owner());
399 String& class_name = String::Handle(func_class.Name()); 399 String& class_name = String::Handle(func_class.Name());
400 400
401 const char* kFormat = "%s%s%s"; 401 const char* kFormat = "%s%s%s";
402 intptr_t len = OS::SNPrint(NULL, 0, kFormat, 402 intptr_t len = OS::SNPrint(NULL, 0, kFormat,
403 func_class.IsTopLevel() ? "" : class_name.ToCString(), 403 func_class.IsTopLevel() ? "" : class_name.ToCString(),
404 func_class.IsTopLevel() ? "" : ".", 404 func_class.IsTopLevel() ? "" : ".",
405 func_name.ToCString()); 405 func_name.ToCString());
406 len++; // String terminator. 406 len++; // String terminator.
407 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 407 char* chars = Thread::Current()->zone()->Alloc<char>(len);
408 OS::SNPrint(chars, len, kFormat, 408 OS::SNPrint(chars, len, kFormat,
409 func_class.IsTopLevel() ? "" : class_name.ToCString(), 409 func_class.IsTopLevel() ? "" : class_name.ToCString(),
410 func_class.IsTopLevel() ? "" : ".", 410 func_class.IsTopLevel() ? "" : ".",
411 func_name.ToCString()); 411 func_name.ToCString());
412 return chars; 412 return chars;
413 } 413 }
414 414
415 415
416 // Returns true if function contains the token position in the given script. 416 // Returns true if function contains the token position in the given script.
417 static bool FunctionContains(const Function& func, 417 static bool FunctionContains(const Function& func,
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 } 1013 }
1014 UNREACHABLE(); 1014 UNREACHABLE();
1015 return Object::null(); 1015 return Object::null();
1016 } 1016 }
1017 1017
1018 1018
1019 const char* ActivationFrame::ToCString() { 1019 const char* ActivationFrame::ToCString() {
1020 const String& url = String::Handle(SourceUrl()); 1020 const String& url = String::Handle(SourceUrl());
1021 intptr_t line = LineNumber(); 1021 intptr_t line = LineNumber();
1022 const char* func_name = Debugger::QualifiedFunctionName(function()); 1022 const char* func_name = Debugger::QualifiedFunctionName(function());
1023 return Isolate::Current()->current_zone()-> 1023 return Thread::Current()->zone()->
1024 PrintToString("[ Frame pc(0x%" Px ") fp(0x%" Px ") sp(0x%" Px ")\n" 1024 PrintToString("[ Frame pc(0x%" Px ") fp(0x%" Px ") sp(0x%" Px ")\n"
1025 "\tfunction = %s\n" 1025 "\tfunction = %s\n"
1026 "\turl = %s\n" 1026 "\turl = %s\n"
1027 "\tline = %" Pd "\n" 1027 "\tline = %" Pd "\n"
1028 "\tcontext = %s\n" 1028 "\tcontext = %s\n"
1029 "\tcontext level = %" Pd " ]\n", 1029 "\tcontext level = %" Pd " ]\n",
1030 pc(), fp(), sp(), 1030 pc(), fp(), sp(),
1031 func_name, 1031 func_name,
1032 url.ToCString(), 1032 url.ToCString(),
1033 line, 1033 line,
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 } 2991 }
2992 2992
2993 2993
2994 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 2994 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
2995 ASSERT(bpt->next() == NULL); 2995 ASSERT(bpt->next() == NULL);
2996 bpt->set_next(code_breakpoints_); 2996 bpt->set_next(code_breakpoints_);
2997 code_breakpoints_ = bpt; 2997 code_breakpoints_ = bpt;
2998 } 2998 }
2999 2999
3000 } // namespace dart 3000 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698