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

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

Issue 1412633007: Save the native name on the function instead of finding it in the token stream for lazily-linked na… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/native_entry.cc » ('j') | runtime/vm/native_entry.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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 #endif 1131 #endif
1132 return Error::null(); 1132 return Error::null();
1133 } else { 1133 } else {
1134 Thread* const thread = Thread::Current(); 1134 Thread* const thread = Thread::Current();
1135 Isolate* const isolate = thread->isolate(); 1135 Isolate* const isolate = thread->isolate();
1136 StackZone stack_zone(thread); 1136 StackZone stack_zone(thread);
1137 Error& error = Error::Handle(); 1137 Error& error = Error::Handle();
1138 // We got an error during compilation. 1138 // We got an error during compilation.
1139 error = isolate->object_store()->sticky_error(); 1139 error = isolate->object_store()->sticky_error();
1140 isolate->object_store()->clear_sticky_error(); 1140 isolate->object_store()->clear_sticky_error();
1141 ASSERT(!optimized); 1141 // Unoptimized compilation or precompilation may encounter compile-time
1142 // errors, but regular optimized compilation should not.
1143 ASSERT(!optimized || Compiler::always_optimize());
1142 // Do not attempt to optimize functions that can cause errors. 1144 // Do not attempt to optimize functions that can cause errors.
1143 function.set_is_optimizable(false); 1145 function.set_is_optimizable(false);
1144 return error.raw(); 1146 return error.raw();
1145 } 1147 }
1146 UNREACHABLE(); 1148 UNREACHABLE();
1147 return Error::null(); 1149 return Error::null();
1148 } 1150 }
1149 1151
1150 1152
1151 RawError* Compiler::CompileFunction(Thread* thread, 1153 RawError* Compiler::CompileFunction(Thread* thread,
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 isolate->set_background_compiler(task); 1830 isolate->set_background_compiler(task);
1829 start_task = true; 1831 start_task = true;
1830 } 1832 }
1831 } 1833 }
1832 if (start_task) { 1834 if (start_task) {
1833 Dart::thread_pool()->Run(isolate->background_compiler()); 1835 Dart::thread_pool()->Run(isolate->background_compiler());
1834 } 1836 }
1835 } 1837 }
1836 1838
1837 } // namespace dart 1839 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/native_entry.cc » ('j') | runtime/vm/native_entry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698