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

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

Issue 10033028: Reland arguments access support for inlined functions (r11109,r11118). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Kevin's comments Created 8 years, 8 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 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 elems->from_inlined()));
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());
2280 if (instr->arguments() != NULL) { 2281 if (instr->arguments_var() != NULL) {
2281 inner->Bind(instr->arguments(), graph()->GetArgumentsObject()); 2282 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject());
2282 } 2283 }
2283 current_block_->UpdateEnvironment(inner); 2284 current_block_->UpdateEnvironment(inner);
2284 chunk_->AddInlinedClosure(instr->closure()); 2285 chunk_->AddInlinedClosure(instr->closure());
2285 return NULL; 2286 return NULL;
2286 } 2287 }
2287 2288
2288 2289
2289 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()) LDrop(argument_count);
2298 argument_count_ -= argument_count;
2299 }
2300
2290 HEnvironment* outer = current_block_->last_environment()-> 2301 HEnvironment* outer = current_block_->last_environment()->
2291 DiscardInlined(false); 2302 DiscardInlined(false);
2292 current_block_->UpdateEnvironment(outer); 2303 current_block_->UpdateEnvironment(outer);
2293 return NULL; 2304
2305 return pop;
2294 } 2306 }
2295 2307
2296 2308
2297 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2309 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2298 LOperand* key = UseRegisterAtStart(instr->key()); 2310 LOperand* key = UseRegisterAtStart(instr->key());
2299 LOperand* object = UseRegisterAtStart(instr->object()); 2311 LOperand* object = UseRegisterAtStart(instr->object());
2300 LIn* result = new(zone()) LIn(key, object); 2312 LIn* result = new(zone()) LIn(key, object);
2301 return MarkAsCall(DefineFixed(result, v0), instr); 2313 return MarkAsCall(DefineFixed(result, v0), instr);
2302 } 2314 }
2303 2315
(...skipping 20 matching lines...) Expand all
2324 2336
2325 2337
2326 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2338 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2327 LOperand* object = UseRegister(instr->object()); 2339 LOperand* object = UseRegister(instr->object());
2328 LOperand* index = UseRegister(instr->index()); 2340 LOperand* index = UseRegister(instr->index());
2329 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2341 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2330 } 2342 }
2331 2343
2332 2344
2333 } } // namespace v8::internal 2345 } } // namespace v8::internal
OLDNEW
« src/arm/lithium-arm.h ('K') | « src/mips/lithium-mips.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698