| 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 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2417 | 2417 |
| 2418 | 2418 |
| 2419 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( | 2419 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( |
| 2420 HIsConstructCallAndBranch* instr) { | 2420 HIsConstructCallAndBranch* instr) { |
| 2421 return new(zone()) LIsConstructCallAndBranch(TempRegister()); | 2421 return new(zone()) LIsConstructCallAndBranch(TempRegister()); |
| 2422 } | 2422 } |
| 2423 | 2423 |
| 2424 | 2424 |
| 2425 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2425 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
| 2426 HEnvironment* env = current_block_->last_environment(); | 2426 HEnvironment* env = current_block_->last_environment(); |
| 2427 ASSERT(env != NULL); | 2427 instr->ReplayEnvironment(env); |
| 2428 | |
| 2429 env->set_ast_id(instr->ast_id()); | |
| 2430 | |
| 2431 env->Drop(instr->pop_count()); | |
| 2432 for (int i = instr->values()->length() - 1; i >= 0; --i) { | |
| 2433 HValue* value = instr->values()->at(i); | |
| 2434 if (instr->HasAssignedIndexAt(i)) { | |
| 2435 env->Bind(instr->GetAssignedIndexAt(i), value); | |
| 2436 } else { | |
| 2437 env->Push(value); | |
| 2438 } | |
| 2439 } | |
| 2440 | 2428 |
| 2441 // If there is an instruction pending deoptimization environment create a | 2429 // If there is an instruction pending deoptimization environment create a |
| 2442 // lazy bailout instruction to capture the environment. | 2430 // lazy bailout instruction to capture the environment. |
| 2443 if (pending_deoptimization_ast_id_ == instr->ast_id()) { | 2431 if (pending_deoptimization_ast_id_ == instr->ast_id()) { |
| 2444 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; | 2432 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; |
| 2445 LInstruction* result = AssignEnvironment(lazy_bailout); | 2433 LInstruction* result = AssignEnvironment(lazy_bailout); |
| 2446 // Store the lazy deopt environment with the instruction if needed. Right | 2434 // Store the lazy deopt environment with the instruction if needed. Right |
| 2447 // now it is only used for LInstanceOfKnownGlobal. | 2435 // now it is only used for LInstanceOfKnownGlobal. |
| 2448 instruction_pending_deoptimization_environment_-> | 2436 instruction_pending_deoptimization_environment_-> |
| 2449 SetDeferredLazyDeoptimizationEnvironment(result->environment()); | 2437 SetDeferredLazyDeoptimizationEnvironment(result->environment()); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2518 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2531 LOperand* object = UseRegister(instr->object()); | 2519 LOperand* object = UseRegister(instr->object()); |
| 2532 LOperand* index = UseTempRegister(instr->index()); | 2520 LOperand* index = UseTempRegister(instr->index()); |
| 2533 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2521 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2534 } | 2522 } |
| 2535 | 2523 |
| 2536 | 2524 |
| 2537 } } // namespace v8::internal | 2525 } } // namespace v8::internal |
| 2538 | 2526 |
| 2539 #endif // V8_TARGET_ARCH_X64 | 2527 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |