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

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

Issue 2601503002: Add Object::IsNullOrUndefined(Isolate*) helper method (Closed)
Patch Set: fixing merge conflicts 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 __ li(result_register(), Operand(lit)); 515 __ li(result_register(), Operand(lit));
516 codegen()->PushOperand(result_register()); 516 codegen()->PushOperand(result_register());
517 } 517 }
518 518
519 519
520 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { 520 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
521 codegen()->PrepareForBailoutBeforeSplit(condition(), 521 codegen()->PrepareForBailoutBeforeSplit(condition(),
522 true, 522 true,
523 true_label_, 523 true_label_,
524 false_label_); 524 false_label_);
525 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || 525 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable());
526 !lit->IsUndetectable()); 526 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) {
527 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) ||
528 lit->IsFalse(isolate())) {
529 if (false_label_ != fall_through_) __ Branch(false_label_); 527 if (false_label_ != fall_through_) __ Branch(false_label_);
530 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { 528 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) {
531 if (true_label_ != fall_through_) __ Branch(true_label_); 529 if (true_label_ != fall_through_) __ Branch(true_label_);
532 } else if (lit->IsString()) { 530 } else if (lit->IsString()) {
533 if (String::cast(*lit)->length() == 0) { 531 if (String::cast(*lit)->length() == 0) {
534 if (false_label_ != fall_through_) __ Branch(false_label_); 532 if (false_label_ != fall_through_) __ Branch(false_label_);
535 } else { 533 } else {
536 if (true_label_ != fall_through_) __ Branch(true_label_); 534 if (true_label_ != fall_through_) __ Branch(true_label_);
537 } 535 }
538 } else if (lit->IsSmi()) { 536 } else if (lit->IsSmi()) {
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 reinterpret_cast<uint64_t>( 2799 reinterpret_cast<uint64_t>(
2802 isolate->builtins()->OnStackReplacement()->entry())); 2800 isolate->builtins()->OnStackReplacement()->entry()));
2803 return ON_STACK_REPLACEMENT; 2801 return ON_STACK_REPLACEMENT;
2804 } 2802 }
2805 2803
2806 2804
2807 } // namespace internal 2805 } // namespace internal
2808 } // namespace v8 2806 } // namespace v8
2809 2807
2810 #endif // V8_TARGET_ARCH_MIPS64 2808 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698