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

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

Issue 1259123009: Initial tree-shaking for precompilation: only selective compilation, no removal of unused Functions… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync + more dart:io roots Created 5 years, 4 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/object.h » ('j') | runtime/vm/precompiler.cc » ('J')
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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 } 1105 }
1106 1106
1107 1107
1108 RawError* Compiler::CompileFunction(Thread* thread, 1108 RawError* Compiler::CompileFunction(Thread* thread,
1109 const Function& function) { 1109 const Function& function) {
1110 Isolate* isolate = thread->isolate(); 1110 Isolate* isolate = thread->isolate();
1111 VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId); 1111 VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId);
1112 TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, "Function", function); 1112 TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, "Function", function);
1113 1113
1114 if (!isolate->compilation_allowed()) { 1114 if (!isolate->compilation_allowed()) {
1115 FATAL2("Precompilation missed function %s (%s)\n", 1115 FATAL3("Precompilation missed function %s (%" Pd ", %s)\n",
1116 function.ToQualifiedCString(), 1116 function.ToLibNamePrefixedQualifiedCString(),
1117 function.token_pos(),
1117 Function::KindToCString(function.kind())); 1118 Function::KindToCString(function.kind()));
1118 } 1119 }
1119 1120
1120 CompilationPipeline* pipeline = 1121 CompilationPipeline* pipeline =
1121 CompilationPipeline::New(thread->zone(), function); 1122 CompilationPipeline::New(thread->zone(), function);
1122 1123
1123 const bool optimized = 1124 const bool optimized =
1124 Compiler::always_optimize() && function.IsOptimizable(); 1125 Compiler::always_optimize() && function.IsOptimizable();
1125 1126
1126 return CompileFunctionHelper(pipeline, function, optimized, 1127 return CompileFunctionHelper(pipeline, function, optimized,
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 const Object& result = 1414 const Object& result =
1414 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1415 PassiveObject::Handle(isolate->object_store()->sticky_error());
1415 isolate->object_store()->clear_sticky_error(); 1416 isolate->object_store()->clear_sticky_error();
1416 return result.raw(); 1417 return result.raw();
1417 } 1418 }
1418 UNREACHABLE(); 1419 UNREACHABLE();
1419 return Object::null(); 1420 return Object::null();
1420 } 1421 }
1421 1422
1422 } // namespace dart 1423 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/precompiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698