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

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

Issue 263803005: Fix crash in debug builds introduced with r21110. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/x64/lithium-x64.h ('k') | no next file » | 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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "lithium-allocator-inl.h" 9 #include "lithium-allocator-inl.h"
10 #include "x64/lithium-x64.h" 10 #include "x64/lithium-x64.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 HBasicBlock* next = NULL; 432 HBasicBlock* next = NULL;
433 if (i < blocks->length() - 1) next = blocks->at(i + 1); 433 if (i < blocks->length() - 1) next = blocks->at(i + 1);
434 DoBasicBlock(blocks->at(i), next); 434 DoBasicBlock(blocks->at(i), next);
435 if (is_aborted()) return NULL; 435 if (is_aborted()) return NULL;
436 } 436 }
437 status_ = DONE; 437 status_ = DONE;
438 return chunk_; 438 return chunk_;
439 } 439 }
440 440
441 441
442 void LCodeGen::Abort(BailoutReason reason) { 442 void LChunkBuilder::Abort(BailoutReason reason) {
443 info()->set_bailout_reason(reason); 443 info()->set_bailout_reason(reason);
444 status_ = ABORTED; 444 status_ = ABORTED;
445 } 445 }
446 446
447 447
448 void LChunkBuilder::AddDeprecationDependency(Handle<Map> map) {
449 if (map->is_deprecated()) return Abort(kMapBecameDeprecated);
450 chunk_->AddDeprecationDependency(map);
451 }
452
453
454 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { 448 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
455 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, 449 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER,
456 Register::ToAllocationIndex(reg)); 450 Register::ToAllocationIndex(reg));
457 } 451 }
458 452
459 453
460 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) { 454 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) {
461 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, 455 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
462 XMMRegister::ToAllocationIndex(reg)); 456 XMMRegister::ToAllocationIndex(reg));
463 } 457 }
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 val = UseRegisterAtStart(instr->value()); 2307 val = UseRegisterAtStart(instr->value());
2314 } else { 2308 } else {
2315 val = UseRegister(instr->value()); 2309 val = UseRegister(instr->value());
2316 } 2310 }
2317 2311
2318 // We only need a scratch register if we have a write barrier or we 2312 // We only need a scratch register if we have a write barrier or we
2319 // have a store into the properties array (not in-object-property). 2313 // have a store into the properties array (not in-object-property).
2320 LOperand* temp = (!is_in_object || needs_write_barrier || 2314 LOperand* temp = (!is_in_object || needs_write_barrier ||
2321 needs_write_barrier_for_map) ? TempRegister() : NULL; 2315 needs_write_barrier_for_map) ? TempRegister() : NULL;
2322 2316
2323 // Add a deprecation dependency on the transition target map.
2324 if (instr->has_transition()) {
2325 AddDeprecationDependency(instr->transition_map());
2326 }
2327
2328 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); 2317 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp);
2329 if (!instr->access().IsExternalMemory() && 2318 if (!instr->access().IsExternalMemory() &&
2330 instr->field_representation().IsHeapObject() && 2319 instr->field_representation().IsHeapObject() &&
2331 (val->IsConstantOperand() 2320 (val->IsConstantOperand()
2332 ? HConstant::cast(instr->value())->HasSmiValue() 2321 ? HConstant::cast(instr->value())->HasSmiValue()
2333 : !instr->value()->type().IsHeapObject())) { 2322 : !instr->value()->type().IsHeapObject())) {
2334 result = AssignEnvironment(result); 2323 result = AssignEnvironment(result);
2335 } 2324 }
2336 return result; 2325 return result;
2337 } 2326 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 LOperand* index = UseTempRegister(instr->index()); 2588 LOperand* index = UseTempRegister(instr->index());
2600 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2589 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2601 LInstruction* result = DefineSameAsFirst(load); 2590 LInstruction* result = DefineSameAsFirst(load);
2602 return AssignPointerMap(result); 2591 return AssignPointerMap(result);
2603 } 2592 }
2604 2593
2605 2594
2606 } } // namespace v8::internal 2595 } } // namespace v8::internal
2607 2596
2608 #endif // V8_TARGET_ARCH_X64 2597 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698