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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 Handle<FunctionTemplateInfo> desc(fun_data, isolate); | 1167 Handle<FunctionTemplateInfo> desc(fun_data, isolate); |
1168 bool pending_exception = false; | 1168 bool pending_exception = false; |
1169 isolate->factory()->ConfigureInstance( | 1169 isolate->factory()->ConfigureInstance( |
1170 desc, Handle<JSObject>::cast(args.receiver()), &pending_exception); | 1170 desc, Handle<JSObject>::cast(args.receiver()), &pending_exception); |
1171 ASSERT(isolate->has_pending_exception() == pending_exception); | 1171 ASSERT(isolate->has_pending_exception() == pending_exception); |
1172 if (pending_exception) return Failure::Exception(); | 1172 if (pending_exception) return Failure::Exception(); |
1173 fun_data = *desc; | 1173 fun_data = *desc; |
1174 } | 1174 } |
1175 | 1175 |
1176 SharedFunctionInfo* shared = function->shared(); | 1176 SharedFunctionInfo* shared = function->shared(); |
1177 if (shared->is_classic_mode() && !shared->native()) { | 1177 if (shared->is_sloppy_mode() && !shared->native()) { |
1178 Object* recv = args[0]; | 1178 Object* recv = args[0]; |
1179 ASSERT(!recv->IsNull()); | 1179 ASSERT(!recv->IsNull()); |
1180 if (recv->IsUndefined()) { | 1180 if (recv->IsUndefined()) { |
1181 args[0] = function->context()->global_object()->global_receiver(); | 1181 args[0] = function->context()->global_object()->global_receiver(); |
1182 } | 1182 } |
1183 } | 1183 } |
1184 | 1184 |
1185 Object* raw_holder = TypeCheck(heap, args.length(), &args[0], fun_data); | 1185 Object* raw_holder = TypeCheck(heap, args.length(), &args[0], fun_data); |
1186 | 1186 |
1187 if (raw_holder->IsNull()) { | 1187 if (raw_holder->IsNull()) { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 static void Generate_KeyedLoadIC_PreMonomorphic(MacroAssembler* masm) { | 1359 static void Generate_KeyedLoadIC_PreMonomorphic(MacroAssembler* masm) { |
1360 KeyedLoadIC::GeneratePreMonomorphic(masm); | 1360 KeyedLoadIC::GeneratePreMonomorphic(masm); |
1361 } | 1361 } |
1362 | 1362 |
1363 | 1363 |
1364 static void Generate_KeyedLoadIC_IndexedInterceptor(MacroAssembler* masm) { | 1364 static void Generate_KeyedLoadIC_IndexedInterceptor(MacroAssembler* masm) { |
1365 KeyedLoadIC::GenerateIndexedInterceptor(masm); | 1365 KeyedLoadIC::GenerateIndexedInterceptor(masm); |
1366 } | 1366 } |
1367 | 1367 |
1368 | 1368 |
1369 static void Generate_KeyedLoadIC_NonStrictArguments(MacroAssembler* masm) { | 1369 static void Generate_KeyedLoadIC_SloppyArguments(MacroAssembler* masm) { |
1370 KeyedLoadIC::GenerateNonStrictArguments(masm); | 1370 KeyedLoadIC::GenerateSloppyArguments(masm); |
1371 } | 1371 } |
1372 | 1372 |
1373 | 1373 |
1374 static void Generate_StoreIC_Slow(MacroAssembler* masm) { | 1374 static void Generate_StoreIC_Slow(MacroAssembler* masm) { |
1375 StoreIC::GenerateSlow(masm); | 1375 StoreIC::GenerateSlow(masm); |
1376 } | 1376 } |
1377 | 1377 |
1378 | 1378 |
1379 static void Generate_StoreIC_Miss(MacroAssembler* masm) { | 1379 static void Generate_StoreIC_Miss(MacroAssembler* masm) { |
1380 StoreIC::GenerateMiss(masm); | 1380 StoreIC::GenerateMiss(masm); |
1381 } | 1381 } |
1382 | 1382 |
1383 | 1383 |
1384 static void Generate_StoreIC_Normal(MacroAssembler* masm) { | 1384 static void Generate_StoreIC_Normal(MacroAssembler* masm) { |
1385 StoreIC::GenerateNormal(masm); | 1385 StoreIC::GenerateNormal(masm); |
1386 } | 1386 } |
1387 | 1387 |
1388 | 1388 |
1389 static void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { | 1389 static void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { |
1390 StoreStubCompiler::GenerateStoreViaSetter( | 1390 StoreStubCompiler::GenerateStoreViaSetter( |
1391 masm, Handle<HeapType>::null(), Handle<JSFunction>()); | 1391 masm, Handle<HeapType>::null(), Handle<JSFunction>()); |
1392 } | 1392 } |
1393 | 1393 |
1394 | 1394 |
1395 static void Generate_KeyedStoreIC_Generic(MacroAssembler* masm) { | 1395 static void Generate_KeyedStoreIC_Generic(MacroAssembler* masm) { |
1396 KeyedStoreIC::GenerateGeneric(masm, kNonStrictMode); | 1396 KeyedStoreIC::GenerateGeneric(masm, kSloppyMode); |
1397 } | 1397 } |
1398 | 1398 |
1399 | 1399 |
1400 static void Generate_KeyedStoreIC_Generic_Strict(MacroAssembler* masm) { | 1400 static void Generate_KeyedStoreIC_Generic_Strict(MacroAssembler* masm) { |
1401 KeyedStoreIC::GenerateGeneric(masm, kStrictMode); | 1401 KeyedStoreIC::GenerateGeneric(masm, kStrictMode); |
1402 } | 1402 } |
1403 | 1403 |
1404 | 1404 |
1405 static void Generate_KeyedStoreIC_Miss(MacroAssembler* masm) { | 1405 static void Generate_KeyedStoreIC_Miss(MacroAssembler* masm) { |
1406 KeyedStoreIC::GenerateMiss(masm); | 1406 KeyedStoreIC::GenerateMiss(masm); |
(...skipping 18 matching lines...) Expand all Loading... |
1425 static void Generate_KeyedStoreIC_PreMonomorphic(MacroAssembler* masm) { | 1425 static void Generate_KeyedStoreIC_PreMonomorphic(MacroAssembler* masm) { |
1426 KeyedStoreIC::GeneratePreMonomorphic(masm); | 1426 KeyedStoreIC::GeneratePreMonomorphic(masm); |
1427 } | 1427 } |
1428 | 1428 |
1429 | 1429 |
1430 static void Generate_KeyedStoreIC_PreMonomorphic_Strict(MacroAssembler* masm) { | 1430 static void Generate_KeyedStoreIC_PreMonomorphic_Strict(MacroAssembler* masm) { |
1431 KeyedStoreIC::GeneratePreMonomorphic(masm); | 1431 KeyedStoreIC::GeneratePreMonomorphic(masm); |
1432 } | 1432 } |
1433 | 1433 |
1434 | 1434 |
1435 static void Generate_KeyedStoreIC_NonStrictArguments(MacroAssembler* masm) { | 1435 static void Generate_KeyedStoreIC_SloppyArguments(MacroAssembler* masm) { |
1436 KeyedStoreIC::GenerateNonStrictArguments(masm); | 1436 KeyedStoreIC::GenerateSloppyArguments(masm); |
1437 } | 1437 } |
1438 | 1438 |
1439 | 1439 |
1440 #ifdef ENABLE_DEBUGGER_SUPPORT | 1440 #ifdef ENABLE_DEBUGGER_SUPPORT |
1441 static void Generate_LoadIC_DebugBreak(MacroAssembler* masm) { | 1441 static void Generate_LoadIC_DebugBreak(MacroAssembler* masm) { |
1442 Debug::GenerateLoadICDebugBreak(masm); | 1442 Debug::GenerateLoadICDebugBreak(masm); |
1443 } | 1443 } |
1444 | 1444 |
1445 | 1445 |
1446 static void Generate_StoreIC_DebugBreak(MacroAssembler* masm) { | 1446 static void Generate_StoreIC_DebugBreak(MacroAssembler* masm) { |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 } | 1741 } |
1742 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1742 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
1743 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1743 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
1744 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1744 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
1745 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1745 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
1746 #undef DEFINE_BUILTIN_ACCESSOR_C | 1746 #undef DEFINE_BUILTIN_ACCESSOR_C |
1747 #undef DEFINE_BUILTIN_ACCESSOR_A | 1747 #undef DEFINE_BUILTIN_ACCESSOR_A |
1748 | 1748 |
1749 | 1749 |
1750 } } // namespace v8::internal | 1750 } } // namespace v8::internal |
OLD | NEW |