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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-codegen-ia32.cc ('k') | src/isolate.cc » ('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 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 LOperand* value = UseFixed(instr->value(), eax); 2478 LOperand* value = UseFixed(instr->value(), eax);
2479 2479
2480 LStoreNamedGeneric* result = 2480 LStoreNamedGeneric* result =
2481 new(zone()) LStoreNamedGeneric(context, object, value); 2481 new(zone()) LStoreNamedGeneric(context, object, value);
2482 return MarkAsCall(result, instr); 2482 return MarkAsCall(result, instr);
2483 } 2483 }
2484 2484
2485 2485
2486 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2486 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2487 LOperand* context = UseFixed(instr->context(), esi); 2487 LOperand* context = UseFixed(instr->context(), esi);
2488 LOperand* left = UseOrConstantAtStart(instr->left()); 2488 LOperand* left = FLAG_new_string_add
2489 LOperand* right = UseOrConstantAtStart(instr->right()); 2489 ? UseFixed(instr->left(), edx)
2490 : UseOrConstantAtStart(instr->left());
2491 LOperand* right = FLAG_new_string_add
2492 ? UseFixed(instr->right(), eax)
2493 : UseOrConstantAtStart(instr->right());
2490 LStringAdd* string_add = new(zone()) LStringAdd(context, left, right); 2494 LStringAdd* string_add = new(zone()) LStringAdd(context, left, right);
2491 return MarkAsCall(DefineFixed(string_add, eax), instr); 2495 return MarkAsCall(DefineFixed(string_add, eax), instr);
2492 } 2496 }
2493 2497
2494 2498
2495 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { 2499 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
2496 LOperand* string = UseTempRegister(instr->string()); 2500 LOperand* string = UseTempRegister(instr->string());
2497 LOperand* index = UseTempRegister(instr->index()); 2501 LOperand* index = UseTempRegister(instr->index());
2498 LOperand* context = UseAny(instr->context()); 2502 LOperand* context = UseAny(instr->context());
2499 LStringCharCodeAt* result = 2503 LStringCharCodeAt* result =
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2753 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2750 LOperand* object = UseRegister(instr->object()); 2754 LOperand* object = UseRegister(instr->object());
2751 LOperand* index = UseTempRegister(instr->index()); 2755 LOperand* index = UseTempRegister(instr->index());
2752 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2756 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2753 } 2757 }
2754 2758
2755 2759
2756 } } // namespace v8::internal 2760 } } // namespace v8::internal
2757 2761
2758 #endif // V8_TARGET_ARCH_IA32 2762 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698