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

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

Issue 22819011: Fix replaying of captured objects during chunk building. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Copied^H^H^HPorted to other architectures. 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 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { 2354 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
2355 // There are no real uses of the arguments object. 2355 // There are no real uses of the arguments object.
2356 // arguments.length and element access are supported directly on 2356 // arguments.length and element access are supported directly on
2357 // stack arguments, and any real arguments object use causes a bailout. 2357 // stack arguments, and any real arguments object use causes a bailout.
2358 // So this value is never used. 2358 // So this value is never used.
2359 return NULL; 2359 return NULL;
2360 } 2360 }
2361 2361
2362 2362
2363 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { 2363 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) {
2364 HEnvironment* env = current_block_->last_environment();
titzer 2013/08/26 11:27:24 Can we factor out this code to a platform-independ
Michael Starzinger 2013/08/26 16:15:44 Done. I moved it into a static helper on HCaptured
2365 ASSERT(env != NULL);
2366
2367 // Replay captured objects by replacing all captured objects with the
2368 // same capture id in the current and all outer environments.
2369 while (env != NULL) {
2370 for (int i = 0; i < env->length(); ++i) {
2371 HValue* value = env->values()->at(i);
2372 if (value->IsCapturedObject() &&
2373 HCapturedObject::cast(value)->capture_id() == instr->capture_id()) {
2374 env->SetValueAt(i, instr);
2375 }
2376 }
2377 env = env->outer();
2378 }
2379
2364 // There are no real uses of a captured object. 2380 // There are no real uses of a captured object.
2365 return NULL; 2381 return NULL;
2366 } 2382 }
2367 2383
2368 2384
2369 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 2385 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2370 info()->MarkAsRequiresFrame(); 2386 info()->MarkAsRequiresFrame();
2371 LOperand* args = UseRegister(instr->arguments()); 2387 LOperand* args = UseRegister(instr->arguments());
2372 LOperand* length; 2388 LOperand* length;
2373 LOperand* index; 2389 LOperand* index;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 2526
2511 2527
2512 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2528 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2513 LOperand* object = UseRegister(instr->object()); 2529 LOperand* object = UseRegister(instr->object());
2514 LOperand* index = UseRegister(instr->index()); 2530 LOperand* index = UseRegister(instr->index());
2515 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2531 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2516 } 2532 }
2517 2533
2518 2534
2519 } } // namespace v8::internal 2535 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698