| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED | 8 #ifndef DART_PRECOMPILED |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 12046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12057 | 12057 |
| 12058 | 12058 |
| 12059 bool Parser::GetCachedConstant(intptr_t token_pos, Instance* value) { | 12059 bool Parser::GetCachedConstant(intptr_t token_pos, Instance* value) { |
| 12060 if (isolate()->object_store()->compile_time_constants() == Array::null()) { | 12060 if (isolate()->object_store()->compile_time_constants() == Array::null()) { |
| 12061 return false; | 12061 return false; |
| 12062 } | 12062 } |
| 12063 ConstantPosKey key(String::Handle(Z, script_.url()), token_pos); | 12063 ConstantPosKey key(String::Handle(Z, script_.url()), token_pos); |
| 12064 ConstantsMap constants(isolate()->object_store()->compile_time_constants()); | 12064 ConstantsMap constants(isolate()->object_store()->compile_time_constants()); |
| 12065 bool is_present = false; | 12065 bool is_present = false; |
| 12066 *value ^= constants.GetOrNull(key, &is_present); | 12066 *value ^= constants.GetOrNull(key, &is_present); |
| 12067 ASSERT(constants.Release().raw() == | 12067 // Mutator compiler thread may add constants while background compiler |
| 12068 isolate()->object_store()->compile_time_constants()); | 12068 // is running , and thus change the value of 'compile_time_constants'; |
| 12069 // do not assert that 'compile_time_constants' has not changed. |
| 12070 constants.Release(); |
| 12069 if (FLAG_compiler_stats && is_present) { | 12071 if (FLAG_compiler_stats && is_present) { |
| 12070 isolate_->compiler_stats()->num_const_cache_hits++; | 12072 isolate_->compiler_stats()->num_const_cache_hits++; |
| 12071 } | 12073 } |
| 12072 return is_present; | 12074 return is_present; |
| 12073 } | 12075 } |
| 12074 | 12076 |
| 12075 | 12077 |
| 12076 RawInstance* Parser::TryCanonicalize(const Instance& instance, | 12078 RawInstance* Parser::TryCanonicalize(const Instance& instance, |
| 12077 intptr_t token_pos) { | 12079 intptr_t token_pos) { |
| 12078 if (instance.IsNull()) { | 12080 if (instance.IsNull()) { |
| (...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14492 const ArgumentListNode& function_args, | 14494 const ArgumentListNode& function_args, |
| 14493 const LocalVariable* temp_for_last_arg, | 14495 const LocalVariable* temp_for_last_arg, |
| 14494 bool is_super_invocation) { | 14496 bool is_super_invocation) { |
| 14495 UNREACHABLE(); | 14497 UNREACHABLE(); |
| 14496 return NULL; | 14498 return NULL; |
| 14497 } | 14499 } |
| 14498 | 14500 |
| 14499 } // namespace dart | 14501 } // namespace dart |
| 14500 | 14502 |
| 14501 #endif // DART_PRECOMPILED | 14503 #endif // DART_PRECOMPILED |
| OLD | NEW |