| 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 "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 const Class& cls = Class::Handle(function.signature_class()); | 582 const Class& cls = Class::Handle(function.signature_class()); |
| 583 if (cls.HasTypeArguments()) { | 583 if (cls.HasTypeArguments()) { |
| 584 __ popq(RCX); // Discard type arguments. | 584 __ popq(RCX); // Discard type arguments. |
| 585 } | 585 } |
| 586 if (function.IsImplicitInstanceClosureFunction()) { | 586 if (function.IsImplicitInstanceClosureFunction()) { |
| 587 __ popq(RCX); // Discard receiver. | 587 __ popq(RCX); // Discard receiver. |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 | 590 |
| 591 | 591 |
| 592 void FlowGraphCompiler::VisitThrow(ThrowComp* comp) { |
| 593 LoadValue(RAX, comp->exception()); |
| 594 __ pushq(RAX); |
| 595 GenerateCallRuntime(comp->node_id(), comp->token_index(), kThrowRuntimeEntry); |
| 596 __ int3(); |
| 597 } |
| 598 |
| 599 |
| 600 void FlowGraphCompiler::VisitReThrow(ReThrowComp* comp) { |
| 601 LoadValue(RBX, comp->stack_trace()); |
| 602 LoadValue(RAX, comp->exception()); |
| 603 __ pushq(RAX); |
| 604 __ pushq(RBX); |
| 605 GenerateCallRuntime( |
| 606 comp->node_id(), comp->token_index(), kReThrowRuntimeEntry); |
| 607 Bailout("ReThrow Untested"); |
| 608 } |
| 609 |
| 610 |
| 592 void FlowGraphCompiler::VisitNativeLoadField(NativeLoadFieldComp* comp) { | 611 void FlowGraphCompiler::VisitNativeLoadField(NativeLoadFieldComp* comp) { |
| 593 __ popq(RAX); | 612 __ popq(RAX); |
| 594 __ movq(RAX, FieldAddress(RAX, comp->offset_in_bytes())); | 613 __ movq(RAX, FieldAddress(RAX, comp->offset_in_bytes())); |
| 595 } | 614 } |
| 596 | 615 |
| 597 | 616 |
| 598 void FlowGraphCompiler::VisitExtractTypeArguments( | 617 void FlowGraphCompiler::VisitExtractTypeArguments( |
| 599 ExtractTypeArgumentsComp* comp) { | 618 ExtractTypeArgumentsComp* comp) { |
| 600 __ popq(RAX); // Instantiator. | 619 __ popq(RAX); // Instantiator. |
| 601 if (!comp->constructor().IsFactory()) { | 620 if (!comp->constructor().IsFactory()) { |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 1120 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
| 1102 // We don't compile exception handlers yet. | 1121 // We don't compile exception handlers yet. |
| 1103 code.set_exception_handlers( | 1122 code.set_exception_handlers( |
| 1104 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); | 1123 ExceptionHandlers::Handle(ExceptionHandlers::New(0))); |
| 1105 } | 1124 } |
| 1106 | 1125 |
| 1107 | 1126 |
| 1108 } // namespace dart | 1127 } // namespace dart |
| 1109 | 1128 |
| 1110 #endif // defined TARGET_ARCH_X64 | 1129 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |