| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3387 // Deoptimize if the receiver is not a JS object. | 3387 // Deoptimize if the receiver is not a JS object. |
| 3388 __ SmiTst(receiver, scratch); | 3388 __ SmiTst(receiver, scratch); |
| 3389 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); | 3389 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); |
| 3390 | 3390 |
| 3391 __ GetObjectType(receiver, scratch, scratch); | 3391 __ GetObjectType(receiver, scratch, scratch); |
| 3392 DeoptimizeIf(lt, instr->environment(), | 3392 DeoptimizeIf(lt, instr->environment(), |
| 3393 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); | 3393 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 3394 __ Branch(&result_in_receiver); | 3394 __ Branch(&result_in_receiver); |
| 3395 | 3395 |
| 3396 __ bind(&global_object); | 3396 __ bind(&global_object); |
| 3397 __ lw(receiver, FieldMemOperand(function, JSFunction::kContextOffset)); | 3397 __ lw(result, FieldMemOperand(function, JSFunction::kContextOffset)); |
| 3398 __ lw(receiver, | 3398 __ lw(result, |
| 3399 ContextOperand(receiver, Context::GLOBAL_OBJECT_INDEX)); | 3399 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); |
| 3400 __ lw(receiver, | 3400 __ lw(result, |
| 3401 FieldMemOperand(receiver, GlobalObject::kGlobalReceiverOffset)); | 3401 FieldMemOperand(result, GlobalObject::kGlobalReceiverOffset)); |
| 3402 | 3402 |
| 3403 if (result.is(receiver)) { | 3403 if (result.is(receiver)) { |
| 3404 __ bind(&result_in_receiver); | 3404 __ bind(&result_in_receiver); |
| 3405 } else { | 3405 } else { |
| 3406 Label result_ok; | 3406 Label result_ok; |
| 3407 __ Branch(&result_ok); | 3407 __ Branch(&result_ok); |
| 3408 __ bind(&result_in_receiver); | 3408 __ bind(&result_in_receiver); |
| 3409 __ mov(result, receiver); | 3409 __ mov(result, receiver); |
| 3410 __ bind(&result_ok); | 3410 __ bind(&result_ok); |
| 3411 } | 3411 } |
| (...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5808 __ Subu(scratch, result, scratch); | 5808 __ Subu(scratch, result, scratch); |
| 5809 __ lw(result, FieldMemOperand(scratch, | 5809 __ lw(result, FieldMemOperand(scratch, |
| 5810 FixedArray::kHeaderSize - kPointerSize)); | 5810 FixedArray::kHeaderSize - kPointerSize)); |
| 5811 __ bind(&done); | 5811 __ bind(&done); |
| 5812 } | 5812 } |
| 5813 | 5813 |
| 5814 | 5814 |
| 5815 #undef __ | 5815 #undef __ |
| 5816 | 5816 |
| 5817 } } // namespace v8::internal | 5817 } } // namespace v8::internal |
| OLD | NEW |