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 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1397 MaybeObject* result = LoadWithInterceptor(&args, &attr); | 1397 MaybeObject* result = LoadWithInterceptor(&args, &attr); |
1398 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 1398 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
1399 // This is call IC. In this case, we simply return the undefined result which | 1399 // This is call IC. In this case, we simply return the undefined result which |
1400 // will lead to an exception when trying to invoke the result as a | 1400 // will lead to an exception when trying to invoke the result as a |
1401 // function. | 1401 // function. |
1402 return result; | 1402 return result; |
1403 } | 1403 } |
1404 | 1404 |
1405 | 1405 |
1406 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { | 1406 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { |
1407 HandleScope scope(isolate); | |
1408 ASSERT(args.length() == 4); | 1407 ASSERT(args.length() == 4); |
1409 Handle<JSObject> recv(JSObject::cast(args[0])); | 1408 JSObject* recv = JSObject::cast(args[0]); |
1410 Handle<Name> name(Name::cast(args[1])); | 1409 Name* name = Name::cast(args[1]); |
1411 Handle<Object> value(args[2], isolate); | 1410 Object* value = args[2]; |
1412 ASSERT(args.smi_at(3) == kStrictMode || args.smi_at(3) == kNonStrictMode); | 1411 ASSERT(args.smi_at(3) == kStrictMode || args.smi_at(3) == kNonStrictMode); |
1413 StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3)); | 1412 StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3)); |
1414 ASSERT(recv->HasNamedInterceptor()); | 1413 ASSERT(recv->HasNamedInterceptor()); |
1415 PropertyAttributes attr = NONE; | 1414 PropertyAttributes attr = NONE; |
1416 Handle<Object> result = JSObject::SetPropertyWithInterceptor( | 1415 MaybeObject* result = recv->SetPropertyWithInterceptor( |
1417 recv, name, value, attr, strict_mode); | 1416 name, value, attr, strict_mode); |
1418 RETURN_IF_EMPTY_HANDLE(isolate, result); | 1417 return result; |
1419 return *result; | |
1420 } | 1418 } |
1421 | 1419 |
1422 | 1420 |
1423 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { | 1421 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { |
1424 JSObject* receiver = JSObject::cast(args[0]); | 1422 JSObject* receiver = JSObject::cast(args[0]); |
1425 ASSERT(args.smi_at(1) >= 0); | 1423 ASSERT(args.smi_at(1) >= 0); |
1426 uint32_t index = args.smi_at(1); | 1424 uint32_t index = args.smi_at(1); |
1427 return receiver->GetElementWithInterceptor(receiver, index); | 1425 return receiver->GetElementWithInterceptor(receiver, index); |
1428 } | 1426 } |
1429 | 1427 |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2263 Handle<FunctionTemplateInfo>( | 2261 Handle<FunctionTemplateInfo>( |
2264 FunctionTemplateInfo::cast(signature->receiver())); | 2262 FunctionTemplateInfo::cast(signature->receiver())); |
2265 } | 2263 } |
2266 } | 2264 } |
2267 | 2265 |
2268 is_simple_api_call_ = true; | 2266 is_simple_api_call_ = true; |
2269 } | 2267 } |
2270 | 2268 |
2271 | 2269 |
2272 } } // namespace v8::internal | 2270 } } // namespace v8::internal |
OLD | NEW |