| 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 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2231 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { | 2231 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { |
| 2232 LOperand* context = UseFixed(instr->context(), esi); | 2232 LOperand* context = UseFixed(instr->context(), esi); |
| 2233 LOperand* object = UseAtStart(instr->object()); | 2233 LOperand* object = UseAtStart(instr->object()); |
| 2234 LOperand* key = UseOrConstantAtStart(instr->key()); | 2234 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2235 LDeleteProperty* result = new(zone()) LDeleteProperty(context, object, key); | 2235 LDeleteProperty* result = new(zone()) LDeleteProperty(context, object, key); |
| 2236 return MarkAsCall(DefineFixed(result, eax), instr); | 2236 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2237 } | 2237 } |
| 2238 | 2238 |
| 2239 | 2239 |
| 2240 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { | 2240 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |
| 2241 ASSERT(argument_count_ == 0); | |
| 2242 allocator_->MarkAsOsrEntry(); | 2241 allocator_->MarkAsOsrEntry(); |
| 2243 current_block_->last_environment()->set_ast_id(instr->ast_id()); | 2242 current_block_->last_environment()->set_ast_id(instr->ast_id()); |
| 2244 return AssignEnvironment(new(zone()) LOsrEntry); | 2243 return AssignEnvironment(new(zone()) LOsrEntry); |
| 2245 } | 2244 } |
| 2246 | 2245 |
| 2247 | 2246 |
| 2248 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2247 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 2249 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2248 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
| 2250 return DefineAsSpilled(new(zone()) LParameter, spill_index); | 2249 return DefineAsSpilled(new(zone()) LParameter, spill_index); |
| 2251 } | 2250 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 chunk_->AddInlinedClosure(instr->closure()); | 2378 chunk_->AddInlinedClosure(instr->closure()); |
| 2380 return NULL; | 2379 return NULL; |
| 2381 } | 2380 } |
| 2382 | 2381 |
| 2383 | 2382 |
| 2384 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2383 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2385 LInstruction* pop = NULL; | 2384 LInstruction* pop = NULL; |
| 2386 | 2385 |
| 2387 HEnvironment* env = current_block_->last_environment(); | 2386 HEnvironment* env = current_block_->last_environment(); |
| 2388 | 2387 |
| 2389 if (env->entry()->arguments_pushed()) { | 2388 if (instr->arguments_pushed()) { |
| 2390 int argument_count = env->arguments_environment()->parameter_count(); | 2389 int argument_count = env->arguments_environment()->parameter_count(); |
| 2391 pop = new(zone()) LDrop(argument_count); | 2390 pop = new(zone()) LDrop(argument_count); |
| 2392 argument_count_ -= argument_count; | 2391 argument_count_ -= argument_count; |
| 2393 } | 2392 } |
| 2394 | 2393 |
| 2395 HEnvironment* outer = current_block_->last_environment()-> | 2394 HEnvironment* outer = current_block_->last_environment()-> |
| 2396 DiscardInlined(false); | 2395 DiscardInlined(false); |
| 2397 current_block_->UpdateEnvironment(outer); | 2396 current_block_->UpdateEnvironment(outer); |
| 2398 return pop; | 2397 return pop; |
| 2399 } | 2398 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2433 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2432 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2434 LOperand* object = UseRegister(instr->object()); | 2433 LOperand* object = UseRegister(instr->object()); |
| 2435 LOperand* index = UseTempRegister(instr->index()); | 2434 LOperand* index = UseTempRegister(instr->index()); |
| 2436 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2435 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2437 } | 2436 } |
| 2438 | 2437 |
| 2439 | 2438 |
| 2440 } } // namespace v8::internal | 2439 } } // namespace v8::internal |
| 2441 | 2440 |
| 2442 #endif // V8_TARGET_ARCH_IA32 | 2441 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |