OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
6 | 6 |
7 #include "vm/cha.h" | 7 #include "vm/cha.h" |
8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/hash_table.h" | 10 #include "vm/hash_table.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 RawError* Precompiler::CompileAll( | 39 RawError* Precompiler::CompileAll( |
40 Dart_QualifiedFunctionName embedder_entry_points[], | 40 Dart_QualifiedFunctionName embedder_entry_points[], |
41 bool reset_fields) { | 41 bool reset_fields) { |
42 LongJumpScope jump; | 42 LongJumpScope jump; |
43 if (setjmp(*jump.Set()) == 0) { | 43 if (setjmp(*jump.Set()) == 0) { |
44 Precompiler precompiler(Thread::Current(), reset_fields); | 44 Precompiler precompiler(Thread::Current(), reset_fields); |
45 precompiler.DoCompileAll(embedder_entry_points); | 45 precompiler.DoCompileAll(embedder_entry_points); |
46 return Error::null(); | 46 return Error::null(); |
47 } else { | 47 } else { |
48 Isolate* isolate = Isolate::Current(); | 48 Thread* thread = Thread::Current(); |
49 const Error& error = Error::Handle(isolate->object_store()->sticky_error()); | 49 const Error& error = Error::Handle(thread->sticky_error()); |
50 isolate->object_store()->clear_sticky_error(); | 50 thread->clear_sticky_error(); |
51 return error.raw(); | 51 return error.raw(); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 Precompiler::Precompiler(Thread* thread, bool reset_fields) : | 56 Precompiler::Precompiler(Thread* thread, bool reset_fields) : |
57 thread_(thread), | 57 thread_(thread), |
58 zone_(NULL), | 58 zone_(NULL), |
59 isolate_(thread->isolate()), | 59 isolate_(thread->isolate()), |
60 reset_fields_(reset_fields), | 60 reset_fields_(reset_fields), |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 cls = it.GetNextClass(); | 1292 cls = it.GetNextClass(); |
1293 if (cls.IsDynamicClass()) { | 1293 if (cls.IsDynamicClass()) { |
1294 continue; // class 'dynamic' is in the read-only VM isolate. | 1294 continue; // class 'dynamic' is in the read-only VM isolate. |
1295 } | 1295 } |
1296 cls.set_is_allocated(false); | 1296 cls.set_is_allocated(false); |
1297 } | 1297 } |
1298 } | 1298 } |
1299 } | 1299 } |
1300 | 1300 |
1301 } // namespace dart | 1301 } // namespace dart |
OLD | NEW |