| 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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 // instantiate the type arguments. | 1011 // instantiate the type arguments. |
| 1012 __ LoadObject(RAX, comp->type_arguments()); | 1012 __ LoadObject(RAX, comp->type_arguments()); |
| 1013 // RAX: uninstantiated type arguments. | 1013 // RAX: uninstantiated type arguments. |
| 1014 __ Bind(&type_arguments_instantiated); | 1014 __ Bind(&type_arguments_instantiated); |
| 1015 // RAX: uninstantiated or instantiated type arguments. | 1015 // RAX: uninstantiated or instantiated type arguments. |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 | 1018 |
| 1019 void FlowGraphCompiler::VisitExtractConstructorInstantiator( | 1019 void FlowGraphCompiler::VisitExtractConstructorInstantiator( |
| 1020 ExtractConstructorInstantiatorComp* comp) { | 1020 ExtractConstructorInstantiatorComp* comp) { |
| 1021 __ popq(RCX); // Discard value. | 1021 ASSERT(comp->instantiator()->IsUse()); |
| 1022 __ popq(RAX); // Instantiator. | 1022 LoadValue(RAX, comp->instantiator()); |
| 1023 | 1023 |
| 1024 // RAX is the instantiator AbstractTypeArguments object (or null). | 1024 // RAX is the instantiator AbstractTypeArguments object (or null). |
| 1025 // If the instantiator is null and if the type argument vector | 1025 // If the instantiator is null and if the type argument vector |
| 1026 // instantiated from null becomes a vector of Dynamic, then use null as | 1026 // instantiated from null becomes a vector of Dynamic, then use null as |
| 1027 // the type arguments and do not pass the instantiator. | 1027 // the type arguments and do not pass the instantiator. |
| 1028 Label done; | 1028 Label done; |
| 1029 const intptr_t len = comp->type_arguments().Length(); | 1029 const intptr_t len = comp->type_arguments().Length(); |
| 1030 if (comp->type_arguments().IsRawInstantiatedRaw(len)) { | 1030 if (comp->type_arguments().IsRawInstantiatedRaw(len)) { |
| 1031 const Immediate raw_null = | 1031 const Immediate raw_null = |
| 1032 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1032 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 ASSERT(exception_handlers_list_ != NULL); | 1697 ASSERT(exception_handlers_list_ != NULL); |
| 1698 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( | 1698 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( |
| 1699 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); | 1699 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); |
| 1700 code.set_exception_handlers(handlers); | 1700 code.set_exception_handlers(handlers); |
| 1701 } | 1701 } |
| 1702 | 1702 |
| 1703 | 1703 |
| 1704 } // namespace dart | 1704 } // namespace dart |
| 1705 | 1705 |
| 1706 #endif // defined TARGET_ARCH_X64 | 1706 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |