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

Side by Side Diff: vm/code_generator_ia32.cc

Issue 8439023: Optimize 2/3 of instance field increment operation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | vm/opt_code_generator_ia32.h » ('j') | vm/opt_code_generator_ia32.cc » ('J')
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 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 if (node->prefix() && IsResultNeeded(node)) { 1226 if (node->prefix() && IsResultNeeded(node)) {
1227 __ pushl(EAX); 1227 __ pushl(EAX);
1228 } 1228 }
1229 } 1229 }
1230 1230
1231 1231
1232 void CodeGenerator::VisitIncrOpInstanceFieldNode( 1232 void CodeGenerator::VisitIncrOpInstanceFieldNode(
1233 IncrOpInstanceFieldNode* node) { 1233 IncrOpInstanceFieldNode* node) {
1234 ASSERT((node->kind() == Token::kINCR) || (node->kind() == Token::kDECR)); 1234 ASSERT((node->kind() == Token::kINCR) || (node->kind() == Token::kDECR));
1235 node->receiver()->Visit(this); 1235 node->receiver()->Visit(this);
1236 MarkDeoptPoint(node->id(), node->token_index());
1237 __ pushl(Address(ESP, 0)); // Duplicate receiver (preserve for setter). 1236 __ pushl(Address(ESP, 0)); // Duplicate receiver (preserve for setter).
1237 MarkDeoptPoint(node->getter_id(), node->token_index());
1238 GenerateInstanceGetterCall(node->getter_id(), 1238 GenerateInstanceGetterCall(node->getter_id(),
1239 node->token_index(), 1239 node->token_index(),
1240 node->field_name()); 1240 node->field_name());
1241 // result is in EAX. 1241 // result is in EAX.
1242 __ popl(EDX); // Get receiver. 1242 __ popl(EDX); // Get receiver.
1243 if (!node->prefix() && IsResultNeeded(node)) { 1243 if (!node->prefix() && IsResultNeeded(node)) {
1244 // Preserve as result. 1244 // Preserve as result.
1245 __ pushl(EAX); // Preserve value as result. 1245 __ pushl(EAX); // Preserve value as result.
1246 } 1246 }
1247 const Immediate one_value = Immediate(reinterpret_cast<int32_t>(Smi::New(1))); 1247 const Immediate one_value = Immediate(reinterpret_cast<int32_t>(Smi::New(1)));
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 const Class& cls = Class::Handle(parsed_function_.function().owner()); 2638 const Class& cls = Class::Handle(parsed_function_.function().owner());
2639 const Script& script = Script::Handle(cls.script()); 2639 const Script& script = Script::Handle(cls.script());
2640 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); 2640 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args);
2641 Isolate::Current()->long_jump_base()->Jump(1, error_msg); 2641 Isolate::Current()->long_jump_base()->Jump(1, error_msg);
2642 UNREACHABLE(); 2642 UNREACHABLE();
2643 } 2643 }
2644 2644
2645 } // namespace dart 2645 } // namespace dart
2646 2646
2647 #endif // defined TARGET_ARCH_IA32 2647 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | vm/opt_code_generator_ia32.h » ('j') | vm/opt_code_generator_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698