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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 RETURN_IF_EMPTY_HANDLE(isolate, result); | 925 RETURN_IF_EMPTY_HANDLE(isolate, result); |
926 // This is call IC. In this case, we simply return the undefined result which | 926 // This is call IC. In this case, we simply return the undefined result which |
927 // will lead to an exception when trying to invoke the result as a | 927 // will lead to an exception when trying to invoke the result as a |
928 // function. | 928 // function. |
929 return *result; | 929 return *result; |
930 } | 930 } |
931 | 931 |
932 | 932 |
933 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { | 933 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { |
934 HandleScope scope(isolate); | 934 HandleScope scope(isolate); |
935 ASSERT(args.length() == 4); | 935 ASSERT(args.length() == 3); |
936 Handle<JSObject> recv(JSObject::cast(args[0])); | 936 StoreIC ic(IC::NO_EXTRA_FRAME, isolate); |
937 Handle<Name> name(Name::cast(args[1])); | 937 |
938 Handle<Object> value(args[2], isolate); | 938 Handle<JSObject> receiver = args.at<JSObject>(0); |
939 ASSERT(args.smi_at(3) == kStrictMode || args.smi_at(3) == kNonStrictMode); | 939 Handle<Name> name = args.at<Name>(1); |
940 StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3)); | 940 Handle<Object> value = args.at<Object>(2); |
941 ASSERT(recv->HasNamedInterceptor()); | 941 ASSERT(receiver->HasNamedInterceptor()); |
942 PropertyAttributes attr = NONE; | 942 PropertyAttributes attr = NONE; |
943 Handle<Object> result = JSObject::SetPropertyWithInterceptor( | 943 Handle<Object> result = JSObject::SetPropertyWithInterceptor( |
944 recv, name, value, attr, strict_mode); | 944 receiver, name, value, attr, ic.strict_mode()); |
945 RETURN_IF_EMPTY_HANDLE(isolate, result); | 945 RETURN_IF_EMPTY_HANDLE(isolate, result); |
946 return *result; | 946 return *result; |
947 } | 947 } |
948 | 948 |
949 | 949 |
950 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { | 950 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { |
951 JSObject* receiver = JSObject::cast(args[0]); | 951 JSObject* receiver = JSObject::cast(args[0]); |
952 ASSERT(args.smi_at(1) >= 0); | 952 ASSERT(args.smi_at(1) >= 0); |
953 uint32_t index = args.smi_at(1); | 953 uint32_t index = args.smi_at(1); |
954 return receiver->GetElementWithInterceptor(receiver, index); | 954 return receiver->GetElementWithInterceptor(receiver, index); |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 Handle<FunctionTemplateInfo>( | 1907 Handle<FunctionTemplateInfo>( |
1908 FunctionTemplateInfo::cast(signature->receiver())); | 1908 FunctionTemplateInfo::cast(signature->receiver())); |
1909 } | 1909 } |
1910 } | 1910 } |
1911 | 1911 |
1912 is_simple_api_call_ = true; | 1912 is_simple_api_call_ = true; |
1913 } | 1913 } |
1914 | 1914 |
1915 | 1915 |
1916 } } // namespace v8::internal | 1916 } } // namespace v8::internal |
OLD | NEW |