Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 6852015: Support string add in crankshaft: (Closed)
Patch Set: Review fixes and ports Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698