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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 2609153002: [ic] Use StrictEqual/Equal builtins for CompareIC slow path. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 1207
1208 __ bind(&return_equal); 1208 __ bind(&return_equal);
1209 __ Move(eax, Immediate(EQUAL)); 1209 __ Move(eax, Immediate(EQUAL));
1210 __ ret(0); // eax, edx were pushed 1210 __ ret(0); // eax, edx were pushed
1211 } 1211 }
1212 __ bind(&runtime_call); 1212 __ bind(&runtime_call);
1213 1213
1214 if (cc == equal) { 1214 if (cc == equal) {
1215 { 1215 {
1216 FrameScope scope(masm, StackFrame::INTERNAL); 1216 FrameScope scope(masm, StackFrame::INTERNAL);
1217 __ Push(edx); 1217 __ Push(esi);
1218 __ Push(eax); 1218 __ Call(strict() ? isolate()->builtins()->StrictEqual()
1219 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); 1219 : isolate()->builtins()->Equal(),
1220 RelocInfo::CODE_TARGET);
1221 __ Pop(esi);
1220 } 1222 }
1221 // Turn true into 0 and false into some non-zero value. 1223 // Turn true into 0 and false into some non-zero value.
1222 STATIC_ASSERT(EQUAL == 0); 1224 STATIC_ASSERT(EQUAL == 0);
1223 __ sub(eax, Immediate(isolate()->factory()->true_value())); 1225 __ sub(eax, Immediate(isolate()->factory()->true_value()));
1224 __ Ret(); 1226 __ Ret();
1225 } else { 1227 } else {
1226 // Push arguments below the return address. 1228 // Push arguments below the return address.
1227 __ pop(ecx); 1229 __ pop(ecx);
1228 __ push(edx); 1230 __ push(edx);
1229 __ push(eax); 1231 __ push(eax);
(...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after
4254 kStackUnwindSpace, nullptr, return_value_operand, 4256 kStackUnwindSpace, nullptr, return_value_operand,
4255 NULL); 4257 NULL);
4256 } 4258 }
4257 4259
4258 #undef __ 4260 #undef __
4259 4261
4260 } // namespace internal 4262 } // namespace internal
4261 } // namespace v8 4263 } // namespace v8
4262 4264
4263 #endif // V8_TARGET_ARCH_IA32 4265 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698