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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 61893009: Add initial hydrogenized NewStringAddStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case for --new-string-add. Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/new-string-add.js » ('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 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 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 LOperand* value = UseFixed(instr->value(), rax); 2332 LOperand* value = UseFixed(instr->value(), rax);
2333 2333
2334 LStoreNamedGeneric* result = 2334 LStoreNamedGeneric* result =
2335 new(zone()) LStoreNamedGeneric(context, object, value); 2335 new(zone()) LStoreNamedGeneric(context, object, value);
2336 return MarkAsCall(result, instr); 2336 return MarkAsCall(result, instr);
2337 } 2337 }
2338 2338
2339 2339
2340 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2340 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2341 LOperand* context = UseFixed(instr->context(), rsi); 2341 LOperand* context = UseFixed(instr->context(), rsi);
2342 LOperand* left = UseOrConstantAtStart(instr->left()); 2342 LOperand* left = FLAG_new_string_add
2343 LOperand* right = UseOrConstantAtStart(instr->right()); 2343 ? UseFixed(instr->left(), rdx)
2344 : UseOrConstantAtStart(instr->left());
2345 LOperand* right = FLAG_new_string_add
2346 ? UseFixed(instr->right(), rax)
2347 : UseOrConstantAtStart(instr->right());
2344 return MarkAsCall( 2348 return MarkAsCall(
2345 DefineFixed(new(zone()) LStringAdd(context, left, right), rax), instr); 2349 DefineFixed(new(zone()) LStringAdd(context, left, right), rax), instr);
2346 } 2350 }
2347 2351
2348 2352
2349 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { 2353 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
2350 LOperand* string = UseTempRegister(instr->string()); 2354 LOperand* string = UseTempRegister(instr->string());
2351 LOperand* index = UseTempRegister(instr->index()); 2355 LOperand* index = UseTempRegister(instr->index());
2352 LOperand* context = UseAny(instr->context()); 2356 LOperand* context = UseAny(instr->context());
2353 LStringCharCodeAt* result = 2357 LStringCharCodeAt* result =
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2602 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2599 LOperand* object = UseRegister(instr->object()); 2603 LOperand* object = UseRegister(instr->object());
2600 LOperand* index = UseTempRegister(instr->index()); 2604 LOperand* index = UseTempRegister(instr->index());
2601 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2605 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2602 } 2606 }
2603 2607
2604 2608
2605 } } // namespace v8::internal 2609 } } // namespace v8::internal
2606 2610
2607 #endif // V8_TARGET_ARCH_X64 2611 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/new-string-add.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698