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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { 504 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const {
505 // Immediates cannot be pushed directly. 505 // Immediates cannot be pushed directly.
506 __ mov(result_register(), Operand(lit)); 506 __ mov(result_register(), Operand(lit));
507 codegen()->PushOperand(result_register()); 507 codegen()->PushOperand(result_register());
508 } 508 }
509 509
510 510
511 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { 511 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
512 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, 512 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_,
513 false_label_); 513 false_label_);
514 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || 514 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable());
515 !lit->IsUndetectable()); 515 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) {
516 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) ||
517 lit->IsFalse(isolate())) {
518 if (false_label_ != fall_through_) __ b(false_label_); 516 if (false_label_ != fall_through_) __ b(false_label_);
519 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { 517 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) {
520 if (true_label_ != fall_through_) __ b(true_label_); 518 if (true_label_ != fall_through_) __ b(true_label_);
521 } else if (lit->IsString()) { 519 } else if (lit->IsString()) {
522 if (String::cast(*lit)->length() == 0) { 520 if (String::cast(*lit)->length() == 0) {
523 if (false_label_ != fall_through_) __ b(false_label_); 521 if (false_label_ != fall_through_) __ b(false_label_);
524 } else { 522 } else {
525 if (true_label_ != fall_through_) __ b(true_label_); 523 if (true_label_ != fall_through_) __ b(true_label_);
526 } 524 }
527 } else if (lit->IsSmi()) { 525 } else if (lit->IsSmi()) {
(...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 2770
2773 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 2771 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
2774 2772
2775 DCHECK(interrupt_address == 2773 DCHECK(interrupt_address ==
2776 isolate->builtins()->OnStackReplacement()->entry()); 2774 isolate->builtins()->OnStackReplacement()->entry());
2777 return ON_STACK_REPLACEMENT; 2775 return ON_STACK_REPLACEMENT;
2778 } 2776 }
2779 } // namespace internal 2777 } // namespace internal
2780 } // namespace v8 2778 } // namespace v8
2781 #endif // V8_TARGET_ARCH_PPC 2779 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698