| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 __ Bind(&null_args_loop_condition); | 1021 __ Bind(&null_args_loop_condition); |
| 1022 __ decl(ECX); | 1022 __ decl(ECX); |
| 1023 __ j(POSITIVE, &null_args_loop, Assembler::kNearJump); | 1023 __ j(POSITIVE, &null_args_loop, Assembler::kNearJump); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 | 1026 |
| 1027 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) { | 1027 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) { |
| 1028 // TOS: return address. | 1028 // TOS: return address. |
| 1029 // +1 : receiver. | 1029 // +1 : receiver. |
| 1030 // Sequence node has one return node, its input is load field node. | 1030 // Sequence node has one return node, its input is load field node. |
| 1031 __ Comment("Inlined Getter"); |
| 1031 __ movl(EAX, Address(ESP, 1 * kWordSize)); | 1032 __ movl(EAX, Address(ESP, 1 * kWordSize)); |
| 1032 __ movl(EAX, FieldAddress(EAX, offset)); | 1033 __ movl(EAX, FieldAddress(EAX, offset)); |
| 1033 __ ret(); | 1034 __ ret(); |
| 1034 } | 1035 } |
| 1035 | 1036 |
| 1036 | 1037 |
| 1037 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) { | 1038 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) { |
| 1038 // TOS: return address. | 1039 // TOS: return address. |
| 1039 // +1 : value | 1040 // +1 : value |
| 1040 // +2 : receiver. | 1041 // +2 : receiver. |
| 1041 // Sequence node has one store node and one return NULL node. | 1042 // Sequence node has one store node and one return NULL node. |
| 1043 __ Comment("Inlined Setter"); |
| 1042 __ movl(EAX, Address(ESP, 2 * kWordSize)); // Receiver. | 1044 __ movl(EAX, Address(ESP, 2 * kWordSize)); // Receiver. |
| 1043 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Value. | 1045 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Value. |
| 1044 __ StoreIntoObject(EAX, FieldAddress(EAX, offset), EBX); | 1046 __ StoreIntoObject(EAX, FieldAddress(EAX, offset), EBX); |
| 1045 const Immediate& raw_null = | 1047 const Immediate& raw_null = |
| 1046 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1048 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1047 __ movl(EAX, raw_null); | 1049 __ movl(EAX, raw_null); |
| 1048 __ ret(); | 1050 __ ret(); |
| 1049 } | 1051 } |
| 1050 | 1052 |
| 1051 | 1053 |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1907 __ movups(reg, Address(ESP, 0)); | 1909 __ movups(reg, Address(ESP, 0)); |
| 1908 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1910 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1909 } | 1911 } |
| 1910 | 1912 |
| 1911 | 1913 |
| 1912 #undef __ | 1914 #undef __ |
| 1913 | 1915 |
| 1914 } // namespace dart | 1916 } // namespace dart |
| 1915 | 1917 |
| 1916 #endif // defined TARGET_ARCH_IA32 | 1918 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |