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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { | 2367 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { |
2368 // There are no real uses of the arguments object. | 2368 // There are no real uses of the arguments object. |
2369 // arguments.length and element access are supported directly on | 2369 // arguments.length and element access are supported directly on |
2370 // stack arguments, and any real arguments object use causes a bailout. | 2370 // stack arguments, and any real arguments object use causes a bailout. |
2371 // So this value is never used. | 2371 // So this value is never used. |
2372 return NULL; | 2372 return NULL; |
2373 } | 2373 } |
2374 | 2374 |
2375 | 2375 |
2376 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { | 2376 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { |
2377 HEnvironment* env = current_block_->last_environment(); | 2377 instr->ReplayEnvironment(current_block_->last_environment()); |
2378 instr->ReplayEnvironment(env); | |
2379 | 2378 |
2380 // There are no real uses of a captured object. | 2379 // There are no real uses of a captured object. |
2381 return NULL; | 2380 return NULL; |
2382 } | 2381 } |
2383 | 2382 |
2384 | 2383 |
2385 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 2384 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { |
2386 info()->MarkAsRequiresFrame(); | 2385 info()->MarkAsRequiresFrame(); |
2387 LOperand* args = UseRegister(instr->arguments()); | 2386 LOperand* args = UseRegister(instr->arguments()); |
2388 LOperand* length; | 2387 LOperand* length; |
(...skipping 27 matching lines...) Expand all Loading... |
2416 } | 2415 } |
2417 | 2416 |
2418 | 2417 |
2419 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( | 2418 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( |
2420 HIsConstructCallAndBranch* instr) { | 2419 HIsConstructCallAndBranch* instr) { |
2421 return new(zone()) LIsConstructCallAndBranch(TempRegister()); | 2420 return new(zone()) LIsConstructCallAndBranch(TempRegister()); |
2422 } | 2421 } |
2423 | 2422 |
2424 | 2423 |
2425 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2424 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
2426 HEnvironment* env = current_block_->last_environment(); | 2425 instr->ReplayEnvironment(current_block_->last_environment()); |
2427 ASSERT(env != NULL); | |
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 | 2426 |
2441 // If there is an instruction pending deoptimization environment create a | 2427 // If there is an instruction pending deoptimization environment create a |
2442 // lazy bailout instruction to capture the environment. | 2428 // lazy bailout instruction to capture the environment. |
2443 if (pending_deoptimization_ast_id_ == instr->ast_id()) { | 2429 if (pending_deoptimization_ast_id_ == instr->ast_id()) { |
2444 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; | 2430 LLazyBailout* lazy_bailout = new(zone()) LLazyBailout; |
2445 LInstruction* result = AssignEnvironment(lazy_bailout); | 2431 LInstruction* result = AssignEnvironment(lazy_bailout); |
2446 // Store the lazy deopt environment with the instruction if needed. Right | 2432 // Store the lazy deopt environment with the instruction if needed. Right |
2447 // now it is only used for LInstanceOfKnownGlobal. | 2433 // now it is only used for LInstanceOfKnownGlobal. |
2448 instruction_pending_deoptimization_environment_-> | 2434 instruction_pending_deoptimization_environment_-> |
2449 SetDeferredLazyDeoptimizationEnvironment(result->environment()); | 2435 SetDeferredLazyDeoptimizationEnvironment(result->environment()); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2530 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2516 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2531 LOperand* object = UseRegister(instr->object()); | 2517 LOperand* object = UseRegister(instr->object()); |
2532 LOperand* index = UseTempRegister(instr->index()); | 2518 LOperand* index = UseTempRegister(instr->index()); |
2533 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2519 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2534 } | 2520 } |
2535 | 2521 |
2536 | 2522 |
2537 } } // namespace v8::internal | 2523 } } // namespace v8::internal |
2538 | 2524 |
2539 #endif // V8_TARGET_ARCH_X64 | 2525 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |