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

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

Issue 1701383002: VM service fixes for noopt/precompiled. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/isolate.cc ('k') | no next file » | 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) 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 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 new EnumListParameter("reports", true, report_enum_names), 2412 new EnumListParameter("reports", true, report_enum_names),
2413 new IdParameter("scriptId", false), 2413 new IdParameter("scriptId", false),
2414 new UIntParameter("tokenPos", false), 2414 new UIntParameter("tokenPos", false),
2415 new UIntParameter("endTokenPos", false), 2415 new UIntParameter("endTokenPos", false),
2416 new BoolParameter("forceCompile", false), 2416 new BoolParameter("forceCompile", false),
2417 NULL, 2417 NULL,
2418 }; 2418 };
2419 2419
2420 2420
2421 static bool GetSourceReport(Thread* thread, JSONStream* js) { 2421 static bool GetSourceReport(Thread* thread, JSONStream* js) {
2422 if (!thread->isolate()->compilation_allowed()) {
2423 js->PrintError(kFeatureDisabled,
2424 "Cannot get source report when running a precompiled program.");
Cutch 2016/02/17 19:13:08 We only compile if "forceCompile" is set to true.
2425 return true;
2426 }
2422 const char* reports_str = js->LookupParam("reports"); 2427 const char* reports_str = js->LookupParam("reports");
2423 const EnumListParameter* reports_parameter = 2428 const EnumListParameter* reports_parameter =
2424 static_cast<const EnumListParameter*>(get_source_report_params[1]); 2429 static_cast<const EnumListParameter*>(get_source_report_params[1]);
2425 const char** reports = reports_parameter->Parse(thread->zone(), reports_str); 2430 const char** reports = reports_parameter->Parse(thread->zone(), reports_str);
2426 intptr_t report_set = 0; 2431 intptr_t report_set = 0;
2427 while (*reports != NULL) { 2432 while (*reports != NULL) {
2428 if (strcmp(*reports, kCallSitesStr) == 0) { 2433 if (strcmp(*reports, kCallSitesStr) == 0) {
2429 report_set |= SourceReport::kCallSites; 2434 report_set |= SourceReport::kCallSites;
2430 } else if (strcmp(*reports, kCoverageStr) == 0) { 2435 } else if (strcmp(*reports, kCoverageStr) == 0) {
2431 report_set |= SourceReport::kCoverage; 2436 report_set |= SourceReport::kCoverage;
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
3986 if (strcmp(method_name, method.name) == 0) { 3991 if (strcmp(method_name, method.name) == 0) {
3987 return &method; 3992 return &method;
3988 } 3993 }
3989 } 3994 }
3990 return NULL; 3995 return NULL;
3991 } 3996 }
3992 3997
3993 #endif // !PRODUCT 3998 #endif // !PRODUCT
3994 3999
3995 } // namespace dart 4000 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698