| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 HBasicBlock* next = NULL; | 454 HBasicBlock* next = NULL; |
| 455 if (i < blocks->length() - 1) next = blocks->at(i + 1); | 455 if (i < blocks->length() - 1) next = blocks->at(i + 1); |
| 456 DoBasicBlock(blocks->at(i), next); | 456 DoBasicBlock(blocks->at(i), next); |
| 457 if (is_aborted()) return NULL; | 457 if (is_aborted()) return NULL; |
| 458 } | 458 } |
| 459 status_ = DONE; | 459 status_ = DONE; |
| 460 return chunk_; | 460 return chunk_; |
| 461 } | 461 } |
| 462 | 462 |
| 463 | 463 |
| 464 void LChunkBuilder::Abort(const char* format, ...) { | 464 void LChunkBuilder::Abort(const char* reason) { |
| 465 if (FLAG_trace_bailout) { | 465 info()->set_bailout_reason(reason); |
| 466 SmartArrayPointer<char> name( | |
| 467 info()->shared_info()->DebugName()->ToCString()); | |
| 468 PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name); | |
| 469 va_list arguments; | |
| 470 va_start(arguments, format); | |
| 471 OS::VPrint(format, arguments); | |
| 472 va_end(arguments); | |
| 473 PrintF("\n"); | |
| 474 } | |
| 475 status_ = ABORTED; | 466 status_ = ABORTED; |
| 476 } | 467 } |
| 477 | 468 |
| 478 | 469 |
| 479 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 470 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
| 480 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 471 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
| 481 Register::ToAllocationIndex(reg)); | 472 Register::ToAllocationIndex(reg)); |
| 482 } | 473 } |
| 483 | 474 |
| 484 | 475 |
| (...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2431 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2422 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2432 LOperand* object = UseRegister(instr->object()); | 2423 LOperand* object = UseRegister(instr->object()); |
| 2433 LOperand* index = UseTempRegister(instr->index()); | 2424 LOperand* index = UseTempRegister(instr->index()); |
| 2434 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2425 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2435 } | 2426 } |
| 2436 | 2427 |
| 2437 | 2428 |
| 2438 } } // namespace v8::internal | 2429 } } // namespace v8::internal |
| 2439 | 2430 |
| 2440 #endif // V8_TARGET_ARCH_IA32 | 2431 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |