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

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

Issue 9808058: MIPS: Support arguments object access from inlined functions. (Closed)
Patch Set: Created 8 years, 9 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
« no previous file with comments | « src/mips/lithium-mips.h ('k') | no next file » | 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1069 }
1070 1070
1071 1071
1072 LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) { 1072 LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
1073 return DefineAsRegister( 1073 return DefineAsRegister(
1074 new(zone()) LArgumentsLength(UseRegister(length->value()))); 1074 new(zone()) LArgumentsLength(UseRegister(length->value())));
1075 } 1075 }
1076 1076
1077 1077
1078 LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) { 1078 LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) {
1079 return DefineAsRegister(new(zone()) LArgumentsElements); 1079 return DefineAsRegister(new(zone()) LArgumentsElements(
1080 current_block_->last_environment()->outer() != NULL));
1080 } 1081 }
1081 1082
1082 1083
1083 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { 1084 LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
1084 LInstanceOf* result = 1085 LInstanceOf* result =
1085 new(zone()) LInstanceOf(UseFixed(instr->left(), a0), 1086 new(zone()) LInstanceOf(UseFixed(instr->left(), a0),
1086 UseFixed(instr->right(), a1)); 1087 UseFixed(instr->right(), a1));
1087 return MarkAsCall(DefineFixed(result, v0), instr); 1088 return MarkAsCall(DefineFixed(result, v0), instr);
1088 } 1089 }
1089 1090
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 2271
2271 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2272 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2272 HEnvironment* outer = current_block_->last_environment(); 2273 HEnvironment* outer = current_block_->last_environment();
2273 HConstant* undefined = graph()->GetConstantUndefined(); 2274 HConstant* undefined = graph()->GetConstantUndefined();
2274 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2275 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2275 instr->arguments_count(), 2276 instr->arguments_count(),
2276 instr->function(), 2277 instr->function(),
2277 undefined, 2278 undefined,
2278 instr->call_kind(), 2279 instr->call_kind(),
2279 instr->is_construct()); 2280 instr->is_construct());
2281 if (instr->materializes_arguments()) {
2282 inner->Bind(instr->arguments(), graph()->GetArgumentsObject());
2283 }
2280 current_block_->UpdateEnvironment(inner); 2284 current_block_->UpdateEnvironment(inner);
2281 chunk_->AddInlinedClosure(instr->closure()); 2285 chunk_->AddInlinedClosure(instr->closure());
2282 return NULL; 2286 return NULL;
2283 } 2287 }
2284 2288
2285 2289
2286 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2290 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2291 LInstruction* pop = NULL;
2292
2293 HEnvironment* env = current_block_->last_environment();
2294
2295 if (instr->arguments_pushed()) {
2296 int argument_count = env->arguments_environment()->parameter_count();
2297 pop = new(zone()) LPop(argument_count);
2298 argument_count_ -= argument_count;
2299 }
2300
2287 HEnvironment* outer = current_block_->last_environment()-> 2301 HEnvironment* outer = current_block_->last_environment()->
2288 DiscardInlined(false); 2302 DiscardInlined(false);
2289 current_block_->UpdateEnvironment(outer); 2303 current_block_->UpdateEnvironment(outer);
2290 return NULL; 2304
2305 return pop;
2291 } 2306 }
2292 2307
2293 2308
2294 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2309 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2295 LOperand* key = UseRegisterAtStart(instr->key()); 2310 LOperand* key = UseRegisterAtStart(instr->key());
2296 LOperand* object = UseRegisterAtStart(instr->object()); 2311 LOperand* object = UseRegisterAtStart(instr->object());
2297 LIn* result = new(zone()) LIn(key, object); 2312 LIn* result = new(zone()) LIn(key, object);
2298 return MarkAsCall(DefineFixed(result, v0), instr); 2313 return MarkAsCall(DefineFixed(result, v0), instr);
2299 } 2314 }
2300 2315
(...skipping 20 matching lines...) Expand all
2321 2336
2322 2337
2323 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2338 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2324 LOperand* object = UseRegister(instr->object()); 2339 LOperand* object = UseRegister(instr->object());
2325 LOperand* index = UseRegister(instr->index()); 2340 LOperand* index = UseRegister(instr->index());
2326 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2341 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2327 } 2342 }
2328 2343
2329 2344
2330 } } // namespace v8::internal 2345 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698