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 14565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
14576 HandleScope scope(isolate); | 14576 HandleScope scope(isolate); |
14577 ASSERT(args.length() == 1); | 14577 ASSERT(args.length() == 1); |
14578 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 14578 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
14579 if (!object->IsJSObject()) return Smi::FromInt(0); | 14579 if (!object->IsJSObject()) return Smi::FromInt(0); |
14580 Handle<JSObject> js_object = Handle<JSObject>::cast(object); | 14580 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
14581 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); | 14581 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); |
14582 // This call must not cause lazy deopts, because it's called from deferred | 14582 // This call must not cause lazy deopts, because it's called from deferred |
14583 // code where we can't handle lazy deopts for lack of a suitable bailout | 14583 // code where we can't handle lazy deopts for lack of a suitable bailout |
14584 // ID. So we just try migration and signal failure if necessary, | 14584 // ID. So we just try migration and signal failure if necessary, |
14585 // which will also trigger a deopt. | 14585 // which will also trigger a deopt. |
14586 DisallowDeoptimization no_deoptimization(isolate); | |
14586 if (!JSObject::TryMigrateInstance(js_object)) return Smi::FromInt(0); | 14587 if (!JSObject::TryMigrateInstance(js_object)) return Smi::FromInt(0); |
Yang
2014/04/28 06:38:38
Isn't JSObject::TryMigrateInstance not supposed to
Benedikt Meurer
2014/04/28 06:44:36
Done.
| |
14587 return *object; | 14588 return *object; |
14588 } | 14589 } |
14589 | 14590 |
14590 | 14591 |
14591 RUNTIME_FUNCTION(RuntimeHidden_GetFromCache) { | 14592 RUNTIME_FUNCTION(RuntimeHidden_GetFromCache) { |
14592 SealHandleScope shs(isolate); | 14593 SealHandleScope shs(isolate); |
14593 // This is only called from codegen, so checks might be more lax. | 14594 // This is only called from codegen, so checks might be more lax. |
14594 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); | 14595 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); |
14595 CONVERT_ARG_CHECKED(Object, key, 1); | 14596 CONVERT_ARG_CHECKED(Object, key, 1); |
14596 | 14597 |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15144 } | 15145 } |
15145 return NULL; | 15146 return NULL; |
15146 } | 15147 } |
15147 | 15148 |
15148 | 15149 |
15149 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15150 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15150 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15151 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15151 } | 15152 } |
15152 | 15153 |
15153 } } // namespace v8::internal | 15154 } } // namespace v8::internal |
OLD | NEW |