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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 1318663003: X87: Correctify instanceof and make it optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | src/x87/code-stubs-x87.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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 5005 matching lines...) Expand 10 before | Expand all | Expand 10 after
5016 switch (op) { 5016 switch (op) {
5017 case Token::IN: 5017 case Token::IN:
5018 VisitForStackValue(expr->right()); 5018 VisitForStackValue(expr->right());
5019 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); 5019 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION);
5020 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); 5020 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5021 __ cmp(eax, isolate()->factory()->true_value()); 5021 __ cmp(eax, isolate()->factory()->true_value());
5022 Split(equal, if_true, if_false, fall_through); 5022 Split(equal, if_true, if_false, fall_through);
5023 break; 5023 break;
5024 5024
5025 case Token::INSTANCEOF: { 5025 case Token::INSTANCEOF: {
5026 VisitForStackValue(expr->right()); 5026 VisitForAccumulatorValue(expr->right());
5027 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); 5027 __ Pop(edx);
5028 InstanceOfStub stub(isolate());
5028 __ CallStub(&stub); 5029 __ CallStub(&stub);
5029 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 5030 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
5030 __ test(eax, eax); 5031 __ cmp(eax, isolate()->factory()->true_value());
5031 // The stub returns 0 for true. 5032 Split(equal, if_true, if_false, fall_through);
5032 Split(zero, if_true, if_false, fall_through);
5033 break; 5033 break;
5034 } 5034 }
5035 5035
5036 default: { 5036 default: {
5037 VisitForAccumulatorValue(expr->right()); 5037 VisitForAccumulatorValue(expr->right());
5038 Condition cc = CompareIC::ComputeCondition(op); 5038 Condition cc = CompareIC::ComputeCondition(op);
5039 __ pop(edx); 5039 __ pop(edx);
5040 5040
5041 bool inline_smi_code = ShouldInlineSmiCase(op); 5041 bool inline_smi_code = ShouldInlineSmiCase(op);
5042 JumpPatchSite patch_site(masm_); 5042 JumpPatchSite patch_site(masm_);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
5282 Assembler::target_address_at(call_target_address, 5282 Assembler::target_address_at(call_target_address,
5283 unoptimized_code)); 5283 unoptimized_code));
5284 return OSR_AFTER_STACK_CHECK; 5284 return OSR_AFTER_STACK_CHECK;
5285 } 5285 }
5286 5286
5287 5287
5288 } // namespace internal 5288 } // namespace internal
5289 } // namespace v8 5289 } // namespace v8
5290 5290
5291 #endif // V8_TARGET_ARCH_X87 5291 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698