| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined()); | 572 ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined()); |
| 573 | 573 |
| 574 // Check that the receiver isn't a smi. | 574 // Check that the receiver isn't a smi. |
| 575 __ BranchOnSmi(receiver, miss); | 575 __ BranchOnSmi(receiver, miss); |
| 576 | 576 |
| 577 // Check that the maps haven't changed. | 577 // Check that the maps haven't changed. |
| 578 Register reg = | 578 Register reg = |
| 579 stub_compiler->CheckPrototypes(object, receiver, holder, | 579 stub_compiler->CheckPrototypes(object, receiver, holder, |
| 580 scratch1, scratch2, name, miss); | 580 scratch1, scratch2, name, miss); |
| 581 | 581 |
| 582 if (lookup->IsValid() && lookup->IsCacheable()) { | 582 if (lookup->IsProperty() && lookup->IsCacheable()) { |
| 583 compiler->CompileCacheable(masm, | 583 compiler->CompileCacheable(masm, |
| 584 stub_compiler, | 584 stub_compiler, |
| 585 receiver, | 585 receiver, |
| 586 reg, | 586 reg, |
| 587 scratch1, | 587 scratch1, |
| 588 scratch2, | 588 scratch2, |
| 589 holder, | 589 holder, |
| 590 lookup, | 590 lookup, |
| 591 name, | 591 name, |
| 592 miss); | 592 miss); |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 | 978 |
| 979 // Check that the maps haven't changed. | 979 // Check that the maps haven't changed. |
| 980 Register reg = CheckPrototypes(object, receiver, holder, holder_reg, | 980 Register reg = CheckPrototypes(object, receiver, holder, holder_reg, |
| 981 scratch, name, &miss); | 981 scratch, name, &miss); |
| 982 if (!reg.is(holder_reg)) { | 982 if (!reg.is(holder_reg)) { |
| 983 __ mov(holder_reg, reg); | 983 __ mov(holder_reg, reg); |
| 984 } | 984 } |
| 985 | 985 |
| 986 // If we call a constant function when the interceptor returns | 986 // If we call a constant function when the interceptor returns |
| 987 // the no-result sentinel, generate code that optimizes this case. | 987 // the no-result sentinel, generate code that optimizes this case. |
| 988 if (lookup.IsValid() && | 988 if (lookup.IsProperty() && |
| 989 lookup.IsCacheable() && | 989 lookup.IsCacheable() && |
| 990 lookup.type() == CONSTANT_FUNCTION && | 990 lookup.type() == CONSTANT_FUNCTION && |
| 991 lookup.GetConstantFunction()->is_compiled() && | 991 lookup.GetConstantFunction()->is_compiled() && |
| 992 !holder->IsJSArray()) { | 992 !holder->IsJSArray()) { |
| 993 // Constant functions cannot sit on global object. | 993 // Constant functions cannot sit on global object. |
| 994 ASSERT(!lookup.holder()->IsGlobalObject()); | 994 ASSERT(!lookup.holder()->IsGlobalObject()); |
| 995 | 995 |
| 996 // Call the interceptor. | 996 // Call the interceptor. |
| 997 __ EnterInternalFrame(); | 997 __ EnterInternalFrame(); |
| 998 __ push(holder_reg); | 998 __ push(holder_reg); |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1801 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 1802 | 1802 |
| 1803 // Return the generated code. | 1803 // Return the generated code. |
| 1804 return GetCode(); | 1804 return GetCode(); |
| 1805 } | 1805 } |
| 1806 | 1806 |
| 1807 | 1807 |
| 1808 #undef __ | 1808 #undef __ |
| 1809 | 1809 |
| 1810 } } // namespace v8::internal | 1810 } } // namespace v8::internal |
| OLD | NEW |