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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/debug/debug.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 __ mov(result_register(), Operand(lit)); 522 __ mov(result_register(), Operand(lit));
523 codegen()->PushOperand(result_register()); 523 codegen()->PushOperand(result_register());
524 } 524 }
525 525
526 526
527 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { 527 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
528 codegen()->PrepareForBailoutBeforeSplit(condition(), 528 codegen()->PrepareForBailoutBeforeSplit(condition(),
529 true, 529 true,
530 true_label_, 530 true_label_,
531 false_label_); 531 false_label_);
532 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || 532 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable());
533 !lit->IsUndetectable()); 533 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) {
534 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) ||
535 lit->IsFalse(isolate())) {
536 if (false_label_ != fall_through_) __ b(false_label_); 534 if (false_label_ != fall_through_) __ b(false_label_);
537 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { 535 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) {
538 if (true_label_ != fall_through_) __ b(true_label_); 536 if (true_label_ != fall_through_) __ b(true_label_);
539 } else if (lit->IsString()) { 537 } else if (lit->IsString()) {
540 if (String::cast(*lit)->length() == 0) { 538 if (String::cast(*lit)->length() == 0) {
541 if (false_label_ != fall_through_) __ b(false_label_); 539 if (false_label_ != fall_through_) __ b(false_label_);
542 } else { 540 } else {
543 if (true_label_ != fall_through_) __ b(true_label_); 541 if (true_label_ != fall_through_) __ b(true_label_);
544 } 542 }
545 } else if (lit->IsSmi()) { 543 } else if (lit->IsSmi()) {
(...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 DCHECK(interrupt_address == 2831 DCHECK(interrupt_address ==
2834 isolate->builtins()->OnStackReplacement()->entry()); 2832 isolate->builtins()->OnStackReplacement()->entry());
2835 return ON_STACK_REPLACEMENT; 2833 return ON_STACK_REPLACEMENT;
2836 } 2834 }
2837 2835
2838 2836
2839 } // namespace internal 2837 } // namespace internal
2840 } // namespace v8 2838 } // namespace v8
2841 2839
2842 #endif // V8_TARGET_ARCH_ARM 2840 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698