Chromium Code Reviews| 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 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3279 if (potential_slot != NULL) { | 3279 if (potential_slot != NULL) { |
| 3280 // Allocate a fresh register to use as a temp in | 3280 // Allocate a fresh register to use as a temp in |
| 3281 // ContextSlotOperandCheckExtensions and to hold the result | 3281 // ContextSlotOperandCheckExtensions and to hold the result |
| 3282 // value. | 3282 // value. |
| 3283 value = allocator_->Allocate(); | 3283 value = allocator_->Allocate(); |
| 3284 ASSERT(value.is_valid()); | 3284 ASSERT(value.is_valid()); |
| 3285 __ mov(value.reg(), | 3285 __ mov(value.reg(), |
| 3286 ContextSlotOperandCheckExtensions(potential_slot, | 3286 ContextSlotOperandCheckExtensions(potential_slot, |
| 3287 value, | 3287 value, |
| 3288 &slow)); | 3288 &slow)); |
| 3289 if (potential_slot->var()->mode() == Variable::CONST) { | |
| 3290 __ cmp(value.reg(), Factory::the_hole_value()); | |
| 3291 done.Branch(not_equal, &value); | |
| 3292 __ mov(value.reg(), Factory::undefined_value()); | |
| 3293 } | |
| 3289 // There is always control flow to slow from | 3294 // There is always control flow to slow from |
|
Kevin Millikin (Chromium)
2009/04/15 10:42:54
This comment isn't explicit enough. Could you add
| |
| 3290 // ContextSlotOperandCheckExtensions. | 3295 // ContextSlotOperandCheckExtensions. |
| 3291 done.Jump(&value); | 3296 done.Jump(&value); |
| 3292 } | 3297 } |
| 3293 } | 3298 } |
| 3294 | 3299 |
| 3295 slow.Bind(); | 3300 slow.Bind(); |
| 3296 frame_->Push(esi); | 3301 frame_->Push(esi); |
| 3297 frame_->Push(slot->var()->name()); | 3302 frame_->Push(slot->var()->name()); |
| 3298 if (typeof_state == INSIDE_TYPEOF) { | 3303 if (typeof_state == INSIDE_TYPEOF) { |
| 3299 value = | 3304 value = |
| (...skipping 3801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7101 | 7106 |
| 7102 // Slow-case: Go through the JavaScript implementation. | 7107 // Slow-case: Go through the JavaScript implementation. |
| 7103 __ bind(&slow); | 7108 __ bind(&slow); |
| 7104 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 7109 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 7105 } | 7110 } |
| 7106 | 7111 |
| 7107 | 7112 |
| 7108 #undef __ | 7113 #undef __ |
| 7109 | 7114 |
| 7110 } } // namespace v8::internal | 7115 } } // namespace v8::internal |
| OLD | NEW |