| OLD | NEW | 
|---|
| 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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2367 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { | 2367 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { | 
| 2368   // There are no real uses of the arguments object. | 2368   // There are no real uses of the arguments object. | 
| 2369   // arguments.length and element access are supported directly on | 2369   // arguments.length and element access are supported directly on | 
| 2370   // stack arguments, and any real arguments object use causes a bailout. | 2370   // stack arguments, and any real arguments object use causes a bailout. | 
| 2371   // So this value is never used. | 2371   // So this value is never used. | 
| 2372   return NULL; | 2372   return NULL; | 
| 2373 } | 2373 } | 
| 2374 | 2374 | 
| 2375 | 2375 | 
| 2376 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { | 2376 LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { | 
|  | 2377   HEnvironment* env = current_block_->last_environment(); | 
|  | 2378   ASSERT(env != NULL); | 
|  | 2379 | 
|  | 2380   // Replay captured objects by replacing all captured objects with the | 
|  | 2381   // same capture id in the current and all outer environments. | 
|  | 2382   while (env != NULL) { | 
|  | 2383     for (int i = 0; i < env->length(); ++i) { | 
|  | 2384       HValue* value = env->values()->at(i); | 
|  | 2385       if (value->IsCapturedObject() && | 
|  | 2386           HCapturedObject::cast(value)->capture_id() == instr->capture_id()) { | 
|  | 2387         env->SetValueAt(i, instr); | 
|  | 2388       } | 
|  | 2389     } | 
|  | 2390     env = env->outer(); | 
|  | 2391   } | 
|  | 2392 | 
| 2377   // There are no real uses of a captured object. | 2393   // There are no real uses of a captured object. | 
| 2378   return NULL; | 2394   return NULL; | 
| 2379 } | 2395 } | 
| 2380 | 2396 | 
| 2381 | 2397 | 
| 2382 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 2398 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 
| 2383   info()->MarkAsRequiresFrame(); | 2399   info()->MarkAsRequiresFrame(); | 
| 2384   LOperand* args = UseRegister(instr->arguments()); | 2400   LOperand* args = UseRegister(instr->arguments()); | 
| 2385   LOperand* length; | 2401   LOperand* length; | 
| 2386   LOperand* index; | 2402   LOperand* index; | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2527 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2543 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 
| 2528   LOperand* object = UseRegister(instr->object()); | 2544   LOperand* object = UseRegister(instr->object()); | 
| 2529   LOperand* index = UseTempRegister(instr->index()); | 2545   LOperand* index = UseTempRegister(instr->index()); | 
| 2530   return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2546   return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 
| 2531 } | 2547 } | 
| 2532 | 2548 | 
| 2533 | 2549 | 
| 2534 } }  // namespace v8::internal | 2550 } }  // namespace v8::internal | 
| 2535 | 2551 | 
| 2536 #endif  // V8_TARGET_ARCH_X64 | 2552 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|