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

Side by Side Diff: src/ic/ppc/ic-compiler-ppc.cc

Issue 994533004: Contribution of PowerPC port (continuation of 422063005) - uplevel (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/ic/ppc/handler-compiler-ppc.cc ('k') | src/ppc/assembler-ppc.h » ('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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/ic-compiler.h" 10 #include "src/ic/ic-compiler.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 int receiver_count = maps->length(); 68 int receiver_count = maps->length();
69 int number_of_handled_maps = 0; 69 int number_of_handled_maps = 0;
70 __ LoadP(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); 70 __ LoadP(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
71 for (int current = 0; current < receiver_count; ++current) { 71 for (int current = 0; current < receiver_count; ++current) {
72 Handle<Map> map = maps->at(current); 72 Handle<Map> map = maps->at(current);
73 if (!map->is_deprecated()) { 73 if (!map->is_deprecated()) {
74 number_of_handled_maps++; 74 number_of_handled_maps++;
75 Handle<WeakCell> cell = Map::WeakCellForMap(map); 75 Handle<WeakCell> cell = Map::WeakCellForMap(map);
76 __ CmpWeakValue(map_reg, cell, scratch2()); 76 __ CmpWeakValue(map_reg, cell, scratch2());
77 Label next;
78 __ bne(&next);
77 if (map->instance_type() == HEAP_NUMBER_TYPE) { 79 if (map->instance_type() == HEAP_NUMBER_TYPE) {
78 DCHECK(!number_case.is_unused()); 80 DCHECK(!number_case.is_unused());
79 __ bind(&number_case); 81 __ bind(&number_case);
80 } 82 }
81 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); 83 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET);
84 __ bind(&next);
82 } 85 }
83 } 86 }
84 DCHECK(number_of_handled_maps != 0); 87 DCHECK(number_of_handled_maps != 0);
85 88
86 __ bind(&miss); 89 __ bind(&miss);
87 TailCallBuiltin(masm(), MissBuiltin(kind())); 90 TailCallBuiltin(masm(), MissBuiltin(kind()));
88 91
89 // Return the generated code. 92 // Return the generated code.
90 InlineCacheState state = 93 InlineCacheState state =
91 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; 94 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Return the generated code. 126 // Return the generated code.
124 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 127 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
125 } 128 }
126 129
127 130
128 #undef __ 131 #undef __
129 } 132 }
130 } // namespace v8::internal 133 } // namespace v8::internal
131 134
132 #endif // V8_TARGET_ARCH_PPC 135 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ppc/assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698