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

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

Issue 10283003: - Fix another side effect issue: never add AstNode to sequence unless they are a statement. Added t… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months 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 | « runtime/vm/ast.h ('k') | runtime/vm/code_generator_x64.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/code_generator_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698