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

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

Issue 16732002: remove equality kind from compare nil ic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/hydrogen.cc ('k') | src/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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4750 matching lines...) Expand 10 before | Expand all | Expand 10 after
4761 Label materialize_true, materialize_false; 4761 Label materialize_true, materialize_false;
4762 Label* if_true = NULL; 4762 Label* if_true = NULL;
4763 Label* if_false = NULL; 4763 Label* if_false = NULL;
4764 Label* fall_through = NULL; 4764 Label* fall_through = NULL;
4765 context()->PrepareTest(&materialize_true, &materialize_false, 4765 context()->PrepareTest(&materialize_true, &materialize_false,
4766 &if_true, &if_false, &fall_through); 4766 &if_true, &if_false, &fall_through);
4767 4767
4768 VisitForAccumulatorValue(sub_expr); 4768 VisitForAccumulatorValue(sub_expr);
4769 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4769 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
4770 4770
4771 EqualityKind kind = expr->op() == Token::EQ_STRICT
4772 ? kStrictEquality : kNonStrictEquality;
4773 Handle<Object> nil_value = nil == kNullValue 4771 Handle<Object> nil_value = nil == kNullValue
4774 ? isolate()->factory()->null_value() 4772 ? isolate()->factory()->null_value()
4775 : isolate()->factory()->undefined_value(); 4773 : isolate()->factory()->undefined_value();
4776 if (kind == kStrictEquality) { 4774 if (expr->op() == Token::EQ_STRICT) {
4777 __ cmp(eax, nil_value); 4775 __ cmp(eax, nil_value);
4778 Split(equal, if_true, if_false, fall_through); 4776 Split(equal, if_true, if_false, fall_through);
4779 } else { 4777 } else {
4780 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), 4778 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4781 kNonStrictEquality,
4782 nil);
4783 CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId()); 4779 CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId());
4784 __ test(eax, eax); 4780 __ test(eax, eax);
4785 Split(not_zero, if_true, if_false, fall_through); 4781 Split(not_zero, if_true, if_false, fall_through);
4786 } 4782 }
4787 context()->Plug(if_true, if_false); 4783 context()->Plug(if_true, if_false);
4788 } 4784 }
4789 4785
4790 4786
4791 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4787 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4792 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 4788 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
4926 *stack_depth = 0; 4922 *stack_depth = 0;
4927 *context_length = 0; 4923 *context_length = 0;
4928 return previous_; 4924 return previous_;
4929 } 4925 }
4930 4926
4931 #undef __ 4927 #undef __
4932 4928
4933 } } // namespace v8::internal 4929 } } // namespace v8::internal
4934 4930
4935 #endif // V8_TARGET_ARCH_IA32 4931 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698