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

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

Issue 1228113008: Crankshaft part of the 'loads and stores to global vars through property cell shortcuts' feature. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + regression test Created 5 years, 5 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/arm/lithium-codegen-arm.h" 9 #include "src/arm/lithium-codegen-arm.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { 324 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
325 arguments()->PrintTo(stream); 325 arguments()->PrintTo(stream);
326 stream->Add(" length "); 326 stream->Add(" length ");
327 length()->PrintTo(stream); 327 length()->PrintTo(stream);
328 stream->Add(" index "); 328 stream->Add(" index ");
329 index()->PrintTo(stream); 329 index()->PrintTo(stream);
330 } 330 }
331 331
332 332
333 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) {
334 stream->Add(String::cast(*name())->ToCString().get());
335 stream->Add(" depth:%d slot:%d", depth(), slot_index());
336 }
337
338
333 void LStoreNamedField::PrintDataTo(StringStream* stream) { 339 void LStoreNamedField::PrintDataTo(StringStream* stream) {
334 object()->PrintTo(stream); 340 object()->PrintTo(stream);
335 std::ostringstream os; 341 std::ostringstream os;
336 os << hydrogen()->access() << " <- "; 342 os << hydrogen()->access() << " <- ";
337 stream->Add(os.str().c_str()); 343 stream->Add(os.str().c_str());
338 value()->PrintTo(stream); 344 value()->PrintTo(stream);
339 } 345 }
340 346
341 347
342 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { 348 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
343 object()->PrintTo(stream); 349 object()->PrintTo(stream);
344 stream->Add("."); 350 stream->Add(".");
345 stream->Add(String::cast(*name())->ToCString().get()); 351 stream->Add(String::cast(*name())->ToCString().get());
346 stream->Add(" <- "); 352 stream->Add(" <- ");
347 value()->PrintTo(stream); 353 value()->PrintTo(stream);
348 } 354 }
349 355
350 356
357 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) {
358 stream->Add(String::cast(*name())->ToCString().get());
359 stream->Add(" <- ");
360 value()->PrintTo(stream);
361 stream->Add(" depth:%d slot:%d", depth(), slot_index());
362 }
363
364
351 void LLoadKeyed::PrintDataTo(StringStream* stream) { 365 void LLoadKeyed::PrintDataTo(StringStream* stream) {
352 elements()->PrintTo(stream); 366 elements()->PrintTo(stream);
353 stream->Add("["); 367 stream->Add("[");
354 key()->PrintTo(stream); 368 key()->PrintTo(stream);
355 if (hydrogen()->IsDehoisted()) { 369 if (hydrogen()->IsDehoisted()) {
356 stream->Add(" + %d]", base_offset()); 370 stream->Add(" + %d]", base_offset());
357 } else { 371 } else {
358 stream->Add("]"); 372 stream->Add("]");
359 } 373 }
360 } 374 }
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 LOperand* vector = NULL; 2157 LOperand* vector = NULL;
2144 if (instr->HasVectorAndSlot()) { 2158 if (instr->HasVectorAndSlot()) {
2145 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); 2159 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2146 } 2160 }
2147 LLoadGlobalGeneric* result = 2161 LLoadGlobalGeneric* result =
2148 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2162 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2149 return MarkAsCall(DefineFixed(result, r0), instr); 2163 return MarkAsCall(DefineFixed(result, r0), instr);
2150 } 2164 }
2151 2165
2152 2166
2167 LInstruction* LChunkBuilder::DoLoadGlobalViaContext(
2168 HLoadGlobalViaContext* instr) {
2169 LOperand* context = UseFixed(instr->context(), cp);
2170 DCHECK(instr->slot_index() > 0);
2171 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context);
2172 return MarkAsCall(DefineFixed(result, r0), instr);
2173 }
2174
2175
2153 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 2176 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
2154 LOperand* context = UseRegisterAtStart(instr->value()); 2177 LOperand* context = UseRegisterAtStart(instr->value());
2155 LInstruction* result = 2178 LInstruction* result =
2156 DefineAsRegister(new(zone()) LLoadContextSlot(context)); 2179 DefineAsRegister(new(zone()) LLoadContextSlot(context));
2157 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { 2180 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) {
2158 result = AssignEnvironment(result); 2181 result = AssignEnvironment(result);
2159 } 2182 }
2160 return result; 2183 return result;
2161 } 2184 }
2162 2185
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); 2453 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2431 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); 2454 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2432 } 2455 }
2433 2456
2434 LStoreNamedGeneric* result = 2457 LStoreNamedGeneric* result =
2435 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); 2458 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector);
2436 return MarkAsCall(result, instr); 2459 return MarkAsCall(result, instr);
2437 } 2460 }
2438 2461
2439 2462
2463 LInstruction* LChunkBuilder::DoStoreGlobalViaContext(
2464 HStoreGlobalViaContext* instr) {
2465 LOperand* context = UseFixed(instr->context(), cp);
2466 LOperand* value = UseFixed(instr->value(),
2467 StoreGlobalViaContextDescriptor::ValueRegister());
2468 DCHECK(instr->slot_index() > 0);
2469
2470 LStoreGlobalViaContext* result =
2471 new (zone()) LStoreGlobalViaContext(context, value);
2472 return MarkAsCall(result, instr);
2473 }
2474
2475
2440 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2476 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2441 LOperand* context = UseFixed(instr->context(), cp); 2477 LOperand* context = UseFixed(instr->context(), cp);
2442 LOperand* left = UseFixed(instr->left(), r1); 2478 LOperand* left = UseFixed(instr->left(), r1);
2443 LOperand* right = UseFixed(instr->right(), r0); 2479 LOperand* right = UseFixed(instr->right(), r0);
2444 return MarkAsCall( 2480 return MarkAsCall(
2445 DefineFixed(new(zone()) LStringAdd(context, left, right), r0), 2481 DefineFixed(new(zone()) LStringAdd(context, left, right), r0),
2446 instr); 2482 instr);
2447 } 2483 }
2448 2484
2449 2485
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 HAllocateBlockContext* instr) { 2726 HAllocateBlockContext* instr) {
2691 LOperand* context = UseFixed(instr->context(), cp); 2727 LOperand* context = UseFixed(instr->context(), cp);
2692 LOperand* function = UseRegisterAtStart(instr->function()); 2728 LOperand* function = UseRegisterAtStart(instr->function());
2693 LAllocateBlockContext* result = 2729 LAllocateBlockContext* result =
2694 new(zone()) LAllocateBlockContext(context, function); 2730 new(zone()) LAllocateBlockContext(context, function);
2695 return MarkAsCall(DefineFixed(result, cp), instr); 2731 return MarkAsCall(DefineFixed(result, cp), instr);
2696 } 2732 }
2697 2733
2698 } // namespace internal 2734 } // namespace internal
2699 } // namespace v8 2735 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698