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

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

Issue 1403883002: -Fix display of megamorphic miss function. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 } 1756 }
1757 1757
1758 1758
1759 static const MethodParameter* evaluate_params[] = { 1759 static const MethodParameter* evaluate_params[] = {
1760 ISOLATE_PARAMETER, 1760 ISOLATE_PARAMETER,
1761 NULL, 1761 NULL,
1762 }; 1762 };
1763 1763
1764 1764
1765 static bool Evaluate(Isolate* isolate, JSONStream* js) { 1765 static bool Evaluate(Isolate* isolate, JSONStream* js) {
1766 if (!isolate->compilation_allowed()) {
1767 js->PrintError(kFeatureDisabled, "Cannot evaluate after precompilation");
Cutch 2015/10/13 16:23:15 How about: Cannot evaluate when running a precomp
rmacnak 2015/10/13 17:26:33 Done.
1768 return true;
1769 }
1766 const char* target_id = js->LookupParam("targetId"); 1770 const char* target_id = js->LookupParam("targetId");
1767 if (target_id == NULL) { 1771 if (target_id == NULL) {
1768 PrintMissingParamError(js, "targetId"); 1772 PrintMissingParamError(js, "targetId");
1769 return true; 1773 return true;
1770 } 1774 }
1771 const char* expr = js->LookupParam("expression"); 1775 const char* expr = js->LookupParam("expression");
1772 if (expr == NULL) { 1776 if (expr == NULL) {
1773 PrintMissingParamError(js, "expression"); 1777 PrintMissingParamError(js, "expression");
1774 return true; 1778 return true;
1775 } 1779 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 1829
1826 static const MethodParameter* evaluate_in_frame_params[] = { 1830 static const MethodParameter* evaluate_in_frame_params[] = {
1827 ISOLATE_PARAMETER, 1831 ISOLATE_PARAMETER,
1828 new UIntParameter("frameIndex", true), 1832 new UIntParameter("frameIndex", true),
1829 new MethodParameter("expression", true), 1833 new MethodParameter("expression", true),
1830 NULL, 1834 NULL,
1831 }; 1835 };
1832 1836
1833 1837
1834 static bool EvaluateInFrame(Isolate* isolate, JSONStream* js) { 1838 static bool EvaluateInFrame(Isolate* isolate, JSONStream* js) {
1839 if (!isolate->compilation_allowed()) {
1840 js->PrintError(kFeatureDisabled, "Cannot evaluate after precompilation");
1841 return true;
1842 }
1835 DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); 1843 DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
1836 intptr_t framePos = UIntParameter::Parse(js->LookupParam("frameIndex")); 1844 intptr_t framePos = UIntParameter::Parse(js->LookupParam("frameIndex"));
1837 if (framePos > stack->Length()) { 1845 if (framePos > stack->Length()) {
1838 PrintInvalidParamError(js, "frameIndex"); 1846 PrintInvalidParamError(js, "frameIndex");
1839 return true; 1847 return true;
1840 } 1848 }
1841 ActivationFrame* frame = stack->FrameAt(framePos); 1849 ActivationFrame* frame = stack->FrameAt(framePos);
1842 1850
1843 const char* expr = js->LookupParam("expression"); 1851 const char* expr = js->LookupParam("expression");
1844 const String& expr_str = String::Handle(isolate, String::New(expr)); 1852 const String& expr_str = String::Handle(isolate, String::New(expr));
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
3288 ServiceMethodDescriptor& method = service_methods_[i]; 3296 ServiceMethodDescriptor& method = service_methods_[i];
3289 if (strcmp(method_name, method.name) == 0) { 3297 if (strcmp(method_name, method.name) == 0) {
3290 return &method; 3298 return &method;
3291 } 3299 }
3292 } 3300 }
3293 return NULL; 3301 return NULL;
3294 } 3302 }
3295 3303
3296 3304
3297 } // namespace dart 3305 } // namespace dart
OLDNEW
« runtime/observatory/lib/src/elements/isolate_ref.html ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698