| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4544 write_register = ToRegister(instr->temp()); | 4544 write_register = ToRegister(instr->temp()); |
| 4545 __ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 4545 __ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
| 4546 } | 4546 } |
| 4547 | 4547 |
| 4548 MemOperand operand = FieldOperand(write_register, offset); | 4548 MemOperand operand = FieldOperand(write_register, offset); |
| 4549 if (instr->value()->IsConstantOperand()) { | 4549 if (instr->value()->IsConstantOperand()) { |
| 4550 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4550 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
| 4551 if (operand_value->IsRegister()) { | 4551 if (operand_value->IsRegister()) { |
| 4552 Register value = ToRegister(operand_value); | 4552 Register value = ToRegister(operand_value); |
| 4553 __ Store(value, operand, representation); | 4553 __ Store(value, operand, representation); |
| 4554 } else if (representation.IsInteger32()) { |
| 4555 Immediate immediate = ToImmediate(operand_value, representation); |
| 4556 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 4557 __ mov(operand, immediate); |
| 4554 } else { | 4558 } else { |
| 4555 Handle<Object> handle_value = ToHandle(operand_value); | 4559 Handle<Object> handle_value = ToHandle(operand_value); |
| 4556 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 4560 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 4557 __ mov(operand, handle_value); | 4561 __ mov(operand, handle_value); |
| 4558 } | 4562 } |
| 4559 } else { | 4563 } else { |
| 4560 Register value = ToRegister(instr->value()); | 4564 Register value = ToRegister(instr->value()); |
| 4561 __ Store(value, operand, representation); | 4565 __ Store(value, operand, representation); |
| 4562 } | 4566 } |
| 4563 | 4567 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4990 PushSafepointRegistersScope scope(this); | 4994 PushSafepointRegistersScope scope(this); |
| 4991 __ SmiTag(char_code); | 4995 __ SmiTag(char_code); |
| 4992 __ push(char_code); | 4996 __ push(char_code); |
| 4993 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 4997 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
| 4994 __ StoreToSafepointRegisterSlot(result, eax); | 4998 __ StoreToSafepointRegisterSlot(result, eax); |
| 4995 } | 4999 } |
| 4996 | 5000 |
| 4997 | 5001 |
| 4998 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 5002 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
| 4999 ASSERT(ToRegister(instr->context()).is(esi)); | 5003 ASSERT(ToRegister(instr->context()).is(esi)); |
| 5000 EmitPushTaggedOperand(instr->left()); | 5004 if (FLAG_new_string_add) { |
| 5001 EmitPushTaggedOperand(instr->right()); | 5005 ASSERT(ToRegister(instr->left()).is(edx)); |
| 5002 StringAddStub stub(instr->hydrogen()->flags()); | 5006 ASSERT(ToRegister(instr->right()).is(eax)); |
| 5003 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 5007 NewStringAddStub stub(instr->hydrogen()->flags(), |
| 5008 isolate()->heap()->GetPretenureMode()); |
| 5009 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 5010 } else { |
| 5011 EmitPushTaggedOperand(instr->left()); |
| 5012 EmitPushTaggedOperand(instr->right()); |
| 5013 StringAddStub stub(instr->hydrogen()->flags()); |
| 5014 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 5015 } |
| 5004 } | 5016 } |
| 5005 | 5017 |
| 5006 | 5018 |
| 5007 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 5019 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
| 5008 LOperand* input = instr->value(); | 5020 LOperand* input = instr->value(); |
| 5009 LOperand* output = instr->result(); | 5021 LOperand* output = instr->result(); |
| 5010 ASSERT(input->IsRegister() || input->IsStackSlot()); | 5022 ASSERT(input->IsRegister() || input->IsStackSlot()); |
| 5011 ASSERT(output->IsDoubleRegister()); | 5023 ASSERT(output->IsDoubleRegister()); |
| 5012 if (CpuFeatures::IsSupported(SSE2)) { | 5024 if (CpuFeatures::IsSupported(SSE2)) { |
| 5013 CpuFeatureScope scope(masm(), SSE2); | 5025 CpuFeatureScope scope(masm(), SSE2); |
| (...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6436 FixedArray::kHeaderSize - kPointerSize)); | 6448 FixedArray::kHeaderSize - kPointerSize)); |
| 6437 __ bind(&done); | 6449 __ bind(&done); |
| 6438 } | 6450 } |
| 6439 | 6451 |
| 6440 | 6452 |
| 6441 #undef __ | 6453 #undef __ |
| 6442 | 6454 |
| 6443 } } // namespace v8::internal | 6455 } } // namespace v8::internal |
| 6444 | 6456 |
| 6445 #endif // V8_TARGET_ARCH_IA32 | 6457 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |