| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 __ mov(result_register(), Operand(lit)); | 530 __ mov(result_register(), Operand(lit)); |
| 531 __ push(result_register()); | 531 __ push(result_register()); |
| 532 } | 532 } |
| 533 | 533 |
| 534 | 534 |
| 535 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 535 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
| 536 codegen()->PrepareForBailoutBeforeSplit(condition(), | 536 codegen()->PrepareForBailoutBeforeSplit(condition(), |
| 537 true, | 537 true, |
| 538 true_label_, | 538 true_label_, |
| 539 false_label_); | 539 false_label_); |
| 540 DCHECK(!lit->IsUndetectableObject()); // There are no undetectable literals. | 540 DCHECK(lit->IsNull() || lit->IsUndefined() || !lit->IsUndetectableObject()); |
| 541 if (lit->IsUndefined() || lit->IsNull() || lit->IsFalse()) { | 541 if (lit->IsUndefined() || lit->IsNull() || lit->IsFalse()) { |
| 542 if (false_label_ != fall_through_) __ b(false_label_); | 542 if (false_label_ != fall_through_) __ b(false_label_); |
| 543 } else if (lit->IsTrue() || lit->IsJSObject()) { | 543 } else if (lit->IsTrue() || lit->IsJSObject()) { |
| 544 if (true_label_ != fall_through_) __ b(true_label_); | 544 if (true_label_ != fall_through_) __ b(true_label_); |
| 545 } else if (lit->IsString()) { | 545 } else if (lit->IsString()) { |
| 546 if (String::cast(*lit)->length() == 0) { | 546 if (String::cast(*lit)->length() == 0) { |
| 547 if (false_label_ != fall_through_) __ b(false_label_); | 547 if (false_label_ != fall_through_) __ b(false_label_); |
| 548 } else { | 548 } else { |
| 549 if (true_label_ != fall_through_) __ b(true_label_); | 549 if (true_label_ != fall_through_) __ b(true_label_); |
| 550 } | 550 } |
| (...skipping 3741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4292 } else if (String::Equals(check, factory->symbol_string())) { | 4292 } else if (String::Equals(check, factory->symbol_string())) { |
| 4293 __ JumpIfSmi(r0, if_false); | 4293 __ JumpIfSmi(r0, if_false); |
| 4294 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); | 4294 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); |
| 4295 Split(eq, if_true, if_false, fall_through); | 4295 Split(eq, if_true, if_false, fall_through); |
| 4296 } else if (String::Equals(check, factory->boolean_string())) { | 4296 } else if (String::Equals(check, factory->boolean_string())) { |
| 4297 __ CompareRoot(r0, Heap::kTrueValueRootIndex); | 4297 __ CompareRoot(r0, Heap::kTrueValueRootIndex); |
| 4298 __ b(eq, if_true); | 4298 __ b(eq, if_true); |
| 4299 __ CompareRoot(r0, Heap::kFalseValueRootIndex); | 4299 __ CompareRoot(r0, Heap::kFalseValueRootIndex); |
| 4300 Split(eq, if_true, if_false, fall_through); | 4300 Split(eq, if_true, if_false, fall_through); |
| 4301 } else if (String::Equals(check, factory->undefined_string())) { | 4301 } else if (String::Equals(check, factory->undefined_string())) { |
| 4302 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); | 4302 __ CompareRoot(r0, Heap::kNullValueRootIndex); |
| 4303 __ b(eq, if_true); | 4303 __ b(eq, if_false); |
| 4304 __ JumpIfSmi(r0, if_false); | 4304 __ JumpIfSmi(r0, if_false); |
| 4305 // Check for undetectable objects => true. | 4305 // Check for undetectable objects => true. |
| 4306 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 4306 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 4307 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4307 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
| 4308 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4308 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
| 4309 Split(ne, if_true, if_false, fall_through); | 4309 Split(ne, if_true, if_false, fall_through); |
| 4310 | 4310 |
| 4311 } else if (String::Equals(check, factory->function_string())) { | 4311 } else if (String::Equals(check, factory->function_string())) { |
| 4312 __ JumpIfSmi(r0, if_false); | 4312 __ JumpIfSmi(r0, if_false); |
| 4313 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 4313 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4702 DCHECK(interrupt_address == | 4702 DCHECK(interrupt_address == |
| 4703 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4703 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4704 return OSR_AFTER_STACK_CHECK; | 4704 return OSR_AFTER_STACK_CHECK; |
| 4705 } | 4705 } |
| 4706 | 4706 |
| 4707 | 4707 |
| 4708 } // namespace internal | 4708 } // namespace internal |
| 4709 } // namespace v8 | 4709 } // namespace v8 |
| 4710 | 4710 |
| 4711 #endif // V8_TARGET_ARCH_ARM | 4711 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |