| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 return handler; | 513 return handler; |
| 514 } | 514 } |
| 515 | 515 |
| 516 | 516 |
| 517 Handle<Code> StubCache::ComputeStoreTransition(Handle<Name> name, | 517 Handle<Code> StubCache::ComputeStoreTransition(Handle<Name> name, |
| 518 Handle<JSObject> receiver, | 518 Handle<JSObject> receiver, |
| 519 LookupResult* lookup, | 519 LookupResult* lookup, |
| 520 Handle<Map> transition, | 520 Handle<Map> transition, |
| 521 StrictModeFlag strict_mode) { | 521 StrictModeFlag strict_mode) { |
| 522 Handle<Code> stub = FindStoreHandler( | 522 Handle<Code> stub = FindStoreHandler( |
| 523 name, receiver, Code::STORE_IC, Code::TRANSITION, strict_mode); | 523 name, receiver, Code::STORE_IC, Code::MAP_TRANSITION, strict_mode); |
| 524 if (!stub.is_null()) return stub; | 524 if (!stub.is_null()) return stub; |
| 525 | 525 |
| 526 StoreStubCompiler compiler(isolate_, strict_mode); | 526 StoreStubCompiler compiler(isolate_, strict_mode); |
| 527 Handle<Code> handler = | 527 Handle<Code> handler = |
| 528 compiler.CompileStoreTransition(receiver, lookup, transition, name); | 528 compiler.CompileStoreTransition(receiver, lookup, transition, name); |
| 529 HeapObject::UpdateMapCodeCache(receiver, name, handler); | 529 HeapObject::UpdateMapCodeCache(receiver, name, handler); |
| 530 return handler; | 530 return handler; |
| 531 } | 531 } |
| 532 | 532 |
| 533 | 533 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } | 695 } |
| 696 | 696 |
| 697 | 697 |
| 698 Handle<Code> StubCache::ComputeKeyedStoreTransition( | 698 Handle<Code> StubCache::ComputeKeyedStoreTransition( |
| 699 Handle<Name> name, | 699 Handle<Name> name, |
| 700 Handle<JSObject> receiver, | 700 Handle<JSObject> receiver, |
| 701 LookupResult* lookup, | 701 LookupResult* lookup, |
| 702 Handle<Map> transition, | 702 Handle<Map> transition, |
| 703 StrictModeFlag strict_mode) { | 703 StrictModeFlag strict_mode) { |
| 704 Handle<Code> stub = FindStoreHandler( | 704 Handle<Code> stub = FindStoreHandler( |
| 705 name, receiver, Code::KEYED_STORE_IC, Code::TRANSITION, strict_mode); | 705 name, receiver, Code::KEYED_STORE_IC, Code::MAP_TRANSITION, strict_mode); |
| 706 if (!stub.is_null()) return stub; | 706 if (!stub.is_null()) return stub; |
| 707 | 707 |
| 708 KeyedStoreStubCompiler compiler(isolate(), strict_mode, STANDARD_STORE); | 708 KeyedStoreStubCompiler compiler(isolate(), strict_mode, STANDARD_STORE); |
| 709 Handle<Code> handler = | 709 Handle<Code> handler = |
| 710 compiler.CompileStoreTransition(receiver, lookup, transition, name); | 710 compiler.CompileStoreTransition(receiver, lookup, transition, name); |
| 711 HeapObject::UpdateMapCodeCache(receiver, name, handler); | 711 HeapObject::UpdateMapCodeCache(receiver, name, handler); |
| 712 return handler; | 712 return handler; |
| 713 } | 713 } |
| 714 | 714 |
| 715 | 715 |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 MaybeObject* result = LoadWithInterceptor(&args, &attr); | 1388 MaybeObject* result = LoadWithInterceptor(&args, &attr); |
| 1389 RETURN_IF_SCHEDULED_EXCEPTION(isolate); | 1389 RETURN_IF_SCHEDULED_EXCEPTION(isolate); |
| 1390 // This is call IC. In this case, we simply return the undefined result which | 1390 // This is call IC. In this case, we simply return the undefined result which |
| 1391 // will lead to an exception when trying to invoke the result as a | 1391 // will lead to an exception when trying to invoke the result as a |
| 1392 // function. | 1392 // function. |
| 1393 return result; | 1393 return result; |
| 1394 } | 1394 } |
| 1395 | 1395 |
| 1396 | 1396 |
| 1397 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { | 1397 RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) { |
| 1398 HandleScope scope(isolate); | |
| 1399 ASSERT(args.length() == 4); | 1398 ASSERT(args.length() == 4); |
| 1400 Handle<JSObject> recv(JSObject::cast(args[0])); | 1399 JSObject* recv = JSObject::cast(args[0]); |
| 1401 Handle<Name> name(Name::cast(args[1])); | 1400 Name* name = Name::cast(args[1]); |
| 1402 Handle<Object> value(args[2], isolate); | 1401 Object* value = args[2]; |
| 1403 ASSERT(args.smi_at(3) == kStrictMode || args.smi_at(3) == kNonStrictMode); | 1402 ASSERT(args.smi_at(3) == kStrictMode || args.smi_at(3) == kNonStrictMode); |
| 1404 StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3)); | 1403 StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3)); |
| 1405 ASSERT(recv->HasNamedInterceptor()); | 1404 ASSERT(recv->HasNamedInterceptor()); |
| 1406 PropertyAttributes attr = NONE; | 1405 PropertyAttributes attr = NONE; |
| 1407 Handle<Object> result = JSObject::SetPropertyWithInterceptor( | 1406 MaybeObject* result = recv->SetPropertyWithInterceptor( |
| 1408 recv, name, value, attr, strict_mode); | 1407 name, value, attr, strict_mode); |
| 1409 RETURN_IF_EMPTY_HANDLE(isolate, result); | 1408 return result; |
| 1410 return *result; | |
| 1411 } | 1409 } |
| 1412 | 1410 |
| 1413 | 1411 |
| 1414 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { | 1412 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadPropertyWithInterceptor) { |
| 1415 JSObject* receiver = JSObject::cast(args[0]); | 1413 JSObject* receiver = JSObject::cast(args[0]); |
| 1416 ASSERT(args.smi_at(1) >= 0); | 1414 ASSERT(args.smi_at(1) >= 0); |
| 1417 uint32_t index = args.smi_at(1); | 1415 uint32_t index = args.smi_at(1); |
| 1418 return receiver->GetElementWithInterceptor(receiver, index); | 1416 return receiver->GetElementWithInterceptor(receiver, index); |
| 1419 } | 1417 } |
| 1420 | 1418 |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 &slow); | 1842 &slow); |
| 1845 | 1843 |
| 1846 // Handle store cache miss. | 1844 // Handle store cache miss. |
| 1847 GenerateRestoreName(masm(), &miss, name); | 1845 GenerateRestoreName(masm(), &miss, name); |
| 1848 TailCallBuiltin(masm(), MissBuiltin(kind())); | 1846 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 1849 | 1847 |
| 1850 GenerateRestoreName(masm(), &slow, name); | 1848 GenerateRestoreName(masm(), &slow, name); |
| 1851 TailCallBuiltin(masm(), SlowBuiltin(kind())); | 1849 TailCallBuiltin(masm(), SlowBuiltin(kind())); |
| 1852 | 1850 |
| 1853 // Return the generated code. | 1851 // Return the generated code. |
| 1854 return GetCode(kind(), Code::TRANSITION, name); | 1852 return GetCode(kind(), Code::MAP_TRANSITION, name); |
| 1855 } | 1853 } |
| 1856 | 1854 |
| 1857 | 1855 |
| 1858 Handle<Code> BaseStoreStubCompiler::CompileStoreField(Handle<JSObject> object, | 1856 Handle<Code> BaseStoreStubCompiler::CompileStoreField(Handle<JSObject> object, |
| 1859 LookupResult* lookup, | 1857 LookupResult* lookup, |
| 1860 Handle<Name> name) { | 1858 Handle<Name> name) { |
| 1861 Label miss; | 1859 Label miss; |
| 1862 | 1860 |
| 1863 HandlerFrontendHeader(object, receiver(), object, name, &miss); | 1861 HandlerFrontendHeader(object, receiver(), object, name, &miss); |
| 1864 | 1862 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2254 Handle<FunctionTemplateInfo>( | 2252 Handle<FunctionTemplateInfo>( |
| 2255 FunctionTemplateInfo::cast(signature->receiver())); | 2253 FunctionTemplateInfo::cast(signature->receiver())); |
| 2256 } | 2254 } |
| 2257 } | 2255 } |
| 2258 | 2256 |
| 2259 is_simple_api_call_ = true; | 2257 is_simple_api_call_ = true; |
| 2260 } | 2258 } |
| 2261 | 2259 |
| 2262 | 2260 |
| 2263 } } // namespace v8::internal | 2261 } } // namespace v8::internal |
| OLD | NEW |