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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | src/ic/handler-compiler.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_X87 5 #if V8_TARGET_ARCH_X87
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 __ push(Immediate(lit)); 470 __ push(Immediate(lit));
471 } 471 }
472 } 472 }
473 473
474 474
475 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { 475 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
476 codegen()->PrepareForBailoutBeforeSplit(condition(), 476 codegen()->PrepareForBailoutBeforeSplit(condition(),
477 true, 477 true,
478 true_label_, 478 true_label_,
479 false_label_); 479 false_label_);
480 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || 480 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable());
481 !lit->IsUndetectable()); 481 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) {
482 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) ||
483 lit->IsFalse(isolate())) {
484 if (false_label_ != fall_through_) __ jmp(false_label_); 482 if (false_label_ != fall_through_) __ jmp(false_label_);
485 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { 483 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) {
486 if (true_label_ != fall_through_) __ jmp(true_label_); 484 if (true_label_ != fall_through_) __ jmp(true_label_);
487 } else if (lit->IsString()) { 485 } else if (lit->IsString()) {
488 if (String::cast(*lit)->length() == 0) { 486 if (String::cast(*lit)->length() == 0) {
489 if (false_label_ != fall_through_) __ jmp(false_label_); 487 if (false_label_ != fall_through_) __ jmp(false_label_);
490 } else { 488 } else {
491 if (true_label_ != fall_through_) __ jmp(true_label_); 489 if (true_label_ != fall_through_) __ jmp(true_label_);
492 } 490 }
493 } else if (lit->IsSmi()) { 491 } else if (lit->IsSmi()) {
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2698 isolate->builtins()->OnStackReplacement()->entry(), 2696 isolate->builtins()->OnStackReplacement()->entry(),
2699 Assembler::target_address_at(call_target_address, unoptimized_code)); 2697 Assembler::target_address_at(call_target_address, unoptimized_code));
2700 return ON_STACK_REPLACEMENT; 2698 return ON_STACK_REPLACEMENT;
2701 } 2699 }
2702 2700
2703 2701
2704 } // namespace internal 2702 } // namespace internal
2705 } // namespace v8 2703 } // namespace v8
2706 2704
2707 #endif // V8_TARGET_ARCH_X87 2705 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698