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

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

Issue 1672853002: Move sticky_error_ from isolate to thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments addressed Created 4 years, 10 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 | « runtime/vm/parser.cc ('k') | runtime/vm/regexp_parser.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/regexp_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698