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

Side by Side Diff: src/mips/lithium-mips.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/mips/lithium-mips.h ('k') | src/mips64/lithium-codegen-mips64.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 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { 331 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
332 arguments()->PrintTo(stream); 332 arguments()->PrintTo(stream);
333 stream->Add(" length "); 333 stream->Add(" length ");
334 length()->PrintTo(stream); 334 length()->PrintTo(stream);
335 stream->Add(" index "); 335 stream->Add(" index ");
336 index()->PrintTo(stream); 336 index()->PrintTo(stream);
337 } 337 }
338 338
339 339
340 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) {
341 stream->Add(String::cast(*name())->ToCString().get());
342 stream->Add(" depth:%d slot:%d", depth(), slot_index());
343 }
344
345
340 void LStoreNamedField::PrintDataTo(StringStream* stream) { 346 void LStoreNamedField::PrintDataTo(StringStream* stream) {
341 object()->PrintTo(stream); 347 object()->PrintTo(stream);
342 std::ostringstream os; 348 std::ostringstream os;
343 os << hydrogen()->access() << " <- "; 349 os << hydrogen()->access() << " <- ";
344 stream->Add(os.str().c_str()); 350 stream->Add(os.str().c_str());
345 value()->PrintTo(stream); 351 value()->PrintTo(stream);
346 } 352 }
347 353
348 354
349 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { 355 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
350 object()->PrintTo(stream); 356 object()->PrintTo(stream);
351 stream->Add("."); 357 stream->Add(".");
352 stream->Add(String::cast(*name())->ToCString().get()); 358 stream->Add(String::cast(*name())->ToCString().get());
353 stream->Add(" <- "); 359 stream->Add(" <- ");
354 value()->PrintTo(stream); 360 value()->PrintTo(stream);
355 } 361 }
356 362
357 363
364 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) {
365 stream->Add(String::cast(*name())->ToCString().get());
366 stream->Add(" <- ");
367 value()->PrintTo(stream);
368 stream->Add(" depth:%d slot:%d", depth(), slot_index());
369 }
370
371
358 void LLoadKeyed::PrintDataTo(StringStream* stream) { 372 void LLoadKeyed::PrintDataTo(StringStream* stream) {
359 elements()->PrintTo(stream); 373 elements()->PrintTo(stream);
360 stream->Add("["); 374 stream->Add("[");
361 key()->PrintTo(stream); 375 key()->PrintTo(stream);
362 if (hydrogen()->IsDehoisted()) { 376 if (hydrogen()->IsDehoisted()) {
363 stream->Add(" + %d]", base_offset()); 377 stream->Add(" + %d]", base_offset());
364 } else { 378 } else {
365 stream->Add("]"); 379 stream->Add("]");
366 } 380 }
367 } 381 }
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 LOperand* vector = NULL; 2104 LOperand* vector = NULL;
2091 if (instr->HasVectorAndSlot()) { 2105 if (instr->HasVectorAndSlot()) {
2092 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); 2106 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2093 } 2107 }
2094 LLoadGlobalGeneric* result = 2108 LLoadGlobalGeneric* result =
2095 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2109 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2096 return MarkAsCall(DefineFixed(result, v0), instr); 2110 return MarkAsCall(DefineFixed(result, v0), instr);
2097 } 2111 }
2098 2112
2099 2113
2114 LInstruction* LChunkBuilder::DoLoadGlobalViaContext(
2115 HLoadGlobalViaContext* instr) {
2116 LOperand* context = UseFixed(instr->context(), cp);
2117 DCHECK(instr->slot_index() > 0);
2118 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context);
2119 return MarkAsCall(DefineFixed(result, v0), instr);
2120 }
2121
2122
2100 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 2123 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
2101 LOperand* context = UseRegisterAtStart(instr->value()); 2124 LOperand* context = UseRegisterAtStart(instr->value());
2102 LInstruction* result = 2125 LInstruction* result =
2103 DefineAsRegister(new(zone()) LLoadContextSlot(context)); 2126 DefineAsRegister(new(zone()) LLoadContextSlot(context));
2104 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { 2127 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) {
2105 result = AssignEnvironment(result); 2128 result = AssignEnvironment(result);
2106 } 2129 }
2107 return result; 2130 return result;
2108 } 2131 }
2109 2132
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); 2400 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2378 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); 2401 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2379 } 2402 }
2380 2403
2381 LStoreNamedGeneric* result = 2404 LStoreNamedGeneric* result =
2382 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); 2405 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector);
2383 return MarkAsCall(result, instr); 2406 return MarkAsCall(result, instr);
2384 } 2407 }
2385 2408
2386 2409
2410 LInstruction* LChunkBuilder::DoStoreGlobalViaContext(
2411 HStoreGlobalViaContext* instr) {
2412 LOperand* context = UseFixed(instr->context(), cp);
2413 LOperand* value = UseFixed(instr->value(),
2414 StoreGlobalViaContextDescriptor::ValueRegister());
2415 DCHECK(instr->slot_index() > 0);
2416
2417 LStoreGlobalViaContext* result =
2418 new (zone()) LStoreGlobalViaContext(context, value);
2419 return MarkAsCall(result, instr);
2420 }
2421
2422
2387 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2423 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2388 LOperand* context = UseFixed(instr->context(), cp); 2424 LOperand* context = UseFixed(instr->context(), cp);
2389 LOperand* left = UseFixed(instr->left(), a1); 2425 LOperand* left = UseFixed(instr->left(), a1);
2390 LOperand* right = UseFixed(instr->right(), a0); 2426 LOperand* right = UseFixed(instr->right(), a0);
2391 return MarkAsCall( 2427 return MarkAsCall(
2392 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), 2428 DefineFixed(new(zone()) LStringAdd(context, left, right), v0),
2393 instr); 2429 instr);
2394 } 2430 }
2395 2431
2396 2432
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 LOperand* function = UseRegisterAtStart(instr->function()); 2676 LOperand* function = UseRegisterAtStart(instr->function());
2641 LAllocateBlockContext* result = 2677 LAllocateBlockContext* result =
2642 new(zone()) LAllocateBlockContext(context, function); 2678 new(zone()) LAllocateBlockContext(context, function);
2643 return MarkAsCall(DefineFixed(result, cp), instr); 2679 return MarkAsCall(DefineFixed(result, cp), instr);
2644 } 2680 }
2645 2681
2646 } // namespace internal 2682 } // namespace internal
2647 } // namespace v8 2683 } // namespace v8
2648 2684
2649 #endif // V8_TARGET_ARCH_MIPS 2685 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698