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

Side by Side Diff: src/full-codegen/s390/full-codegen-s390.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/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_S390 5 #if V8_TARGET_ARCH_S390
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { 496 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const {
497 // Immediates cannot be pushed directly. 497 // Immediates cannot be pushed directly.
498 __ mov(result_register(), Operand(lit)); 498 __ mov(result_register(), Operand(lit));
499 codegen()->PushOperand(result_register()); 499 codegen()->PushOperand(result_register());
500 } 500 }
501 501
502 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { 502 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
503 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, 503 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_,
504 false_label_); 504 false_label_);
505 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || 505 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable());
506 !lit->IsUndetectable()); 506 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) {
507 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) ||
508 lit->IsFalse(isolate())) {
509 if (false_label_ != fall_through_) __ b(false_label_); 507 if (false_label_ != fall_through_) __ b(false_label_);
510 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { 508 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) {
511 if (true_label_ != fall_through_) __ b(true_label_); 509 if (true_label_ != fall_through_) __ b(true_label_);
512 } else if (lit->IsString()) { 510 } else if (lit->IsString()) {
513 if (String::cast(*lit)->length() == 0) { 511 if (String::cast(*lit)->length() == 0) {
514 if (false_label_ != fall_through_) __ b(false_label_); 512 if (false_label_ != fall_through_) __ b(false_label_);
515 } else { 513 } else {
516 if (true_label_ != fall_through_) __ b(true_label_); 514 if (true_label_ != fall_through_) __ b(true_label_);
517 } 515 }
518 } else if (lit->IsSmi()) { 516 } else if (lit->IsSmi()) {
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2705 2703
2706 // Expect BRC to be patched to NOP branch. 2704 // Expect BRC to be patched to NOP branch.
2707 // i.e. BRC 0x0, +XXXX (0xA704XXXX) 2705 // i.e. BRC 0x0, +XXXX (0xA704XXXX)
2708 USE(kOSRBranchInstruction); 2706 USE(kOSRBranchInstruction);
2709 DCHECK(kOSRBranchInstruction == br_instr); 2707 DCHECK(kOSRBranchInstruction == br_instr);
2710 2708
2711 DCHECK(interrupt_address == 2709 DCHECK(interrupt_address ==
2712 isolate->builtins()->OnStackReplacement()->entry()); 2710 isolate->builtins()->OnStackReplacement()->entry());
2713 return ON_STACK_REPLACEMENT; 2711 return ON_STACK_REPLACEMENT;
2714 } 2712 }
2715
2716 } // namespace internal 2713 } // namespace internal
2717 } // namespace v8 2714 } // namespace v8
2718 #endif // V8_TARGET_ARCH_S390 2715 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698