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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.cc

Issue 1631583002: [for-in] Further refactorings and unification around for-in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5456 matching lines...) Expand 10 before | Expand all | Expand 10 after
5467 Label use_cache, call_runtime; 5467 Label use_cache, call_runtime;
5468 DCHECK(object.is(a0)); 5468 DCHECK(object.is(a0));
5469 __ CheckEnumCache(&call_runtime); 5469 __ CheckEnumCache(&call_runtime);
5470 5470
5471 __ lw(result, FieldMemOperand(object, HeapObject::kMapOffset)); 5471 __ lw(result, FieldMemOperand(object, HeapObject::kMapOffset));
5472 __ Branch(&use_cache); 5472 __ Branch(&use_cache);
5473 5473
5474 // Get the set of properties to enumerate. 5474 // Get the set of properties to enumerate.
5475 __ bind(&call_runtime); 5475 __ bind(&call_runtime);
5476 __ push(object); 5476 __ push(object);
5477 CallRuntime(Runtime::kGetPropertyNamesFast, instr); 5477 CallRuntime(Runtime::kForInEnumerate, instr);
5478 __ bind(&use_cache); 5478 __ bind(&use_cache);
5479 } 5479 }
5480 5480
5481 5481
5482 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { 5482 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) {
5483 Register map = ToRegister(instr->map()); 5483 Register map = ToRegister(instr->map());
5484 Register result = ToRegister(instr->result()); 5484 Register result = ToRegister(instr->result());
5485 Label load_cache, done; 5485 Label load_cache, done;
5486 __ EnumLength(result, map); 5486 __ EnumLength(result, map);
5487 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0))); 5487 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0)));
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5595 __ Push(at, ToRegister(instr->function())); 5595 __ Push(at, ToRegister(instr->function()));
5596 CallRuntime(Runtime::kPushBlockContext, instr); 5596 CallRuntime(Runtime::kPushBlockContext, instr);
5597 RecordSafepoint(Safepoint::kNoLazyDeopt); 5597 RecordSafepoint(Safepoint::kNoLazyDeopt);
5598 } 5598 }
5599 5599
5600 5600
5601 #undef __ 5601 #undef __
5602 5602
5603 } // namespace internal 5603 } // namespace internal
5604 } // namespace v8 5604 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698