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

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

Issue 133193003: [a64] Implement LStringCompareAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.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 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { 291 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
292 object()->PrintTo(stream); 292 object()->PrintTo(stream);
293 stream->Add("."); 293 stream->Add(".");
294 stream->Add(*String::cast(*name())->ToCString()); 294 stream->Add(*String::cast(*name())->ToCString());
295 stream->Add(" <- "); 295 stream->Add(" <- ");
296 value()->PrintTo(stream); 296 value()->PrintTo(stream);
297 } 297 }
298 298
299 299
300 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) {
301 stream->Add("if string_compare(");
302 left()->PrintTo(stream);
303 right()->PrintTo(stream);
304 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
305 }
306
307
300 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { 308 void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
301 object()->PrintTo(stream); 309 object()->PrintTo(stream);
302 stream->Add("%p -> %p", *original_map(), *transitioned_map()); 310 stream->Add("%p -> %p", *original_map(), *transitioned_map());
303 } 311 }
304 312
305 313
306 template<int T> 314 template<int T>
307 void LUnaryMathOperation<T>::PrintDataTo(StringStream* stream) { 315 void LUnaryMathOperation<T>::PrintDataTo(StringStream* stream) {
308 value()->PrintTo(stream); 316 value()->PrintTo(stream);
309 } 317 }
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { 2113 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
2106 // TODO(all) use at start and remove assert in codegen 2114 // TODO(all) use at start and remove assert in codegen
2107 LOperand* char_code = UseRegister(instr->value()); 2115 LOperand* char_code = UseRegister(instr->value());
2108 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); 2116 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code);
2109 return AssignPointerMap(DefineAsRegister(result)); 2117 return AssignPointerMap(DefineAsRegister(result));
2110 } 2118 }
2111 2119
2112 2120
2113 LInstruction* LChunkBuilder::DoStringCompareAndBranch( 2121 LInstruction* LChunkBuilder::DoStringCompareAndBranch(
2114 HStringCompareAndBranch* instr) { 2122 HStringCompareAndBranch* instr) {
2115 UNIMPLEMENTED_INSTRUCTION(); 2123 ASSERT(instr->left()->representation().IsTagged());
2124 ASSERT(instr->right()->representation().IsTagged());
2125 LOperand* left = UseFixed(instr->left(), x1);
2126 LOperand* right = UseFixed(instr->right(), x0);
2127 LStringCompareAndBranch* result =
2128 new(zone()) LStringCompareAndBranch(left, right);
2129 return MarkAsCall(result, instr);
2116 } 2130 }
2117 2131
2118 2132
2119 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { 2133 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
2120 // TODO(all): This instruction doesn't exist anymore on bleeding_edge. 2134 // TODO(all): This instruction doesn't exist anymore on bleeding_edge.
2121 LOperand* string = UseRegisterAtStart(instr->value()); 2135 LOperand* string = UseRegisterAtStart(instr->value());
2122 return DefineAsRegister(new(zone()) LStringLength(string)); 2136 return DefineAsRegister(new(zone()) LStringLength(string));
2123 } 2137 }
2124 2138
2125 2139
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2401 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2388 LOperand* receiver = UseRegister(instr->receiver()); 2402 LOperand* receiver = UseRegister(instr->receiver());
2389 LOperand* function = UseRegisterAtStart(instr->function()); 2403 LOperand* function = UseRegisterAtStart(instr->function());
2390 LOperand* temp = TempRegister(); 2404 LOperand* temp = TempRegister();
2391 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); 2405 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
2392 return AssignEnvironment(DefineAsRegister(result)); 2406 return AssignEnvironment(DefineAsRegister(result));
2393 } 2407 }
2394 2408
2395 2409
2396 } } // namespace v8::internal 2410 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698