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

Side by Side Diff: src/full-codegen/ppc/full-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 #if V8_TARGET_ARCH_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1030
1031 // The enum cache is valid. Load the map of the object being 1031 // The enum cache is valid. Load the map of the object being
1032 // iterated over and use the cache for the iteration. 1032 // iterated over and use the cache for the iteration.
1033 Label use_cache; 1033 Label use_cache;
1034 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); 1034 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset));
1035 __ b(&use_cache); 1035 __ b(&use_cache);
1036 1036
1037 // Get the set of properties to enumerate. 1037 // Get the set of properties to enumerate.
1038 __ bind(&call_runtime); 1038 __ bind(&call_runtime);
1039 __ push(r3); // Duplicate the enumerable object on the stack. 1039 __ push(r3); // Duplicate the enumerable object on the stack.
1040 __ CallRuntime(Runtime::kGetPropertyNamesFast); 1040 __ CallRuntime(Runtime::kForInEnumerate);
1041 PrepareForBailoutForId(stmt->EnumId(), TOS_REG); 1041 PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
1042 1042
1043 // If we got a map from the runtime call, we can do a fast 1043 // If we got a map from the runtime call, we can do a fast
1044 // modification check. Otherwise, we got a fixed array, and we have 1044 // modification check. Otherwise, we got a fixed array, and we have
1045 // to do a slow check. 1045 // to do a slow check.
1046 Label fixed_array; 1046 Label fixed_array;
1047 __ LoadP(r5, FieldMemOperand(r3, HeapObject::kMapOffset)); 1047 __ LoadP(r5, FieldMemOperand(r3, HeapObject::kMapOffset));
1048 __ LoadRoot(ip, Heap::kMetaMapRootIndex); 1048 __ LoadRoot(ip, Heap::kMetaMapRootIndex);
1049 __ cmp(r5, ip); 1049 __ cmp(r5, ip);
1050 __ bne(&fixed_array); 1050 __ bne(&fixed_array);
(...skipping 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 return ON_STACK_REPLACEMENT; 4789 return ON_STACK_REPLACEMENT;
4790 } 4790 }
4791 4791
4792 DCHECK(interrupt_address == 4792 DCHECK(interrupt_address ==
4793 isolate->builtins()->OsrAfterStackCheck()->entry()); 4793 isolate->builtins()->OsrAfterStackCheck()->entry());
4794 return OSR_AFTER_STACK_CHECK; 4794 return OSR_AFTER_STACK_CHECK;
4795 } 4795 }
4796 } // namespace internal 4796 } // namespace internal
4797 } // namespace v8 4797 } // namespace v8
4798 #endif // V8_TARGET_ARCH_PPC 4798 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698