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

Side by Side Diff: src/x64/full-codegen-x64.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/runtime/runtime-utils.h ('k') | tools/gyp/v8.gyp » ('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_X64 7 #if V8_TARGET_ARCH_X64
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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 // For proxies, no filtering is done. 1224 // For proxies, no filtering is done.
1225 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. 1225 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet.
1226 __ Cmp(rdx, Smi::FromInt(0)); 1226 __ Cmp(rdx, Smi::FromInt(0));
1227 __ j(equal, &update_each, Label::kNear); 1227 __ j(equal, &update_each, Label::kNear);
1228 1228
1229 // Convert the entry to a string or null if it isn't a property 1229 // Convert the entry to a string or null if it isn't a property
1230 // anymore. If the property has been removed while iterating, we 1230 // anymore. If the property has been removed while iterating, we
1231 // just skip it. 1231 // just skip it.
1232 __ Push(rcx); // Enumerable. 1232 __ Push(rcx); // Enumerable.
1233 __ Push(rbx); // Current entry. 1233 __ Push(rbx); // Current entry.
1234 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); 1234 __ CallRuntime(Runtime::kForInFilter, 2);
1235 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); 1235 PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
1236 __ Cmp(rax, Smi::FromInt(0)); 1236 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
1237 __ j(equal, loop_statement.continue_label()); 1237 __ j(equal, loop_statement.continue_label());
1238 __ movp(rbx, rax); 1238 __ movp(rbx, rax);
1239 1239
1240 // Update the 'each' property or variable from the possibly filtered 1240 // Update the 'each' property or variable from the possibly filtered
1241 // entry in register rbx. 1241 // entry in register rbx.
1242 __ bind(&update_each); 1242 __ bind(&update_each);
1243 __ movp(result_register(), rbx); 1243 __ movp(result_register(), rbx);
1244 // Perform the assignment as if via '='. 1244 // Perform the assignment as if via '='.
1245 { EffectContext context(this); 1245 { EffectContext context(this);
1246 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); 1246 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot());
(...skipping 4204 matching lines...) Expand 10 before | Expand all | Expand 10 after
5451 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5451 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5452 Assembler::target_address_at(call_target_address, 5452 Assembler::target_address_at(call_target_address,
5453 unoptimized_code)); 5453 unoptimized_code));
5454 return OSR_AFTER_STACK_CHECK; 5454 return OSR_AFTER_STACK_CHECK;
5455 } 5455 }
5456 5456
5457 5457
5458 } } // namespace v8::internal 5458 } } // namespace v8::internal
5459 5459
5460 #endif // V8_TARGET_ARCH_X64 5460 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-utils.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698