| 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1050 return isolate->heap()->no_interceptor_result_sentinel(); | 1050 return isolate->heap()->no_interceptor_result_sentinel(); |
| 1051 } | 1051 } |
| 1052 | 1052 |
| 1053 | 1053 |
| 1054 static MaybeObject* ThrowReferenceError(String* name) { | 1054 static MaybeObject* ThrowReferenceError(String* name) { |
| 1055 // If the load is non-contextual, just return the undefined result. | 1055 // If the load is non-contextual, just return the undefined result. |
| 1056 // Note that both keyed and non-keyed loads may end up here, so we | 1056 // Note that both keyed and non-keyed loads may end up here, so we |
| 1057 // can't use either LoadIC or KeyedLoadIC constructors. | 1057 // can't use either LoadIC or KeyedLoadIC constructors. |
| 1058 IC ic(IC::NO_EXTRA_FRAME, Isolate::Current()); | 1058 IC ic(IC::NO_EXTRA_FRAME, Isolate::Current()); |
| 1059 ASSERT(ic.target()->is_load_stub() || ic.target()->is_keyed_load_stub()); | 1059 ASSERT(ic.target()->is_load_stub() || ic.target()->is_keyed_load_stub()); |
| 1060 if (!ic.SlowIsContextual()) return HEAP->undefined_value(); | 1060 if (!ic.SlowIsUndeclaredGlobal()) return HEAP->undefined_value(); |
| 1061 | 1061 |
| 1062 // Throw a reference error. | 1062 // Throw a reference error. |
| 1063 HandleScope scope; | 1063 HandleScope scope; |
| 1064 Handle<String> name_handle(name); | 1064 Handle<String> name_handle(name); |
| 1065 Handle<Object> error = | 1065 Handle<Object> error = |
| 1066 FACTORY->NewReferenceError("not_defined", | 1066 FACTORY->NewReferenceError("not_defined", |
| 1067 HandleVector(&name_handle, 1)); | 1067 HandleVector(&name_handle, 1)); |
| 1068 return Isolate::Current()->Throw(*error); | 1068 return Isolate::Current()->Throw(*error); |
| 1069 } | 1069 } |
| 1070 | 1070 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 Handle<FunctionTemplateInfo>( | 1551 Handle<FunctionTemplateInfo>( |
| 1552 FunctionTemplateInfo::cast(signature->receiver())); | 1552 FunctionTemplateInfo::cast(signature->receiver())); |
| 1553 } | 1553 } |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 is_simple_api_call_ = true; | 1556 is_simple_api_call_ = true; |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 | 1559 |
| 1560 } } // namespace v8::internal | 1560 } } // namespace v8::internal |
| OLD | NEW |