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

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

Issue 2338463003: Improve compile time constant evaluation (Closed)
Patch Set: Merge branch 'master' into ponly Created 4 years, 3 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/compiler_stats.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) 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 { 1244 {
1245 HANDLESCOPE(thread); 1245 HANDLESCOPE(thread);
1246 const int64_t num_tokens_before = STAT_VALUE(thread, num_tokens_consumed); 1246 const int64_t num_tokens_before = STAT_VALUE(thread, num_tokens_consumed);
1247 pipeline->ParseFunction(parsed_function); 1247 pipeline->ParseFunction(parsed_function);
1248 const int64_t num_tokens_after = STAT_VALUE(thread, num_tokens_consumed); 1248 const int64_t num_tokens_after = STAT_VALUE(thread, num_tokens_consumed);
1249 INC_STAT(thread, 1249 INC_STAT(thread,
1250 num_func_tokens_compiled, 1250 num_func_tokens_compiled,
1251 num_tokens_after - num_tokens_before); 1251 num_tokens_after - num_tokens_before);
1252 } 1252 }
1253 1253
1254
1255 CompileParsedFunctionHelper helper(parsed_function, optimized, osr_id); 1254 CompileParsedFunctionHelper helper(parsed_function, optimized, osr_id);
1256 1255
1257 if (Compiler::IsBackgroundCompilation()) { 1256 if (Compiler::IsBackgroundCompilation()) {
1258 if (isolate->IsTopLevelParsing() || 1257 if (isolate->IsTopLevelParsing() ||
1259 (loading_invalidation_gen_at_start != 1258 (loading_invalidation_gen_at_start !=
1260 isolate->loading_invalidation_gen())) { 1259 isolate->loading_invalidation_gen())) {
1261 // Loading occured while parsing. We need to abort here because state 1260 // Loading occured while parsing. We need to abort here because state
1262 // changed while compiling. 1261 // changed while compiling.
1263 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId, 1262 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId,
1264 "Invalidated state during parsing because of script loading"); 1263 "Invalidated state during parsing because of script loading");
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 2178
2180 2179
2181 bool BackgroundCompiler::IsDisabled() { 2180 bool BackgroundCompiler::IsDisabled() {
2182 UNREACHABLE(); 2181 UNREACHABLE();
2183 return true; 2182 return true;
2184 } 2183 }
2185 2184
2186 #endif // DART_PRECOMPILED_RUNTIME 2185 #endif // DART_PRECOMPILED_RUNTIME
2187 2186
2188 } // namespace dart 2187 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698