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

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

Issue 10919119: Do not append input value of AS comparison if the check is eliminated. Fixes issue 4944, crash caus… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 locs()); 81 locs());
82 __ popl(temp); // Remove argument. 82 __ popl(temp); // Remove argument.
83 __ popl(result); // Restore result. 83 __ popl(result); // Restore result.
84 } 84 }
85 #if defined(DEBUG) 85 #if defined(DEBUG)
86 // TODO(srdjan): Fix for functions with finally clause. 86 // TODO(srdjan): Fix for functions with finally clause.
87 // A finally clause may leave a previously pushed return value if it 87 // A finally clause may leave a previously pushed return value if it
88 // has its own return instruction. Method that have finally are currently 88 // has its own return instruction. Method that have finally are currently
89 // not optimized. 89 // not optimized.
90 if (!compiler->HasFinally()) { 90 if (!compiler->HasFinally()) {
91 __ Comment("Stack Check");
91 Label done; 92 Label done;
92 __ movl(EDI, EBP); 93 __ movl(EDI, EBP);
93 __ subl(EDI, ESP); 94 __ subl(EDI, ESP);
94 // + 1 for Pc marker. 95 // + 1 for Pc marker.
95 __ cmpl(EDI, Immediate((compiler->StackSize() + 1) * kWordSize)); 96 __ cmpl(EDI, Immediate((compiler->StackSize() + 1) * kWordSize));
96 __ j(EQUAL, &done, Assembler::kNearJump); 97 __ j(EQUAL, &done, Assembler::kNearJump);
97 __ int3(); 98 __ int3();
98 __ Bind(&done); 99 __ Bind(&done);
99 } 100 }
100 #endif 101 #endif
(...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 __ j(ABOVE_EQUAL, deopt); 2246 __ j(ABOVE_EQUAL, deopt);
2246 } 2247 }
2247 } 2248 }
2248 2249
2249 2250
2250 } // namespace dart 2251 } // namespace dart
2251 2252
2252 #undef __ 2253 #undef __
2253 2254
2254 #endif // defined TARGET_ARCH_X64 2255 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/token.h » ('j') | runtime/vm/token.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698