OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2439 } else if (slot->var()->mode() == Variable::DYNAMIC_LOCAL) { | 2439 } else if (slot->var()->mode() == Variable::DYNAMIC_LOCAL) { |
2440 Slot* potential_slot = slot->var()->local_if_not_shadowed()->slot(); | 2440 Slot* potential_slot = slot->var()->local_if_not_shadowed()->slot(); |
2441 // Only generate the fast case for locals that rewrite to slots. | 2441 // Only generate the fast case for locals that rewrite to slots. |
2442 // This rules out argument loads. | 2442 // This rules out argument loads. |
2443 if (potential_slot != NULL) { | 2443 if (potential_slot != NULL) { |
2444 __ ldr(r0, | 2444 __ ldr(r0, |
2445 ContextSlotOperandCheckExtensions(potential_slot, | 2445 ContextSlotOperandCheckExtensions(potential_slot, |
2446 r1, | 2446 r1, |
2447 r2, | 2447 r2, |
2448 &slow)); | 2448 &slow)); |
| 2449 if (potential_slot->var()->mode() == Variable::CONST) { |
| 2450 __ cmp(r0, Operand(Factory::the_hole_value())); |
| 2451 __ mov(r0, Operand(Factory::undefined_value()), LeaveCC, eq); |
| 2452 } |
2449 // There is always control flow to slow from | 2453 // There is always control flow to slow from |
2450 // ContextSlotOperandCheckExtensions. | 2454 // ContextSlotOperandCheckExtensions. |
2451 done.Jump(); | 2455 done.Jump(); |
2452 } | 2456 } |
2453 } | 2457 } |
2454 | 2458 |
2455 slow.Bind(); | 2459 slow.Bind(); |
2456 frame_->EmitPush(cp); | 2460 frame_->EmitPush(cp); |
2457 __ mov(r0, Operand(slot->var()->name())); | 2461 __ mov(r0, Operand(slot->var()->name())); |
2458 frame_->EmitPush(r0); | 2462 frame_->EmitPush(r0); |
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5189 __ mov(r2, Operand(0)); | 5193 __ mov(r2, Operand(0)); |
5190 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); | 5194 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); |
5191 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), | 5195 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), |
5192 RelocInfo::CODE_TARGET); | 5196 RelocInfo::CODE_TARGET); |
5193 } | 5197 } |
5194 | 5198 |
5195 | 5199 |
5196 #undef __ | 5200 #undef __ |
5197 | 5201 |
5198 } } // namespace v8::internal | 5202 } } // namespace v8::internal |
OLD | NEW |