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

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

Issue 16690008: MIPS: Use compare nil ic only for non-strict equality. (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 | « no previous file | no next file » | 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 4787 matching lines...) Expand 10 before | Expand all | Expand 10 after
4798 NilValue nil) { 4798 NilValue nil) {
4799 Label materialize_true, materialize_false; 4799 Label materialize_true, materialize_false;
4800 Label* if_true = NULL; 4800 Label* if_true = NULL;
4801 Label* if_false = NULL; 4801 Label* if_false = NULL;
4802 Label* fall_through = NULL; 4802 Label* fall_through = NULL;
4803 context()->PrepareTest(&materialize_true, &materialize_false, 4803 context()->PrepareTest(&materialize_true, &materialize_false,
4804 &if_true, &if_false, &fall_through); 4804 &if_true, &if_false, &fall_through);
4805 4805
4806 VisitForAccumulatorValue(sub_expr); 4806 VisitForAccumulatorValue(sub_expr);
4807 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 4807 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
4808 EqualityKind kind = expr->op() == Token::EQ_STRICT
4809 ? kStrictEquality : kNonStrictEquality;
4810 __ mov(a0, result_register()); 4808 __ mov(a0, result_register());
4811 if (kind == kStrictEquality) { 4809 if (expr->op() == Token::EQ_STRICT) {
4812 Heap::RootListIndex nil_value = nil == kNullValue ? 4810 Heap::RootListIndex nil_value = nil == kNullValue ?
4813 Heap::kNullValueRootIndex : 4811 Heap::kNullValueRootIndex :
4814 Heap::kUndefinedValueRootIndex; 4812 Heap::kUndefinedValueRootIndex;
4815 __ LoadRoot(a1, nil_value); 4813 __ LoadRoot(a1, nil_value);
4816 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); 4814 Split(eq, a0, Operand(a1), if_true, if_false, fall_through);
4817 } else { 4815 } else {
4818 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), 4816 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4819 kNonStrictEquality,
4820 nil);
4821 CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId()); 4817 CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId());
4822 Split(ne, v0, Operand(zero_reg), if_true, if_false, fall_through); 4818 Split(ne, v0, Operand(zero_reg), if_true, if_false, fall_through);
4823 } 4819 }
4824 context()->Plug(if_true, if_false); 4820 context()->Plug(if_true, if_false);
4825 } 4821 }
4826 4822
4827 4823
4828 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4824 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4829 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4825 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4830 context()->Plug(v0); 4826 context()->Plug(v0);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
4972 *context_length = 0; 4968 *context_length = 0;
4973 return previous_; 4969 return previous_;
4974 } 4970 }
4975 4971
4976 4972
4977 #undef __ 4973 #undef __
4978 4974
4979 } } // namespace v8::internal 4975 } } // namespace v8::internal
4980 4976
4981 #endif // V8_TARGET_ARCH_MIPS 4977 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698