OLD | NEW |
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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 __ Push(lit); | 497 __ Push(lit); |
498 } | 498 } |
499 } | 499 } |
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(), | 503 codegen()->PrepareForBailoutBeforeSplit(condition(), |
504 true, | 504 true, |
505 true_label_, | 505 true_label_, |
506 false_label_); | 506 false_label_); |
507 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 507 DCHECK(lit->IsNull() || lit->IsUndefined(isolate()) || |
508 !lit->IsUndetectable()); | 508 !lit->IsUndetectable()); |
509 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | 509 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { |
510 lit->IsFalse(isolate())) { | |
511 if (false_label_ != fall_through_) __ jmp(false_label_); | 510 if (false_label_ != fall_through_) __ jmp(false_label_); |
512 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 511 } else if (lit->IsTrue() || lit->IsJSObject()) { |
513 if (true_label_ != fall_through_) __ jmp(true_label_); | 512 if (true_label_ != fall_through_) __ jmp(true_label_); |
514 } else if (lit->IsString()) { | 513 } else if (lit->IsString()) { |
515 if (String::cast(*lit)->length() == 0) { | 514 if (String::cast(*lit)->length() == 0) { |
516 if (false_label_ != fall_through_) __ jmp(false_label_); | 515 if (false_label_ != fall_through_) __ jmp(false_label_); |
517 } else { | 516 } else { |
518 if (true_label_ != fall_through_) __ jmp(true_label_); | 517 if (true_label_ != fall_through_) __ jmp(true_label_); |
519 } | 518 } |
520 } else if (lit->IsSmi()) { | 519 } else if (lit->IsSmi()) { |
521 if (Smi::cast(*lit)->value() == 0) { | 520 if (Smi::cast(*lit)->value() == 0) { |
522 if (false_label_ != fall_through_) __ jmp(false_label_); | 521 if (false_label_ != fall_through_) __ jmp(false_label_); |
(...skipping 3174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3697 DCHECK_EQ( | 3696 DCHECK_EQ( |
3698 isolate->builtins()->OnStackReplacement()->entry(), | 3697 isolate->builtins()->OnStackReplacement()->entry(), |
3699 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3698 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3700 return ON_STACK_REPLACEMENT; | 3699 return ON_STACK_REPLACEMENT; |
3701 } | 3700 } |
3702 | 3701 |
3703 } // namespace internal | 3702 } // namespace internal |
3704 } // namespace v8 | 3703 } // namespace v8 |
3705 | 3704 |
3706 #endif // V8_TARGET_ARCH_X64 | 3705 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |