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

Side by Side Diff: trunk/src/tools/gn/input_conversion.cc

Issue 46313006: Revert 232657 "GN: toolchain threading cleanup" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « trunk/src/tools/gn/gyp_helper.cc ('k') | trunk/src/tools/gn/item.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "input_conversion.h" 5 #include "input_conversion.h"
6 6
7 #include "base/strings/string_split.h" 7 #include "base/strings/string_split.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "tools/gn/build_settings.h" 9 #include "tools/gn/build_settings.h"
10 #include "tools/gn/err.h" 10 #include "tools/gn/err.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return Value(); 110 return Value();
111 111
112 // The result should either be a list or a literal, anything else is 112 // The result should either be a list or a literal, anything else is
113 // invalid. 113 // invalid.
114 if (!expression->AsList() && !expression->AsLiteral()) { 114 if (!expression->AsList() && !expression->AsLiteral()) {
115 *err = MakeParseErr(input, origin, Err()); 115 *err = MakeParseErr(input, origin, Err());
116 return Value(); 116 return Value();
117 } 117 }
118 118
119 BuildSettings build_settings; 119 BuildSettings build_settings;
120 Settings settings(&build_settings, std::string()); 120 Label empty_label;
121 Toolchain toolchain(empty_label);
122 Settings settings(&build_settings, &toolchain, std::string());
121 Scope scope(&settings); 123 Scope scope(&settings);
122 124
123 Err nested_err; 125 Err nested_err;
124 Value result = expression->Execute(&scope, &nested_err); 126 Value result = expression->Execute(&scope, &nested_err);
125 if (nested_err.has_error()) { 127 if (nested_err.has_error()) {
126 *err = MakeParseErr(input, origin, nested_err); 128 *err = MakeParseErr(input, origin, nested_err);
127 return Value(); 129 return Value();
128 } 130 }
129 131
130 // The returned value will have references to the temporary parse nodes we 132 // The returned value will have references to the temporary parse nodes we
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return ParseString(input, origin, err); 196 return ParseString(input, origin, err);
195 if (input_conversion == "string") 197 if (input_conversion == "string")
196 return Value(origin, input); 198 return Value(origin, input);
197 if (input_conversion == "list lines") 199 if (input_conversion == "list lines")
198 return ParseList(input, origin, err); 200 return ParseList(input, origin, err);
199 201
200 *err = Err(input_conversion_value, "Not a valid read file mode.", 202 *err = Err(input_conversion_value, "Not a valid read file mode.",
201 "Have you considered a career in retail?"); 203 "Have you considered a career in retail?");
202 return Value(); 204 return Value();
203 } 205 }
OLDNEW
« no previous file with comments | « trunk/src/tools/gn/gyp_helper.cc ('k') | trunk/src/tools/gn/item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698