| OLD | NEW |
| 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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 } | 1579 } |
| 1580 UNREACHABLE(); | 1580 UNREACHABLE(); |
| 1581 return Object::null(); | 1581 return Object::null(); |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 | 1584 |
| 1585 void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) { | 1585 void Compiler::AbortBackgroundCompilation(intptr_t deopt_id, const char* msg) { |
| 1586 if (FLAG_trace_compiler) { | 1586 if (FLAG_trace_compiler) { |
| 1587 THR_Print("ABORT background compilation: %s\n", msg); | 1587 THR_Print("ABORT background compilation: %s\n", msg); |
| 1588 } | 1588 } |
| 1589 NOT_IN_PRODUCT( |
| 1589 TimelineStream* stream = Timeline::GetCompilerStream(); | 1590 TimelineStream* stream = Timeline::GetCompilerStream(); |
| 1590 ASSERT(stream != NULL); | 1591 ASSERT(stream != NULL); |
| 1591 TimelineEvent* event = stream->StartEvent(); | 1592 TimelineEvent* event = stream->StartEvent(); |
| 1592 if (event != NULL) { | 1593 if (event != NULL) { |
| 1593 event->Instant("AbortBackgroundCompilation"); | 1594 event->Instant("AbortBackgroundCompilation"); |
| 1594 event->SetNumArguments(1); | 1595 event->SetNumArguments(1); |
| 1595 event->CopyArgument(0, "reason", msg); | 1596 event->CopyArgument(0, "reason", msg); |
| 1596 event->Complete(); | 1597 event->Complete(); |
| 1597 } | 1598 } |
| 1599 ) // !PRODUCT |
| 1598 ASSERT(Compiler::IsBackgroundCompilation()); | 1600 ASSERT(Compiler::IsBackgroundCompilation()); |
| 1599 Thread::Current()->long_jump_base()->Jump( | 1601 Thread::Current()->long_jump_base()->Jump( |
| 1600 deopt_id, Object::background_compilation_error()); | 1602 deopt_id, Object::background_compilation_error()); |
| 1601 } | 1603 } |
| 1602 | 1604 |
| 1603 | 1605 |
| 1604 // C-heap allocated background compilation queue element. | 1606 // C-heap allocated background compilation queue element. |
| 1605 class QueueElement { | 1607 class QueueElement { |
| 1606 public: | 1608 public: |
| 1607 explicit QueueElement(const Function& function) | 1609 explicit QueueElement(const Function& function) |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 } | 2001 } |
| 2000 | 2002 |
| 2001 | 2003 |
| 2002 void BackgroundCompiler::EnsureInit(Thread* thread) { | 2004 void BackgroundCompiler::EnsureInit(Thread* thread) { |
| 2003 UNREACHABLE(); | 2005 UNREACHABLE(); |
| 2004 } | 2006 } |
| 2005 | 2007 |
| 2006 #endif // DART_PRECOMPILED_RUNTIME | 2008 #endif // DART_PRECOMPILED_RUNTIME |
| 2007 | 2009 |
| 2008 } // namespace dart | 2010 } // namespace dart |
| OLD | NEW |