| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 4011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4022 if (!access.IsInobject()) { | 4022 if (!access.IsInobject()) { |
| 4023 write_register = ToRegister(instr->temp()); | 4023 write_register = ToRegister(instr->temp()); |
| 4024 __ movq(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 4024 __ movq(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
| 4025 } | 4025 } |
| 4026 | 4026 |
| 4027 if (instr->value()->IsConstantOperand()) { | 4027 if (instr->value()->IsConstantOperand()) { |
| 4028 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4028 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
| 4029 if (operand_value->IsRegister()) { | 4029 if (operand_value->IsRegister()) { |
| 4030 Register value = ToRegister(operand_value); | 4030 Register value = ToRegister(operand_value); |
| 4031 __ Store(FieldOperand(write_register, offset), value, representation); | 4031 __ Store(FieldOperand(write_register, offset), value, representation); |
| 4032 } else if (representation.IsInteger32()) { |
| 4033 int32_t value = ToInteger32(operand_value); |
| 4034 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 4035 __ movl(FieldOperand(write_register, offset), Immediate(value)); |
| 4032 } else { | 4036 } else { |
| 4033 Handle<Object> handle_value = ToHandle(operand_value); | 4037 Handle<Object> handle_value = ToHandle(operand_value); |
| 4034 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 4038 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 4035 __ Move(FieldOperand(write_register, offset), handle_value); | 4039 __ Move(FieldOperand(write_register, offset), handle_value); |
| 4036 } | 4040 } |
| 4037 } else { | 4041 } else { |
| 4038 Register value = ToRegister(instr->value()); | 4042 Register value = ToRegister(instr->value()); |
| 4039 __ Store(FieldOperand(write_register, offset), value, representation); | 4043 __ Store(FieldOperand(write_register, offset), value, representation); |
| 4040 } | 4044 } |
| 4041 | 4045 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4341 Register object = ToRegister(instr->object()); | 4345 Register object = ToRegister(instr->object()); |
| 4342 Register temp = ToRegister(instr->temp()); | 4346 Register temp = ToRegister(instr->temp()); |
| 4343 Label no_memento_found; | 4347 Label no_memento_found; |
| 4344 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); | 4348 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); |
| 4345 DeoptimizeIf(equal, instr->environment()); | 4349 DeoptimizeIf(equal, instr->environment()); |
| 4346 __ bind(&no_memento_found); | 4350 __ bind(&no_memento_found); |
| 4347 } | 4351 } |
| 4348 | 4352 |
| 4349 | 4353 |
| 4350 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 4354 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
| 4351 EmitPushTaggedOperand(instr->left()); | 4355 if (FLAG_new_string_add) { |
| 4352 EmitPushTaggedOperand(instr->right()); | 4356 ASSERT(ToRegister(instr->left()).is(rdx)); |
| 4353 StringAddStub stub(instr->hydrogen()->flags()); | 4357 ASSERT(ToRegister(instr->right()).is(rax)); |
| 4354 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4358 NewStringAddStub stub(instr->hydrogen()->flags(), |
| 4359 isolate()->heap()->GetPretenureMode()); |
| 4360 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4361 } else { |
| 4362 EmitPushTaggedOperand(instr->left()); |
| 4363 EmitPushTaggedOperand(instr->right()); |
| 4364 StringAddStub stub(instr->hydrogen()->flags()); |
| 4365 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4366 } |
| 4355 } | 4367 } |
| 4356 | 4368 |
| 4357 | 4369 |
| 4358 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 4370 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
| 4359 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { | 4371 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { |
| 4360 public: | 4372 public: |
| 4361 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 4373 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
| 4362 : LDeferredCode(codegen), instr_(instr) { } | 4374 : LDeferredCode(codegen), instr_(instr) { } |
| 4363 virtual void Generate() V8_OVERRIDE { | 4375 virtual void Generate() V8_OVERRIDE { |
| 4364 codegen()->DoDeferredStringCharCodeAt(instr_); | 4376 codegen()->DoDeferredStringCharCodeAt(instr_); |
| (...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5546 FixedArray::kHeaderSize - kPointerSize)); | 5558 FixedArray::kHeaderSize - kPointerSize)); |
| 5547 __ bind(&done); | 5559 __ bind(&done); |
| 5548 } | 5560 } |
| 5549 | 5561 |
| 5550 | 5562 |
| 5551 #undef __ | 5563 #undef __ |
| 5552 | 5564 |
| 5553 } } // namespace v8::internal | 5565 } } // namespace v8::internal |
| 5554 | 5566 |
| 5555 #endif // V8_TARGET_ARCH_X64 | 5567 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |