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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 5711 matching lines...) Expand 10 before | Expand all | Expand 10 after
5722 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { 5722 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
5723 Label use_cache, call_runtime; 5723 Label use_cache, call_runtime;
5724 __ CheckEnumCache(&call_runtime); 5724 __ CheckEnumCache(&call_runtime);
5725 5725
5726 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); 5726 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset));
5727 __ b(&use_cache); 5727 __ b(&use_cache);
5728 5728
5729 // Get the set of properties to enumerate. 5729 // Get the set of properties to enumerate.
5730 __ bind(&call_runtime); 5730 __ bind(&call_runtime);
5731 __ push(r3); 5731 __ push(r3);
5732 CallRuntime(Runtime::kGetPropertyNamesFast, instr); 5732 CallRuntime(Runtime::kForInEnumerate, instr);
5733 __ bind(&use_cache); 5733 __ bind(&use_cache);
5734 } 5734 }
5735 5735
5736 5736
5737 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { 5737 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) {
5738 Register map = ToRegister(instr->map()); 5738 Register map = ToRegister(instr->map());
5739 Register result = ToRegister(instr->result()); 5739 Register result = ToRegister(instr->result());
5740 Label load_cache, done; 5740 Label load_cache, done;
5741 __ EnumLength(result, map); 5741 __ EnumLength(result, map);
5742 __ CmpSmiLiteral(result, Smi::FromInt(0), r0); 5742 __ CmpSmiLiteral(result, Smi::FromInt(0), r0);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
5846 __ Push(scope_info); 5846 __ Push(scope_info);
5847 __ push(ToRegister(instr->function())); 5847 __ push(ToRegister(instr->function()));
5848 CallRuntime(Runtime::kPushBlockContext, instr); 5848 CallRuntime(Runtime::kPushBlockContext, instr);
5849 RecordSafepoint(Safepoint::kNoLazyDeopt); 5849 RecordSafepoint(Safepoint::kNoLazyDeopt);
5850 } 5850 }
5851 5851
5852 5852
5853 #undef __ 5853 #undef __
5854 } // namespace internal 5854 } // namespace internal
5855 } // namespace v8 5855 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698