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

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

Issue 1541133003: Incremental changes from background compilation work (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Adjust comments Created 5 years 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
« runtime/vm/object.cc ('K') | « runtime/vm/object.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) 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
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();
siva 2015/12/22 19:43:47 Ditto.
srdjan 2015/12/22 20:23:10 Ditto.
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
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
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698