| 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 } | 1872 } |
| 1873 | 1873 |
| 1874 | 1874 |
| 1875 LocalVariable* EffectGraphVisitor::EnterTempLocalScope(Value* value) { | 1875 LocalVariable* EffectGraphVisitor::EnterTempLocalScope(Value* value) { |
| 1876 Do(new PushTempInstr(value)); | 1876 Do(new PushTempInstr(value)); |
| 1877 AllocateTempIndex(); | 1877 AllocateTempIndex(); |
| 1878 | 1878 |
| 1879 ASSERT(value->definition()->temp_index() == temp_index() - 1); | 1879 ASSERT(value->definition()->temp_index() == temp_index() - 1); |
| 1880 intptr_t index = GetCurrentTempLocalIndex(); | 1880 intptr_t index = GetCurrentTempLocalIndex(); |
| 1881 char name[64]; | 1881 char name[64]; |
| 1882 OS::SNPrint(name, 64, ":tmp_local%"Pd, index); | 1882 OS::SNPrint(name, 64, ":tmp_local%" Pd, index); |
| 1883 LocalVariable* var = | 1883 LocalVariable* var = |
| 1884 new LocalVariable(0, | 1884 new LocalVariable(0, |
| 1885 String::ZoneHandle(Symbols::New(name)), | 1885 String::ZoneHandle(Symbols::New(name)), |
| 1886 *value->Type()->ToAbstractType()); | 1886 *value->Type()->ToAbstractType()); |
| 1887 var->set_index(index); | 1887 var->set_index(index); |
| 1888 return var; | 1888 return var; |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 | 1891 |
| 1892 Definition* EffectGraphVisitor::ExitTempLocalScope(LocalVariable* var) { | 1892 Definition* EffectGraphVisitor::ExitTempLocalScope(LocalVariable* var) { |
| (...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3670 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3670 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3671 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3671 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3672 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3672 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3673 const Error& error = Error::Handle( | 3673 const Error& error = Error::Handle( |
| 3674 LanguageError::New(String::Handle(String::New(chars)))); | 3674 LanguageError::New(String::Handle(String::New(chars)))); |
| 3675 Isolate::Current()->long_jump_base()->Jump(1, error); | 3675 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3676 } | 3676 } |
| 3677 | 3677 |
| 3678 | 3678 |
| 3679 } // namespace dart | 3679 } // namespace dart |
| OLD | NEW |