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

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

Issue 23005027: Factor out HSimulate::ReplayEnvironment. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
OLDNEW
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 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 2404
2405 2405
2406 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( 2406 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch(
2407 HIsConstructCallAndBranch* instr) { 2407 HIsConstructCallAndBranch* instr) {
2408 return new(zone()) LIsConstructCallAndBranch(TempRegister()); 2408 return new(zone()) LIsConstructCallAndBranch(TempRegister());
2409 } 2409 }
2410 2410
2411 2411
2412 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 2412 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
2413 HEnvironment* env = current_block_->last_environment(); 2413 HEnvironment* env = current_block_->last_environment();
2414 ASSERT(env != NULL); 2414 instr->ReplayEnvironment(env);
2415
2416 env->set_ast_id(instr->ast_id());
2417
2418 env->Drop(instr->pop_count());
2419 for (int i = instr->values()->length() - 1; i >= 0; --i) {
2420 HValue* value = instr->values()->at(i);
2421 if (instr->HasAssignedIndexAt(i)) {
2422 env->Bind(instr->GetAssignedIndexAt(i), value);
2423 } else {
2424 env->Push(value);
2425 }
2426 }
2427 2415
2428 // If there is an instruction pending deoptimization environment create a 2416 // If there is an instruction pending deoptimization environment create a
2429 // lazy bailout instruction to capture the environment. 2417 // lazy bailout instruction to capture the environment.
2430 if (pending_deoptimization_ast_id_ == instr->ast_id()) { 2418 if (pending_deoptimization_ast_id_ == instr->ast_id()) {
2431 LInstruction* result = new(zone()) LLazyBailout; 2419 LInstruction* result = new(zone()) LLazyBailout;
2432 result = AssignEnvironment(result); 2420 result = AssignEnvironment(result);
2433 // Store the lazy deopt environment with the instruction if needed. Right 2421 // Store the lazy deopt environment with the instruction if needed. Right
2434 // now it is only used for LInstanceOfKnownGlobal. 2422 // now it is only used for LInstanceOfKnownGlobal.
2435 instruction_pending_deoptimization_environment_-> 2423 instruction_pending_deoptimization_environment_->
2436 SetDeferredLazyDeoptimizationEnvironment(result->environment()); 2424 SetDeferredLazyDeoptimizationEnvironment(result->environment());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 2501
2514 2502
2515 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2503 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2516 LOperand* object = UseRegister(instr->object()); 2504 LOperand* object = UseRegister(instr->object());
2517 LOperand* index = UseRegister(instr->index()); 2505 LOperand* index = UseRegister(instr->index());
2518 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2506 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2519 } 2507 }
2520 2508
2521 2509
2522 } } // namespace v8::internal 2510 } } // namespace v8::internal
OLDNEW
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698