| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 return isolate->heap()->no_interceptor_result_sentinel(); | 819 return isolate->heap()->no_interceptor_result_sentinel(); |
| 820 } | 820 } |
| 821 | 821 |
| 822 | 822 |
| 823 static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) { | 823 static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) { |
| 824 // If the load is non-contextual, just return the undefined result. | 824 // If the load is non-contextual, just return the undefined result. |
| 825 // Note that both keyed and non-keyed loads may end up here, so we | 825 // Note that both keyed and non-keyed loads may end up here, so we |
| 826 // can't use either LoadIC or KeyedLoadIC constructors. | 826 // can't use either LoadIC or KeyedLoadIC constructors. |
| 827 HandleScope scope(isolate); | 827 HandleScope scope(isolate); |
| 828 IC ic(IC::NO_EXTRA_FRAME, isolate); | 828 IC ic(IC::NO_EXTRA_FRAME, isolate); |
| 829 ASSERT(ic.target()->is_load_stub() || ic.target()->is_keyed_load_stub()); | 829 ASSERT(ic.IsLoadStub()); |
| 830 if (!ic.SlowIsUndeclaredGlobal()) return isolate->heap()->undefined_value(); | 830 if (!ic.SlowIsUndeclaredGlobal()) return isolate->heap()->undefined_value(); |
| 831 | 831 |
| 832 // Throw a reference error. | 832 // Throw a reference error. |
| 833 Handle<Name> name_handle(name); | 833 Handle<Name> name_handle(name); |
| 834 Handle<Object> error = | 834 Handle<Object> error = |
| 835 isolate->factory()->NewReferenceError("not_defined", | 835 isolate->factory()->NewReferenceError("not_defined", |
| 836 HandleVector(&name_handle, 1)); | 836 HandleVector(&name_handle, 1)); |
| 837 return isolate->Throw(*error); | 837 return isolate->Throw(*error); |
| 838 } | 838 } |
| 839 | 839 |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1808 Handle<FunctionTemplateInfo>( | 1808 Handle<FunctionTemplateInfo>( |
| 1809 FunctionTemplateInfo::cast(signature->receiver())); | 1809 FunctionTemplateInfo::cast(signature->receiver())); |
| 1810 } | 1810 } |
| 1811 } | 1811 } |
| 1812 | 1812 |
| 1813 is_simple_api_call_ = true; | 1813 is_simple_api_call_ = true; |
| 1814 } | 1814 } |
| 1815 | 1815 |
| 1816 | 1816 |
| 1817 } } // namespace v8::internal | 1817 } } // namespace v8::internal |
| OLD | NEW |