| 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 MarkDeoptPoint(node->id(), node->token_index()); | 966 MarkDeoptPoint(node->id(), node->token_index()); |
| 967 __ popl(EAX); // Value. | 967 __ popl(EAX); // Value. |
| 968 if (FLAG_enable_type_checks) { | 968 if (FLAG_enable_type_checks) { |
| 969 GenerateAssertAssignable(node->id(), | 969 GenerateAssertAssignable(node->id(), |
| 970 node->value()->token_index(), | 970 node->value()->token_index(), |
| 971 AbstractType::ZoneHandle(node->field().type()), | 971 AbstractType::ZoneHandle(node->field().type()), |
| 972 String::ZoneHandle(node->field().name())); | 972 String::ZoneHandle(node->field().name())); |
| 973 } | 973 } |
| 974 __ popl(EDX); // Instance. | 974 __ popl(EDX); // Instance. |
| 975 __ StoreIntoObject(EDX, FieldAddress(EDX, node->field().Offset()), EAX); | 975 __ StoreIntoObject(EDX, FieldAddress(EDX, node->field().Offset()), EAX); |
| 976 if (IsResultNeeded(node)) { | 976 ASSERT(!IsResultNeeded(node)); |
| 977 // The result is the input value. | |
| 978 __ pushl(EAX); | |
| 979 } | |
| 980 } | 977 } |
| 981 | 978 |
| 982 | 979 |
| 983 // Expects array and index on stack and returns result in EAX. | 980 // Expects array and index on stack and returns result in EAX. |
| 984 void CodeGenerator::GenerateLoadIndexed(intptr_t node_id, | 981 void CodeGenerator::GenerateLoadIndexed(intptr_t node_id, |
| 985 intptr_t token_index) { | 982 intptr_t token_index) { |
| 986 // Invoke the [] operator on the receiver object with the index as argument. | 983 // Invoke the [] operator on the receiver object with the index as argument. |
| 987 const String& operator_name = | 984 const String& operator_name = |
| 988 String::ZoneHandle(String::NewSymbol(Token::Str(Token::kINDEX))); | 985 String::ZoneHandle(String::NewSymbol(Token::Str(Token::kINDEX))); |
| 989 const int kNumArguments = 2; // Receiver and index. | 986 const int kNumArguments = 2; // Receiver and index. |
| (...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2719 const Error& error = Error::Handle( | 2716 const Error& error = Error::Handle( |
| 2720 Parser::FormatError(script, token_index, "Error", format, args)); | 2717 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2721 va_end(args); | 2718 va_end(args); |
| 2722 Isolate::Current()->long_jump_base()->Jump(1, error); | 2719 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2723 UNREACHABLE(); | 2720 UNREACHABLE(); |
| 2724 } | 2721 } |
| 2725 | 2722 |
| 2726 } // namespace dart | 2723 } // namespace dart |
| 2727 | 2724 |
| 2728 #endif // defined TARGET_ARCH_IA32 | 2725 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |