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

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

Issue 1666323002: Don't allow oob message interrupts while executing constant expressions in the parser. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: resolve merge conflicts 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 | « no previous file | runtime/vm/isolate.h » ('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) 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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 1459
1460 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) { 1460 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
1461 #ifdef DART_PRECOMPILER 1461 #ifdef DART_PRECOMPILER
1462 if (FLAG_precompilation) { 1462 if (FLAG_precompilation) {
1463 return Precompiler::ExecuteOnce(fragment); 1463 return Precompiler::ExecuteOnce(fragment);
1464 } 1464 }
1465 #endif 1465 #endif
1466 LongJumpScope jump; 1466 LongJumpScope jump;
1467 if (setjmp(*jump.Set()) == 0) { 1467 if (setjmp(*jump.Set()) == 0) {
1468 Thread* const thread = Thread::Current(); 1468 Thread* const thread = Thread::Current();
1469
1470 // Don't allow message interrupts while executing constant
1471 // expressions. They can cause bogus recursive compilation.
1472 NoOOBMessageScope no_msg_scope(thread);
1469 if (FLAG_trace_compiler) { 1473 if (FLAG_trace_compiler) {
1470 THR_Print("compiling expression: "); 1474 THR_Print("compiling expression: ");
1471 if (FLAG_support_ast_printer) { 1475 if (FLAG_support_ast_printer) {
1472 AstPrinter::PrintNode(fragment); 1476 AstPrinter::PrintNode(fragment);
1473 } 1477 }
1474 } 1478 }
1475 1479
1476 // Create a dummy function object for the code generator. 1480 // Create a dummy function object for the code generator.
1477 // The function needs to be associated with a named Class: the interface 1481 // The function needs to be associated with a named Class: the interface
1478 // Function fits the bill. 1482 // Function fits the bill.
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 } 1889 }
1886 1890
1887 1891
1888 void BackgroundCompiler::EnsureInit(Thread* thread) { 1892 void BackgroundCompiler::EnsureInit(Thread* thread) {
1889 UNREACHABLE(); 1893 UNREACHABLE();
1890 } 1894 }
1891 1895
1892 #endif // DART_PRECOMPILED_RUNTIME 1896 #endif // DART_PRECOMPILED_RUNTIME
1893 1897
1894 } // namespace dart 1898 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698