OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 set_deoptimization_environment(result->environment()); | 2321 set_deoptimization_environment(result->environment()); |
2322 ClearInstructionPendingDeoptimizationEnvironment(); | 2322 ClearInstructionPendingDeoptimizationEnvironment(); |
2323 return result; | 2323 return result; |
2324 } | 2324 } |
2325 | 2325 |
2326 return NULL; | 2326 return NULL; |
2327 } | 2327 } |
2328 | 2328 |
2329 | 2329 |
2330 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { | 2330 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { |
2331 LOperand* context = UseAny(instr->context()); | 2331 if (instr->is_function_entry()) { |
2332 return AssignEnvironment( | 2332 LOperand* context = UseFixed(instr->context(), esi); |
2333 AssignPointerMap(new(zone()) LStackCheck(context))); | 2333 return MarkAsCall(new(zone()) LStackCheck(context), instr); |
| 2334 } else { |
| 2335 ASSERT(instr->is_backwards_branch()); |
| 2336 LOperand* context = UseAny(instr->context()); |
| 2337 return AssignEnvironment( |
| 2338 AssignPointerMap(new(zone()) LStackCheck(context))); |
| 2339 } |
2334 } | 2340 } |
2335 | 2341 |
2336 | 2342 |
2337 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { | 2343 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { |
2338 HEnvironment* outer = current_block_->last_environment(); | 2344 HEnvironment* outer = current_block_->last_environment(); |
2339 HConstant* undefined = graph()->GetConstantUndefined(); | 2345 HConstant* undefined = graph()->GetConstantUndefined(); |
2340 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2346 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2341 instr->function(), | 2347 instr->function(), |
2342 undefined, | 2348 undefined, |
2343 instr->call_kind()); | 2349 instr->call_kind()); |
(...skipping 15 matching lines...) Expand all Loading... |
2359 LOperand* key = UseOrConstantAtStart(instr->key()); | 2365 LOperand* key = UseOrConstantAtStart(instr->key()); |
2360 LOperand* object = UseOrConstantAtStart(instr->object()); | 2366 LOperand* object = UseOrConstantAtStart(instr->object()); |
2361 LIn* result = new(zone()) LIn(context, key, object); | 2367 LIn* result = new(zone()) LIn(context, key, object); |
2362 return MarkAsCall(DefineFixed(result, eax), instr); | 2368 return MarkAsCall(DefineFixed(result, eax), instr); |
2363 } | 2369 } |
2364 | 2370 |
2365 | 2371 |
2366 } } // namespace v8::internal | 2372 } } // namespace v8::internal |
2367 | 2373 |
2368 #endif // V8_TARGET_ARCH_IA32 | 2374 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |