OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3301 } | 3301 } |
3302 | 3302 |
3303 | 3303 |
3304 void LCodeGen::DoStringLength(LStringLength* instr) { | 3304 void LCodeGen::DoStringLength(LStringLength* instr) { |
3305 Register string = ToRegister(instr->string()); | 3305 Register string = ToRegister(instr->string()); |
3306 Register result = ToRegister(instr->result()); | 3306 Register result = ToRegister(instr->result()); |
3307 __ mov(result, FieldOperand(string, String::kLengthOffset)); | 3307 __ mov(result, FieldOperand(string, String::kLengthOffset)); |
3308 } | 3308 } |
3309 | 3309 |
3310 | 3310 |
| 3311 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
| 3312 if (instr->left()->IsConstantOperand()) { |
| 3313 __ push(ToImmediate(instr->left())); |
| 3314 } else { |
| 3315 __ push(ToOperand(instr->left())); |
| 3316 } |
| 3317 if (instr->right()->IsConstantOperand()) { |
| 3318 __ push(ToImmediate(instr->right())); |
| 3319 } else { |
| 3320 __ push(ToOperand(instr->right())); |
| 3321 } |
| 3322 StringAddStub stub(NO_STRING_CHECK_IN_STUB); |
| 3323 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr, RESTORE_CONTEXT); |
| 3324 } |
| 3325 |
| 3326 |
3311 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 3327 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
3312 LOperand* input = instr->InputAt(0); | 3328 LOperand* input = instr->InputAt(0); |
3313 ASSERT(input->IsRegister() || input->IsStackSlot()); | 3329 ASSERT(input->IsRegister() || input->IsStackSlot()); |
3314 LOperand* output = instr->result(); | 3330 LOperand* output = instr->result(); |
3315 ASSERT(output->IsDoubleRegister()); | 3331 ASSERT(output->IsDoubleRegister()); |
3316 __ cvtsi2sd(ToDoubleRegister(output), ToOperand(input)); | 3332 __ cvtsi2sd(ToDoubleRegister(output), ToOperand(input)); |
3317 } | 3333 } |
3318 | 3334 |
3319 | 3335 |
3320 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { | 3336 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4177 ASSERT(osr_pc_offset_ == -1); | 4193 ASSERT(osr_pc_offset_ == -1); |
4178 osr_pc_offset_ = masm()->pc_offset(); | 4194 osr_pc_offset_ = masm()->pc_offset(); |
4179 } | 4195 } |
4180 | 4196 |
4181 | 4197 |
4182 #undef __ | 4198 #undef __ |
4183 | 4199 |
4184 } } // namespace v8::internal | 4200 } } // namespace v8::internal |
4185 | 4201 |
4186 #endif // V8_TARGET_ARCH_IA32 | 4202 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |