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

Side by Side Diff: runtime/vm/kernel_binary_flowgraph.h

Issue 2956493003: [Kernel] Add check in the constant evaluator. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | runtime/vm/kernel_binary_flowgraph.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ 5 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ 6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
7 7
8 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
9 9
10 #include <map> 10 #include <map>
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 const Array& names); 269 const Array& names);
270 270
271 RawObject* EvaluateConstConstructorCall(const dart::Class& type_class, 271 RawObject* EvaluateConstConstructorCall(const dart::Class& type_class,
272 const TypeArguments& type_arguments, 272 const TypeArguments& type_arguments,
273 const Function& constructor, 273 const Function& constructor,
274 const Object& argument); 274 const Object& argument);
275 275
276 const TypeArguments* TranslateTypeArguments(const Function& target, 276 const TypeArguments* TranslateTypeArguments(const Function& target,
277 dart::Class* target_klass); 277 dart::Class* target_klass);
278 278
279 void AssertBoolInCheckedMode() { 279 void AssertBool() {
280 if (isolate_->type_checks() && !result_.IsBool()) { 280 if (!result_.IsBool()) {
281 translation_helper_.ReportError("Expected boolean expression."); 281 translation_helper_.ReportError("Expected boolean expression.");
282 } 282 }
283 } 283 }
284 284
285 bool EvaluateBooleanExpressionHere(); 285 bool EvaluateBooleanExpressionHere();
286 286
287 bool GetCachedConstant(intptr_t kernel_offset, Instance* value); 287 bool GetCachedConstant(intptr_t kernel_offset, Instance* value);
288 void CacheConstantValue(intptr_t kernel_offset, const Instance& value); 288 void CacheConstantValue(intptr_t kernel_offset, const Instance& value);
289 289
290 StreamingFlowGraphBuilder* builder_; 290 StreamingFlowGraphBuilder* builder_;
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 private: 1309 private:
1310 Reader* reader_; 1310 Reader* reader_;
1311 intptr_t saved_offset_; 1311 intptr_t saved_offset_;
1312 }; 1312 };
1313 1313
1314 } // namespace kernel 1314 } // namespace kernel
1315 } // namespace dart 1315 } // namespace dart
1316 1316
1317 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1317 #endif // !defined(DART_PRECOMPILED_RUNTIME)
1318 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ 1318 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel_binary_flowgraph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698