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

Side by Side Diff: src/arm/full-codegen-arm.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 | « BUILD.gn ('k') | src/arm64/full-codegen-arm64.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_ARM 7 #if V8_TARGET_ARCH_ARM
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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 // For proxies, no filtering is done. 1264 // For proxies, no filtering is done.
1265 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. 1265 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet.
1266 __ cmp(r2, Operand(Smi::FromInt(0))); 1266 __ cmp(r2, Operand(Smi::FromInt(0)));
1267 __ b(eq, &update_each); 1267 __ b(eq, &update_each);
1268 1268
1269 // Convert the entry to a string or (smi) 0 if it isn't a property 1269 // Convert the entry to a string or (smi) 0 if it isn't a property
1270 // any more. If the property has been removed while iterating, we 1270 // any more. If the property has been removed while iterating, we
1271 // just skip it. 1271 // just skip it.
1272 __ push(r1); // Enumerable. 1272 __ push(r1); // Enumerable.
1273 __ push(r3); // Current entry. 1273 __ push(r3); // Current entry.
1274 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); 1274 __ CallRuntime(Runtime::kForInFilter, 2);
1275 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); 1275 PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
1276 __ mov(r3, Operand(r0), SetCC); 1276 __ mov(r3, Operand(r0));
1277 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
1278 __ cmp(r0, ip);
1277 __ b(eq, loop_statement.continue_label()); 1279 __ b(eq, loop_statement.continue_label());
1278 1280
1279 // Update the 'each' property or variable from the possibly filtered 1281 // Update the 'each' property or variable from the possibly filtered
1280 // entry in register r3. 1282 // entry in register r3.
1281 __ bind(&update_each); 1283 __ bind(&update_each);
1282 __ mov(result_register(), r3); 1284 __ mov(result_register(), r3);
1283 // Perform the assignment as if via '='. 1285 // Perform the assignment as if via '='.
1284 { EffectContext context(this); 1286 { EffectContext context(this);
1285 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); 1287 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot());
1286 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); 1288 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS);
(...skipping 4284 matching lines...) Expand 10 before | Expand all | Expand 10 after
5571 5573
5572 DCHECK(interrupt_address == 5574 DCHECK(interrupt_address ==
5573 isolate->builtins()->OsrAfterStackCheck()->entry()); 5575 isolate->builtins()->OsrAfterStackCheck()->entry());
5574 return OSR_AFTER_STACK_CHECK; 5576 return OSR_AFTER_STACK_CHECK;
5575 } 5577 }
5576 5578
5577 5579
5578 } } // namespace v8::internal 5580 } } // namespace v8::internal
5579 5581
5580 #endif // V8_TARGET_ARCH_ARM 5582 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698