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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 1086083002: [turbofan] Fix ForInStatement that deopts during filter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ported to all architectures. Created 5 years, 8 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/mips/full-codegen-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 DCHECK(Smi::FromInt(0) == 0); 1203 DCHECK(Smi::FromInt(0) == 0);
1204 __ test(edx, edx); 1204 __ test(edx, edx);
1205 __ j(zero, &update_each); 1205 __ j(zero, &update_each);
1206 1206
1207 // Convert the entry to a string or null if it isn't a property 1207 // Convert the entry to a string or null if it isn't a property
1208 // anymore. If the property has been removed while iterating, we 1208 // anymore. If the property has been removed while iterating, we
1209 // just skip it. 1209 // just skip it.
1210 __ push(ecx); // Enumerable. 1210 __ push(ecx); // Enumerable.
1211 __ push(ebx); // Current entry. 1211 __ push(ebx); // Current entry.
1212 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); 1212 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
1213 PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
1213 __ test(eax, eax); 1214 __ test(eax, eax);
1214 __ j(equal, loop_statement.continue_label()); 1215 __ j(equal, loop_statement.continue_label());
1215 __ mov(ebx, eax); 1216 __ mov(ebx, eax);
1216 1217
1217 // Update the 'each' property or variable from the possibly filtered 1218 // Update the 'each' property or variable from the possibly filtered
1218 // entry in register ebx. 1219 // entry in register ebx.
1219 __ bind(&update_each); 1220 __ bind(&update_each);
1220 __ mov(result_register(), ebx); 1221 __ mov(result_register(), ebx);
1221 // Perform the assignment as if via '='. 1222 // Perform the assignment as if via '='.
1222 { EffectContext context(this); 1223 { EffectContext context(this);
(...skipping 4173 matching lines...) Expand 10 before | Expand all | Expand 10 after
5396 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5397 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5397 Assembler::target_address_at(call_target_address, 5398 Assembler::target_address_at(call_target_address,
5398 unoptimized_code)); 5399 unoptimized_code));
5399 return OSR_AFTER_STACK_CHECK; 5400 return OSR_AFTER_STACK_CHECK;
5400 } 5401 }
5401 5402
5402 5403
5403 } } // namespace v8::internal 5404 } } // namespace v8::internal
5404 5405
5405 #endif // V8_TARGET_ARCH_IA32 5406 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698