Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Side by Side Diff: runtime/vm/code_generator_ia32.cc

Issue 8479006: Fix pc descriptor emission for skipped unary oepration +. Eliminates last co19 crash. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 } 1170 }
1171 1171
1172 1172
1173 void CodeGenerator::VisitUnaryOpNode(UnaryOpNode* node) { 1173 void CodeGenerator::VisitUnaryOpNode(UnaryOpNode* node) {
1174 if (node->kind() == Token::kNOT) { 1174 if (node->kind() == Token::kNOT) {
1175 // "!" cannot be overloaded, therefore inline it. 1175 // "!" cannot be overloaded, therefore inline it.
1176 GenerateLogicalNotOp(node); 1176 GenerateLogicalNotOp(node);
1177 return; 1177 return;
1178 } 1178 }
1179 node->operand()->Visit(this); 1179 node->operand()->Visit(this);
1180 MarkDeoptPoint(node->id(), node->token_index());
1181 if (node->kind() == Token::kADD) { 1180 if (node->kind() == Token::kADD) {
1182 // Unary operator '+' does not exist, it's a NOP, skip it. 1181 // Unary operator '+' does not exist, it's a NOP, skip it.
1183 if (!IsResultNeeded(node)) { 1182 if (!IsResultNeeded(node)) {
1184 __ popl(EAX); 1183 __ popl(EAX);
1185 } 1184 }
1186 return; 1185 return;
1187 } 1186 }
1187 MarkDeoptPoint(node->id(), node->token_index());
1188 String& operator_name = String::ZoneHandle(); 1188 String& operator_name = String::ZoneHandle();
1189 if (node->kind() == Token::kSUB) { 1189 if (node->kind() == Token::kSUB) {
1190 operator_name = String::NewSymbol(Token::Str(Token::kNEGATE)); 1190 operator_name = String::NewSymbol(Token::Str(Token::kNEGATE));
1191 } else { 1191 } else {
1192 operator_name = String::NewSymbol(node->Name()); 1192 operator_name = String::NewSymbol(node->Name());
1193 } 1193 }
1194 const int kNumberOfArguments = 1; 1194 const int kNumberOfArguments = 1;
1195 const Array& kNoArgumentNames = Array::Handle(); 1195 const Array& kNoArgumentNames = Array::Handle();
1196 GenerateInstanceCall(node->id(), 1196 GenerateInstanceCall(node->id(),
1197 node->token_index(), 1197 node->token_index(),
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 const Class& cls = Class::Handle(parsed_function_.function().owner()); 2645 const Class& cls = Class::Handle(parsed_function_.function().owner());
2646 const Script& script = Script::Handle(cls.script()); 2646 const Script& script = Script::Handle(cls.script());
2647 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); 2647 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args);
2648 Isolate::Current()->long_jump_base()->Jump(1, error_msg); 2648 Isolate::Current()->long_jump_base()->Jump(1, error_msg);
2649 UNREACHABLE(); 2649 UNREACHABLE();
2650 } 2650 }
2651 2651
2652 } // namespace dart 2652 } // namespace dart
2653 2653
2654 #endif // defined TARGET_ARCH_IA32 2654 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698