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

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

Issue 592113002: Fix method dispatch in Keyed/StoreIC, and JumpIfNotUniqueName usage (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/ic.cc ('k') | src/ic/mips64/ic-compiler-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 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 #define __ ACCESS_MASM(masm()) 15 #define __ ACCESS_MASM(masm())
16 16
17 17
18 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, 18 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
19 CodeHandleList* handlers, 19 CodeHandleList* handlers,
20 Handle<Name> name, 20 Handle<Name> name,
21 Code::StubType type, 21 Code::StubType type,
22 IcCheckType check) { 22 IcCheckType check) {
23 Label miss; 23 Label miss;
24 24
25 if (check == PROPERTY && 25 if (check == PROPERTY &&
26 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { 26 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
27 // In case we are compiling an IC for dictionary loads and stores, just 27 // In case we are compiling an IC for dictionary loads and stores, just
28 // check whether the name is unique. 28 // check whether the name is unique.
29 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { 29 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) {
30 __ JumpIfNotUniqueName(this->name(), &miss); 30 Register tmp = scratch1();
31 __ JumpIfSmi(this->name(), &miss);
32 __ lw(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset));
33 __ lbu(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset));
34 __ JumpIfNotUniqueNameInstanceType(tmp, &miss);
31 } else { 35 } else {
32 __ Branch(&miss, ne, this->name(), Operand(name)); 36 __ Branch(&miss, ne, this->name(), Operand(name));
33 } 37 }
34 } 38 }
35 39
36 Label number_case; 40 Label number_case;
37 Register match = scratch2(); 41 Register match = scratch2();
38 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 42 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
39 __ JumpIfSmi(receiver(), smi_target, match); // Reg match is 0 if Smi. 43 __ JumpIfSmi(receiver(), smi_target, match); // Reg match is 0 if Smi.
40 44
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Do tail-call to runtime routine. 122 // Do tail-call to runtime routine.
119 __ TailCallRuntime(Runtime::kSetProperty, 4, 1); 123 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
120 } 124 }
121 125
122 126
123 #undef __ 127 #undef __
124 } 128 }
125 } // namespace v8::internal 129 } // namespace v8::internal
126 130
127 #endif // V8_TARGET_ARCH_MIPS 131 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/ic/mips64/ic-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698