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

Side by Side Diff: src/crankshaft/x87/lithium-x87.cc

Issue 1419823003: Remove support for "loads and stores to global vars through property cell shortcuts inst… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@disable-shortcuts
Patch Set: Addressing comments Created 5 years, 2 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/crankshaft/x87/lithium-x87.h ('k') | src/full-codegen/arm/full-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 "src/crankshaft/x87/lithium-x87.h" 5 #include "src/crankshaft/x87/lithium-x87.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X87 9 #if V8_TARGET_ARCH_X87
10 10
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 int index = GetNextSpillIndex(kind); 376 int index = GetNextSpillIndex(kind);
377 if (kind == DOUBLE_REGISTERS) { 377 if (kind == DOUBLE_REGISTERS) {
378 return LDoubleStackSlot::Create(index, zone()); 378 return LDoubleStackSlot::Create(index, zone());
379 } else { 379 } else {
380 DCHECK(kind == GENERAL_REGISTERS); 380 DCHECK(kind == GENERAL_REGISTERS);
381 return LStackSlot::Create(index, zone()); 381 return LStackSlot::Create(index, zone());
382 } 382 }
383 } 383 }
384 384
385 385
386 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) {
387 stream->Add("depth:%d slot:%d", depth(), slot_index());
388 }
389
390
391 void LStoreNamedField::PrintDataTo(StringStream* stream) { 386 void LStoreNamedField::PrintDataTo(StringStream* stream) {
392 object()->PrintTo(stream); 387 object()->PrintTo(stream);
393 std::ostringstream os; 388 std::ostringstream os;
394 os << hydrogen()->access() << " <- "; 389 os << hydrogen()->access() << " <- ";
395 stream->Add(os.str().c_str()); 390 stream->Add(os.str().c_str());
396 value()->PrintTo(stream); 391 value()->PrintTo(stream);
397 } 392 }
398 393
399 394
400 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { 395 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
401 object()->PrintTo(stream); 396 object()->PrintTo(stream);
402 stream->Add("."); 397 stream->Add(".");
403 stream->Add(String::cast(*name())->ToCString().get()); 398 stream->Add(String::cast(*name())->ToCString().get());
404 stream->Add(" <- "); 399 stream->Add(" <- ");
405 value()->PrintTo(stream); 400 value()->PrintTo(stream);
406 } 401 }
407 402
408 403
409 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) {
410 stream->Add("depth:%d slot:%d <- ", depth(), slot_index());
411 value()->PrintTo(stream);
412 }
413
414
415 void LLoadKeyed::PrintDataTo(StringStream* stream) { 404 void LLoadKeyed::PrintDataTo(StringStream* stream) {
416 elements()->PrintTo(stream); 405 elements()->PrintTo(stream);
417 stream->Add("["); 406 stream->Add("[");
418 key()->PrintTo(stream); 407 key()->PrintTo(stream);
419 if (hydrogen()->IsDehoisted()) { 408 if (hydrogen()->IsDehoisted()) {
420 stream->Add(" + %d]", base_offset()); 409 stream->Add(" + %d]", base_offset());
421 } else { 410 } else {
422 stream->Add("]"); 411 stream->Add("]");
423 } 412 }
424 } 413 }
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 if (instr->HasVectorAndSlot()) { 2117 if (instr->HasVectorAndSlot()) {
2129 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); 2118 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2130 } 2119 }
2131 2120
2132 LLoadGlobalGeneric* result = 2121 LLoadGlobalGeneric* result =
2133 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2122 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2134 return MarkAsCall(DefineFixed(result, eax), instr); 2123 return MarkAsCall(DefineFixed(result, eax), instr);
2135 } 2124 }
2136 2125
2137 2126
2138 LInstruction* LChunkBuilder::DoLoadGlobalViaContext(
2139 HLoadGlobalViaContext* instr) {
2140 LOperand* context = UseFixed(instr->context(), esi);
2141 DCHECK(instr->slot_index() > 0);
2142 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context);
2143 return MarkAsCall(DefineFixed(result, eax), instr);
2144 }
2145
2146
2147 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 2127 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
2148 LOperand* context = UseRegisterAtStart(instr->value()); 2128 LOperand* context = UseRegisterAtStart(instr->value());
2149 LInstruction* result = 2129 LInstruction* result =
2150 DefineAsRegister(new(zone()) LLoadContextSlot(context)); 2130 DefineAsRegister(new(zone()) LLoadContextSlot(context));
2151 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { 2131 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) {
2152 result = AssignEnvironment(result); 2132 result = AssignEnvironment(result);
2153 } 2133 }
2154 return result; 2134 return result;
2155 } 2135 }
2156 2136
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); 2455 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2476 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); 2456 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2477 } 2457 }
2478 2458
2479 LStoreNamedGeneric* result = 2459 LStoreNamedGeneric* result =
2480 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); 2460 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector);
2481 return MarkAsCall(result, instr); 2461 return MarkAsCall(result, instr);
2482 } 2462 }
2483 2463
2484 2464
2485 LInstruction* LChunkBuilder::DoStoreGlobalViaContext(
2486 HStoreGlobalViaContext* instr) {
2487 LOperand* context = UseFixed(instr->context(), esi);
2488 LOperand* value = UseFixed(instr->value(),
2489 StoreGlobalViaContextDescriptor::ValueRegister());
2490 DCHECK(instr->slot_index() > 0);
2491
2492 LStoreGlobalViaContext* result =
2493 new (zone()) LStoreGlobalViaContext(context, value);
2494 return MarkAsCall(result, instr);
2495 }
2496
2497
2498 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2465 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2499 LOperand* context = UseFixed(instr->context(), esi); 2466 LOperand* context = UseFixed(instr->context(), esi);
2500 LOperand* left = UseFixed(instr->left(), edx); 2467 LOperand* left = UseFixed(instr->left(), edx);
2501 LOperand* right = UseFixed(instr->right(), eax); 2468 LOperand* right = UseFixed(instr->right(), eax);
2502 LStringAdd* string_add = new(zone()) LStringAdd(context, left, right); 2469 LStringAdd* string_add = new(zone()) LStringAdd(context, left, right);
2503 return MarkAsCall(DefineFixed(string_add, eax), instr); 2470 return MarkAsCall(DefineFixed(string_add, eax), instr);
2504 } 2471 }
2505 2472
2506 2473
2507 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { 2474 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2758 LAllocateBlockContext* result = 2725 LAllocateBlockContext* result =
2759 new(zone()) LAllocateBlockContext(context, function); 2726 new(zone()) LAllocateBlockContext(context, function);
2760 return MarkAsCall(DefineFixed(result, esi), instr); 2727 return MarkAsCall(DefineFixed(result, esi), instr);
2761 } 2728 }
2762 2729
2763 2730
2764 } // namespace internal 2731 } // namespace internal
2765 } // namespace v8 2732 } // namespace v8
2766 2733
2767 #endif // V8_TARGET_ARCH_X87 2734 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-x87.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698