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

Side by Side Diff: src/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/mips64/full-codegen-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1252
1253 // For proxies, no filtering is done. 1253 // For proxies, no filtering is done.
1254 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet. 1254 // TODO(rossberg): What if only a prototype is a proxy? Not specified yet.
1255 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); 1255 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
1256 __ Branch(&update_each, eq, a2, Operand(zero_reg)); 1256 __ Branch(&update_each, eq, a2, Operand(zero_reg));
1257 1257
1258 // Convert the entry to a string or (smi) 0 if it isn't a property 1258 // Convert the entry to a string or (smi) 0 if it isn't a property
1259 // any more. If the property has been removed while iterating, we 1259 // any more. If the property has been removed while iterating, we
1260 // just skip it. 1260 // just skip it.
1261 __ Push(a1, a3); // Enumerable and current entry. 1261 __ Push(a1, a3); // Enumerable and current entry.
1262 __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); 1262 __ CallRuntime(Runtime::kForInFilter, 2);
1263 PrepareForBailoutForId(stmt->FilterId(), TOS_REG); 1263 PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
1264 __ mov(a3, result_register()); 1264 __ mov(a3, result_register());
1265 __ Branch(loop_statement.continue_label(), eq, a3, Operand(zero_reg)); 1265 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
1266 __ Branch(loop_statement.continue_label(), eq, a3, Operand(at));
1266 1267
1267 // Update the 'each' property or variable from the possibly filtered 1268 // Update the 'each' property or variable from the possibly filtered
1268 // entry in register a3. 1269 // entry in register a3.
1269 __ bind(&update_each); 1270 __ bind(&update_each);
1270 __ mov(result_register(), a3); 1271 __ mov(result_register(), a3);
1271 // Perform the assignment as if via '='. 1272 // Perform the assignment as if via '='.
1272 { EffectContext context(this); 1273 { EffectContext context(this);
1273 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot()); 1274 EmitAssignment(stmt->each(), stmt->EachFeedbackSlot());
1274 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); 1275 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS);
1275 } 1276 }
(...skipping 4241 matching lines...) Expand 10 before | Expand all | Expand 10 after
5517 Assembler::target_address_at(pc_immediate_load_address)) == 5518 Assembler::target_address_at(pc_immediate_load_address)) ==
5518 reinterpret_cast<uint32_t>( 5519 reinterpret_cast<uint32_t>(
5519 isolate->builtins()->OsrAfterStackCheck()->entry())); 5520 isolate->builtins()->OsrAfterStackCheck()->entry()));
5520 return OSR_AFTER_STACK_CHECK; 5521 return OSR_AFTER_STACK_CHECK;
5521 } 5522 }
5522 5523
5523 5524
5524 } } // namespace v8::internal 5525 } } // namespace v8::internal
5525 5526
5526 #endif // V8_TARGET_ARCH_MIPS 5527 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698