| 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_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/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 __ popl(Address(ECX, i * kWordSize)); | 951 __ popl(Address(ECX, i * kWordSize)); |
| 952 } | 952 } |
| 953 | 953 |
| 954 if (IsResultNeeded(node)) { | 954 if (IsResultNeeded(node)) { |
| 955 __ pushl(EAX); | 955 __ pushl(EAX); |
| 956 } | 956 } |
| 957 } | 957 } |
| 958 | 958 |
| 959 | 959 |
| 960 void CodeGenerator::VisitLoadLocalNode(LoadLocalNode* node) { | 960 void CodeGenerator::VisitLoadLocalNode(LoadLocalNode* node) { |
| 961 if (node->HasPseudo()) { |
| 962 node->pseudo()->Visit(this); |
| 963 __ popl(EAX); // Discard result. |
| 964 } |
| 961 // Load the value of the local variable and push it onto the expression stack. | 965 // Load the value of the local variable and push it onto the expression stack. |
| 962 if (IsResultNeeded(node)) { | 966 if (IsResultNeeded(node)) { |
| 963 GeneratePushVariable(node->local(), EAX); | 967 GeneratePushVariable(node->local(), EAX); |
| 964 } | 968 } |
| 965 } | 969 } |
| 966 | 970 |
| 967 | 971 |
| 968 void CodeGenerator::VisitStoreLocalNode(StoreLocalNode* node) { | 972 void CodeGenerator::VisitStoreLocalNode(StoreLocalNode* node) { |
| 969 node->value()->Visit(this); | 973 node->value()->Visit(this); |
| 970 __ popl(EAX); | 974 __ popl(EAX); |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 const Error& error = Error::Handle( | 2974 const Error& error = Error::Handle( |
| 2971 Parser::FormatError(script, token_index, "Error", format, args)); | 2975 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2972 va_end(args); | 2976 va_end(args); |
| 2973 Isolate::Current()->long_jump_base()->Jump(1, error); | 2977 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2974 UNREACHABLE(); | 2978 UNREACHABLE(); |
| 2975 } | 2979 } |
| 2976 | 2980 |
| 2977 } // namespace dart | 2981 } // namespace dart |
| 2978 | 2982 |
| 2979 #endif // defined TARGET_ARCH_IA32 | 2983 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |