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

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

Issue 10908194: Fix arguments object materialization during deopt. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Improved test coverage and fixed bug. Created 8 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
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/compiler/inline-arguments.js » ('j') | 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 // 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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 hydrogen_env->frame_type() != JS_FUNCTION); 858 hydrogen_env->frame_type() != JS_FUNCTION);
859 int value_count = hydrogen_env->length(); 859 int value_count = hydrogen_env->length();
860 LEnvironment* result = new(zone()) LEnvironment( 860 LEnvironment* result = new(zone()) LEnvironment(
861 hydrogen_env->closure(), 861 hydrogen_env->closure(),
862 hydrogen_env->frame_type(), 862 hydrogen_env->frame_type(),
863 ast_id, 863 ast_id,
864 hydrogen_env->parameter_count(), 864 hydrogen_env->parameter_count(),
865 argument_count_, 865 argument_count_,
866 value_count, 866 value_count,
867 outer, 867 outer,
868 hydrogen_env->entry(),
868 zone()); 869 zone());
869 int argument_index = *argument_index_accumulator; 870 int argument_index = *argument_index_accumulator;
870 for (int i = 0; i < value_count; ++i) { 871 for (int i = 0; i < value_count; ++i) {
871 if (hydrogen_env->is_special_index(i)) continue; 872 if (hydrogen_env->is_special_index(i)) continue;
872 873
873 HValue* value = hydrogen_env->values()->at(i); 874 HValue* value = hydrogen_env->values()->at(i);
874 LOperand* op = NULL; 875 LOperand* op = NULL;
875 if (value->IsArgumentsObject()) { 876 if (value->IsArgumentsObject()) {
876 op = NULL; 877 op = NULL;
877 } else if (value->IsPushArgument()) { 878 } else if (value->IsPushArgument()) {
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
2247 HConstant* undefined = graph()->GetConstantUndefined(); 2248 HConstant* undefined = graph()->GetConstantUndefined();
2248 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2249 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2249 instr->arguments_count(), 2250 instr->arguments_count(),
2250 instr->function(), 2251 instr->function(),
2251 undefined, 2252 undefined,
2252 instr->call_kind(), 2253 instr->call_kind(),
2253 instr->inlining_kind()); 2254 instr->inlining_kind());
2254 if (instr->arguments_var() != NULL) { 2255 if (instr->arguments_var() != NULL) {
2255 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); 2256 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject());
2256 } 2257 }
2258 inner->set_entry(instr);
2257 current_block_->UpdateEnvironment(inner); 2259 current_block_->UpdateEnvironment(inner);
2258 chunk_->AddInlinedClosure(instr->closure()); 2260 chunk_->AddInlinedClosure(instr->closure());
2259 return NULL; 2261 return NULL;
2260 } 2262 }
2261 2263
2262 2264
2263 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2265 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2264 LInstruction* pop = NULL; 2266 LInstruction* pop = NULL;
2265 2267
2266 HEnvironment* env = current_block_->last_environment(); 2268 HEnvironment* env = current_block_->last_environment();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2313 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2312 LOperand* object = UseRegister(instr->object()); 2314 LOperand* object = UseRegister(instr->object());
2313 LOperand* index = UseTempRegister(instr->index()); 2315 LOperand* index = UseTempRegister(instr->index());
2314 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2316 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2315 } 2317 }
2316 2318
2317 2319
2318 } } // namespace v8::internal 2320 } } // namespace v8::internal
2319 2321
2320 #endif // V8_TARGET_ARCH_X64 2322 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/compiler/inline-arguments.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698