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

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

Issue 1299653003: Migrate LongJumpScope to Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Assert current isolate. 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 | « runtime/vm/parser.cc ('k') | runtime/vm/report.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/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/log.h" 9 #include "vm/log.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
11 #include "vm/object.h" 11 #include "vm/object.h"
12 #include "vm/object_store.h" 12 #include "vm/object_store.h"
13 #include "vm/resolver.h" 13 #include "vm/resolver.h"
14 #include "vm/symbols.h" 14 #include "vm/symbols.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 18
19 #define I (isolate()) 19 #define I (isolate())
20 #define Z (zone()) 20 #define Z (zone())
21 21
22 22
23 DEFINE_FLAG(bool, trace_precompiler, false, "Trace precompiler."); 23 DEFINE_FLAG(bool, trace_precompiler, false, "Trace precompiler.");
24 24
25 25
26 static void Jump(const Error& error) { 26 static void Jump(const Error& error) {
27 Isolate::Current()->long_jump_base()->Jump(1, error); 27 Thread::Current()->long_jump_base()->Jump(1, error);
28 } 28 }
29 29
30 30
31 RawError* Precompiler::CompileAll() { 31 RawError* Precompiler::CompileAll() {
32 LongJumpScope jump; 32 LongJumpScope jump;
33 if (setjmp(*jump.Set()) == 0) { 33 if (setjmp(*jump.Set()) == 0) {
34 Precompiler precompiler(Thread::Current()); 34 Precompiler precompiler(Thread::Current());
35 precompiler.DoCompileAll(); 35 precompiler.DoCompileAll();
36 return Error::null(); 36 return Error::null();
37 } else { 37 } else {
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 for (intptr_t j = 0; j < closures.Length(); j++) { 631 for (intptr_t j = 0; j < closures.Length(); j++) {
632 function ^= closures.At(j); 632 function ^= closures.At(j);
633 ASSERT(function.HasCode()); 633 ASSERT(function.HasCode());
634 } 634 }
635 } 635 }
636 } 636 }
637 } 637 }
638 } 638 }
639 639
640 } // namespace dart 640 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698