OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/kernel_binary_flowgraph.h" | 5 #include "vm/kernel_binary_flowgraph.h" |
6 | 6 |
7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
8 #include "vm/longjump.h" | 8 #include "vm/longjump.h" |
9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
10 | 10 |
(...skipping 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2391 } else if (target.IsFactory() && type_arguments == NULL) { | 2391 } else if (target.IsFactory() && type_arguments == NULL) { |
2392 // All factories take a type arguments vector as first argument (independent | 2392 // All factories take a type arguments vector as first argument (independent |
2393 // of whether the class is generic or not). | 2393 // of whether the class is generic or not). |
2394 type_arguments = &TypeArguments::ZoneHandle(Z, TypeArguments::null()); | 2394 type_arguments = &TypeArguments::ZoneHandle(Z, TypeArguments::null()); |
2395 } | 2395 } |
2396 return type_arguments; | 2396 return type_arguments; |
2397 } | 2397 } |
2398 | 2398 |
2399 bool StreamingConstantEvaluator::EvaluateBooleanExpressionHere() { | 2399 bool StreamingConstantEvaluator::EvaluateBooleanExpressionHere() { |
2400 EvaluateExpression(builder_->ReaderOffset(), false); | 2400 EvaluateExpression(builder_->ReaderOffset(), false); |
2401 AssertBoolInCheckedMode(); | 2401 AssertBool(); |
2402 return result_.raw() == Bool::True().raw(); | 2402 return result_.raw() == Bool::True().raw(); |
2403 } | 2403 } |
2404 | 2404 |
2405 bool StreamingConstantEvaluator::GetCachedConstant(intptr_t kernel_offset, | 2405 bool StreamingConstantEvaluator::GetCachedConstant(intptr_t kernel_offset, |
2406 Instance* value) { | 2406 Instance* value) { |
2407 if (builder_ == NULL || builder_->flow_graph_builder_ == NULL) return false; | 2407 if (builder_ == NULL || builder_->flow_graph_builder_ == NULL) return false; |
2408 | 2408 |
2409 const Function& function = builder_->parsed_function()->function(); | 2409 const Function& function = builder_->parsed_function()->function(); |
2410 if (function.kind() == RawFunction::kImplicitStaticFinalGetter) { | 2410 if (function.kind() == RawFunction::kImplicitStaticFinalGetter) { |
2411 // Don't cache constants in initializer expressions. They get | 2411 // Don't cache constants in initializer expressions. They get |
(...skipping 4518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6930 metadata_values.SetAt(i, value); | 6930 metadata_values.SetAt(i, value); |
6931 } | 6931 } |
6932 | 6932 |
6933 return metadata_values.raw(); | 6933 return metadata_values.raw(); |
6934 } | 6934 } |
6935 | 6935 |
6936 } // namespace kernel | 6936 } // namespace kernel |
6937 } // namespace dart | 6937 } // namespace dart |
6938 | 6938 |
6939 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 6939 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |