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

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

Issue 1160983004: [turbofan] First step towards sanitizing for-in and making it optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add some comments. Created 5 years, 6 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/hydrogen.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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. 1190 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet.
1191 DCHECK(Smi::FromInt(0) == 0); 1191 DCHECK(Smi::FromInt(0) == 0);
1192 __ test(edx, edx); 1192 __ test(edx, edx);
1193 __ j(zero, &update_each); 1193 __ j(zero, &update_each);
1194 1194
1195 // Convert the entry to a string or null if it isn't a property 1195 // Convert the entry to a string or null if it isn't a property
1196 // anymore. If the property has been removed while iterating, we 1196 // anymore. If the property has been removed while iterating, we
1197 // just skip it. 1197 // just skip it.
1198 __ push(ecx); // Enumerable. 1198 __ push(ecx); // Enumerable.
1199 __ push(ebx); // Current entry. 1199 __ push(ebx); // Current entry.
1200 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); 1200 __ CallRuntime(Runtime::kForInFilter, 2);
1201 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); 1201 PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
1202 __ test(eax, eax); 1202 __ cmp(eax, isolate()->factory()->undefined_value());
1203 __ j(equal, loop_statement.continue_label()); 1203 __ j(equal, loop_statement.continue_label());
1204 __ mov(ebx, eax); 1204 __ mov(ebx, eax);
1205 1205
1206 // Update the 'each' property or variable from the possibly filtered 1206 // Update the 'each' property or variable from the possibly filtered
1207 // entry in register ebx. 1207 // entry in register ebx.
1208 __ bind(&update_each); 1208 __ bind(&update_each);
1209 __ mov(result_register(), ebx); 1209 __ mov(result_register(), ebx);
1210 // Perform the assignment as if via '='. 1210 // Perform the assignment as if via '='.
1211 { EffectContext context(this); 1211 { EffectContext context(this);
1212 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); 1212 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot());
(...skipping 4223 matching lines...) Expand 10 before | Expand all | Expand 10 after
5436 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5436 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5437 Assembler::target_address_at(call_target_address, 5437 Assembler::target_address_at(call_target_address,
5438 unoptimized_code)); 5438 unoptimized_code));
5439 return OSR_AFTER_STACK_CHECK; 5439 return OSR_AFTER_STACK_CHECK;
5440 } 5440 }
5441 5441
5442 5442
5443 } } // namespace v8::internal 5443 } } // namespace v8::internal
5444 5444
5445 #endif // V8_TARGET_ARCH_IA32 5445 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698