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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 | 2121 |
2122 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { | 2122 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { |
2123 LOperand* object = UseAtStart(instr->object()); | 2123 LOperand* object = UseAtStart(instr->object()); |
2124 LOperand* key = UseOrConstantAtStart(instr->key()); | 2124 LOperand* key = UseOrConstantAtStart(instr->key()); |
2125 LDeleteProperty* result = new(zone()) LDeleteProperty(object, key); | 2125 LDeleteProperty* result = new(zone()) LDeleteProperty(object, key); |
2126 return MarkAsCall(DefineFixed(result, rax), instr); | 2126 return MarkAsCall(DefineFixed(result, rax), instr); |
2127 } | 2127 } |
2128 | 2128 |
2129 | 2129 |
2130 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { | 2130 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |
| 2131 ASSERT(argument_count_ == 0); |
2131 allocator_->MarkAsOsrEntry(); | 2132 allocator_->MarkAsOsrEntry(); |
2132 current_block_->last_environment()->set_ast_id(instr->ast_id()); | 2133 current_block_->last_environment()->set_ast_id(instr->ast_id()); |
2133 return AssignEnvironment(new(zone()) LOsrEntry); | 2134 return AssignEnvironment(new(zone()) LOsrEntry); |
2134 } | 2135 } |
2135 | 2136 |
2136 | 2137 |
2137 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2138 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
2138 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2139 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
2139 return DefineAsSpilled(new(zone()) LParameter, spill_index); | 2140 return DefineAsSpilled(new(zone()) LParameter, spill_index); |
2140 } | 2141 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 chunk_->AddInlinedClosure(instr->closure()); | 2261 chunk_->AddInlinedClosure(instr->closure()); |
2261 return NULL; | 2262 return NULL; |
2262 } | 2263 } |
2263 | 2264 |
2264 | 2265 |
2265 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2266 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2266 LInstruction* pop = NULL; | 2267 LInstruction* pop = NULL; |
2267 | 2268 |
2268 HEnvironment* env = current_block_->last_environment(); | 2269 HEnvironment* env = current_block_->last_environment(); |
2269 | 2270 |
2270 if (instr->arguments_pushed()) { | 2271 if (env->entry()->arguments_pushed()) { |
2271 int argument_count = env->arguments_environment()->parameter_count(); | 2272 int argument_count = env->arguments_environment()->parameter_count(); |
2272 pop = new(zone()) LDrop(argument_count); | 2273 pop = new(zone()) LDrop(argument_count); |
2273 argument_count_ -= argument_count; | 2274 argument_count_ -= argument_count; |
2274 } | 2275 } |
2275 | 2276 |
2276 HEnvironment* outer = current_block_->last_environment()-> | 2277 HEnvironment* outer = current_block_->last_environment()-> |
2277 DiscardInlined(false); | 2278 DiscardInlined(false); |
2278 current_block_->UpdateEnvironment(outer); | 2279 current_block_->UpdateEnvironment(outer); |
2279 | 2280 |
2280 return pop; | 2281 return pop; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2314 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2314 LOperand* object = UseRegister(instr->object()); | 2315 LOperand* object = UseRegister(instr->object()); |
2315 LOperand* index = UseTempRegister(instr->index()); | 2316 LOperand* index = UseTempRegister(instr->index()); |
2316 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2317 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2317 } | 2318 } |
2318 | 2319 |
2319 | 2320 |
2320 } } // namespace v8::internal | 2321 } } // namespace v8::internal |
2321 | 2322 |
2322 #endif // V8_TARGET_ARCH_X64 | 2323 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |