OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 loaded.Bind(); | 550 loaded.Bind(); |
551 } | 551 } |
552 ASSERT(has_valid_frame()); | 552 ASSERT(has_valid_frame()); |
553 ASSERT(!has_cc()); | 553 ASSERT(!has_cc()); |
554 ASSERT_EQ(original_height + 1, frame_->height()); | 554 ASSERT_EQ(original_height + 1, frame_->height()); |
555 } | 555 } |
556 | 556 |
557 | 557 |
558 void CodeGenerator::LoadGlobal() { | 558 void CodeGenerator::LoadGlobal() { |
559 Register reg = frame_->GetTOSRegister(); | 559 Register reg = frame_->GetTOSRegister(); |
560 __ ldr(reg, GlobalObject()); | 560 __ ldr(reg, GlobalObjectOperand()); |
561 frame_->EmitPush(reg); | 561 frame_->EmitPush(reg); |
562 } | 562 } |
563 | 563 |
564 | 564 |
565 void CodeGenerator::LoadGlobalReceiver(Register scratch) { | 565 void CodeGenerator::LoadGlobalReceiver(Register scratch) { |
566 Register reg = frame_->GetTOSRegister(); | 566 Register reg = frame_->GetTOSRegister(); |
567 __ ldr(reg, ContextOperand(cp, Context::GLOBAL_INDEX)); | 567 __ ldr(reg, ContextOperand(cp, Context::GLOBAL_INDEX)); |
568 __ ldr(reg, | 568 __ ldr(reg, |
569 FieldMemOperand(reg, GlobalObject::kGlobalReceiverOffset)); | 569 FieldMemOperand(reg, GlobalObject::kGlobalReceiverOffset)); |
570 frame_->EmitPush(reg); | 570 frame_->EmitPush(reg); |
(...skipping 4557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5128 // Reload map as register map_result_ was used as temporary above. | 5128 // Reload map as register map_result_ was used as temporary above. |
5129 __ ldr(map_result_, FieldMemOperand(object_, HeapObject::kMapOffset)); | 5129 __ ldr(map_result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
5130 | 5130 |
5131 // If a valueOf property is not found on the object check that it's | 5131 // If a valueOf property is not found on the object check that it's |
5132 // prototype is the un-modified String prototype. If not result is false. | 5132 // prototype is the un-modified String prototype. If not result is false. |
5133 __ ldr(scratch1_, FieldMemOperand(map_result_, Map::kPrototypeOffset)); | 5133 __ ldr(scratch1_, FieldMemOperand(map_result_, Map::kPrototypeOffset)); |
5134 __ tst(scratch1_, Operand(kSmiTagMask)); | 5134 __ tst(scratch1_, Operand(kSmiTagMask)); |
5135 __ b(eq, &false_result); | 5135 __ b(eq, &false_result); |
5136 __ ldr(scratch1_, FieldMemOperand(scratch1_, HeapObject::kMapOffset)); | 5136 __ ldr(scratch1_, FieldMemOperand(scratch1_, HeapObject::kMapOffset)); |
5137 __ ldr(scratch2_, | 5137 __ ldr(scratch2_, |
5138 CodeGenerator::ContextOperand(cp, Context::GLOBAL_INDEX)); | 5138 ContextOperand(cp, Context::GLOBAL_INDEX)); |
5139 __ ldr(scratch2_, | 5139 __ ldr(scratch2_, |
5140 FieldMemOperand(scratch2_, GlobalObject::kGlobalContextOffset)); | 5140 FieldMemOperand(scratch2_, GlobalObject::kGlobalContextOffset)); |
5141 __ ldr(scratch2_, | 5141 __ ldr(scratch2_, |
5142 CodeGenerator::ContextOperand( | 5142 ContextOperand( |
5143 scratch2_, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); | 5143 scratch2_, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); |
5144 __ cmp(scratch1_, scratch2_); | 5144 __ cmp(scratch1_, scratch2_); |
5145 __ b(ne, &false_result); | 5145 __ b(ne, &false_result); |
5146 | 5146 |
5147 // Set the bit in the map to indicate that it has been checked safe for | 5147 // Set the bit in the map to indicate that it has been checked safe for |
5148 // default valueOf and set true result. | 5148 // default valueOf and set true result. |
5149 __ ldr(scratch1_, FieldMemOperand(map_result_, Map::kBitField2Offset)); | 5149 __ ldr(scratch1_, FieldMemOperand(map_result_, Map::kBitField2Offset)); |
5150 __ orr(scratch1_, | 5150 __ orr(scratch1_, |
5151 scratch1_, | 5151 scratch1_, |
5152 Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); | 5152 Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5818 } | 5818 } |
5819 | 5819 |
5820 ZoneList<Expression*>* args = node->arguments(); | 5820 ZoneList<Expression*>* args = node->arguments(); |
5821 Comment cmnt(masm_, "[ CallRuntime"); | 5821 Comment cmnt(masm_, "[ CallRuntime"); |
5822 Runtime::Function* function = node->function(); | 5822 Runtime::Function* function = node->function(); |
5823 | 5823 |
5824 if (function == NULL) { | 5824 if (function == NULL) { |
5825 // Prepare stack for calling JS runtime function. | 5825 // Prepare stack for calling JS runtime function. |
5826 // Push the builtins object found in the current global object. | 5826 // Push the builtins object found in the current global object. |
5827 Register scratch = VirtualFrame::scratch0(); | 5827 Register scratch = VirtualFrame::scratch0(); |
5828 __ ldr(scratch, GlobalObject()); | 5828 __ ldr(scratch, GlobalObjectOperand()); |
5829 Register builtins = frame_->GetTOSRegister(); | 5829 Register builtins = frame_->GetTOSRegister(); |
5830 __ ldr(builtins, FieldMemOperand(scratch, GlobalObject::kBuiltinsOffset)); | 5830 __ ldr(builtins, FieldMemOperand(scratch, GlobalObject::kBuiltinsOffset)); |
5831 frame_->EmitPush(builtins); | 5831 frame_->EmitPush(builtins); |
5832 } | 5832 } |
5833 | 5833 |
5834 // Push the arguments ("left-to-right"). | 5834 // Push the arguments ("left-to-right"). |
5835 int arg_count = args->length(); | 5835 int arg_count = args->length(); |
5836 for (int i = 0; i < arg_count; i++) { | 5836 for (int i = 0; i < arg_count; i++) { |
5837 Load(args->at(i)); | 5837 Load(args->at(i)); |
5838 } | 5838 } |
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7256 BinaryOpIC::GetName(runtime_operands_type_)); | 7256 BinaryOpIC::GetName(runtime_operands_type_)); |
7257 return name_; | 7257 return name_; |
7258 } | 7258 } |
7259 | 7259 |
7260 | 7260 |
7261 #undef __ | 7261 #undef __ |
7262 | 7262 |
7263 } } // namespace v8::internal | 7263 } } // namespace v8::internal |
7264 | 7264 |
7265 #endif // V8_TARGET_ARCH_ARM | 7265 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |