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

Side by Side Diff: src/x64/full-codegen-x64.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/ppc/full-codegen-ppc.cc ('k') | src/x87/full-codegen-x87.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_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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. 1237 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet.
1238 __ Cmp(rdx, Smi::FromInt(0)); 1238 __ Cmp(rdx, Smi::FromInt(0));
1239 __ j(equal, &update_each, Label::kNear); 1239 __ j(equal, &update_each, Label::kNear);
1240 1240
1241 // Convert the entry to a string or null if it isn't a property 1241 // Convert the entry to a string or null if it isn't a property
1242 // anymore. If the property has been removed while iterating, we 1242 // anymore. If the property has been removed while iterating, we
1243 // just skip it. 1243 // just skip it.
1244 __ Push(rcx); // Enumerable. 1244 __ Push(rcx); // Enumerable.
1245 __ Push(rbx); // Current entry. 1245 __ Push(rbx); // Current entry.
1246 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); 1246 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
1247 PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
1247 __ Cmp(rax, Smi::FromInt(0)); 1248 __ Cmp(rax, Smi::FromInt(0));
1248 __ j(equal, loop_statement.continue_label()); 1249 __ j(equal, loop_statement.continue_label());
1249 __ movp(rbx, rax); 1250 __ movp(rbx, rax);
1250 1251
1251 // Update the 'each' property or variable from the possibly filtered 1252 // Update the 'each' property or variable from the possibly filtered
1252 // entry in register rbx. 1253 // entry in register rbx.
1253 __ bind(&update_each); 1254 __ bind(&update_each);
1254 __ movp(result_register(), rbx); 1255 __ movp(result_register(), rbx);
1255 // Perform the assignment as if via '='. 1256 // Perform the assignment as if via '='.
1256 { EffectContext context(this); 1257 { EffectContext context(this);
(...skipping 4160 matching lines...) Expand 10 before | Expand all | Expand 10 after
5417 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5418 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5418 Assembler::target_address_at(call_target_address, 5419 Assembler::target_address_at(call_target_address,
5419 unoptimized_code)); 5420 unoptimized_code));
5420 return OSR_AFTER_STACK_CHECK; 5421 return OSR_AFTER_STACK_CHECK;
5421 } 5422 }
5422 5423
5423 5424
5424 } } // namespace v8::internal 5425 } } // namespace v8::internal
5425 5426
5426 #endif // V8_TARGET_ARCH_X64 5427 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698