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

Side by Side Diff: src/ic/ia32/ic-compiler-ia32.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/arm64/ic-compiler-arm64.cc ('k') | src/ic/ic.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 30 matching lines...) Expand all
41 Handle<Name> name, 41 Handle<Name> name,
42 Code::StubType type, 42 Code::StubType type,
43 IcCheckType check) { 43 IcCheckType check) {
44 Label miss; 44 Label miss;
45 45
46 if (check == PROPERTY && 46 if (check == PROPERTY &&
47 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { 47 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
48 // In case we are compiling an IC for dictionary loads and stores, just 48 // In case we are compiling an IC for dictionary loads and stores, just
49 // check whether the name is unique. 49 // check whether the name is unique.
50 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { 50 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) {
51 __ JumpIfNotUniqueName(this->name(), &miss); 51 Register tmp = scratch1();
52 __ JumpIfSmi(this->name(), &miss);
53 __ mov(tmp, FieldOperand(this->name(), HeapObject::kMapOffset));
54 __ movzx_b(tmp, FieldOperand(tmp, Map::kInstanceTypeOffset));
55 __ JumpIfNotUniqueNameInstanceType(tmp, &miss);
52 } else { 56 } else {
53 __ cmp(this->name(), Immediate(name)); 57 __ cmp(this->name(), Immediate(name));
54 __ j(not_equal, &miss); 58 __ j(not_equal, &miss);
55 } 59 }
56 } 60 }
57 61
58 Label number_case; 62 Label number_case;
59 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 63 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
60 __ JumpIfSmi(receiver(), smi_target); 64 __ JumpIfSmi(receiver(), smi_target);
61 65
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Return the generated code. 119 // Return the generated code.
116 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 120 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
117 } 121 }
118 122
119 123
120 #undef __ 124 #undef __
121 } 125 }
122 } // namespace v8::internal 126 } // namespace v8::internal
123 127
124 #endif // V8_TARGET_ARCH_IA32 128 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm64/ic-compiler-arm64.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698