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 14576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14587 HandleScope scope(isolate); | 14587 HandleScope scope(isolate); |
14588 ASSERT(args.length() == 1); | 14588 ASSERT(args.length() == 1); |
14589 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 14589 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
14590 if (!object->IsJSObject()) return Smi::FromInt(0); | 14590 if (!object->IsJSObject()) return Smi::FromInt(0); |
14591 Handle<JSObject> js_object = Handle<JSObject>::cast(object); | 14591 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
14592 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); | 14592 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); |
14593 // This call must not cause lazy deopts, because it's called from deferred | 14593 // This call must not cause lazy deopts, because it's called from deferred |
14594 // code where we can't handle lazy deopts for lack of a suitable bailout | 14594 // code where we can't handle lazy deopts for lack of a suitable bailout |
14595 // ID. So we just try migration and signal failure if necessary, | 14595 // ID. So we just try migration and signal failure if necessary, |
14596 // which will also trigger a deopt. | 14596 // which will also trigger a deopt. |
14597 Handle<Object> result = JSObject::TryMigrateInstance(js_object); | 14597 if (!JSObject::TryMigrateInstance(js_object)) return Smi::FromInt(0); |
14598 if (result.is_null()) return Smi::FromInt(0); | |
14599 return *object; | 14598 return *object; |
14600 } | 14599 } |
14601 | 14600 |
14602 | 14601 |
14603 RUNTIME_FUNCTION(RuntimeHidden_GetFromCache) { | 14602 RUNTIME_FUNCTION(RuntimeHidden_GetFromCache) { |
14604 SealHandleScope shs(isolate); | 14603 SealHandleScope shs(isolate); |
14605 // This is only called from codegen, so checks might be more lax. | 14604 // This is only called from codegen, so checks might be more lax. |
14606 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); | 14605 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); |
14607 CONVERT_ARG_CHECKED(Object, key, 1); | 14606 CONVERT_ARG_CHECKED(Object, key, 1); |
14608 | 14607 |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15156 } | 15155 } |
15157 return NULL; | 15156 return NULL; |
15158 } | 15157 } |
15159 | 15158 |
15160 | 15159 |
15161 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15160 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15162 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15161 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15163 } | 15162 } |
15164 | 15163 |
15165 } } // namespace v8::internal | 15164 } } // namespace v8::internal |
OLD | NEW |