Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Side by Side Diff: src/builtins.cc

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/builtins.h ('k') | src/cached-powers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 if (is_construct) { 1166 if (is_construct) {
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();
1177 if (shared->is_classic_mode() && !shared->native()) {
1178 Object* recv = args[0];
1179 ASSERT(!recv->IsNull());
1180 if (recv->IsUndefined()) {
1181 args[0] = function->context()->global_object()->global_receiver();
1182 }
1183 }
1184
1176 Object* raw_holder = TypeCheck(heap, args.length(), &args[0], fun_data); 1185 Object* raw_holder = TypeCheck(heap, args.length(), &args[0], fun_data);
1177 1186
1178 if (raw_holder->IsNull()) { 1187 if (raw_holder->IsNull()) {
1179 // This function cannot be called with the given receiver. Abort! 1188 // This function cannot be called with the given receiver. Abort!
1180 Handle<Object> obj = 1189 Handle<Object> obj =
1181 isolate->factory()->NewTypeError( 1190 isolate->factory()->NewTypeError(
1182 "illegal_invocation", HandleVector(&function, 1)); 1191 "illegal_invocation", HandleVector(&function, 1));
1183 return isolate->Throw(*obj); 1192 return isolate->Throw(*obj);
1184 } 1193 }
1185 1194
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 } 1302 }
1294 1303
1295 1304
1296 // Handle calls to non-function objects created through the API. This delegate 1305 // Handle calls to non-function objects created through the API. This delegate
1297 // function is used when the call is a construct call. 1306 // function is used when the call is a construct call.
1298 BUILTIN(HandleApiCallAsConstructor) { 1307 BUILTIN(HandleApiCallAsConstructor) {
1299 return HandleApiCallAsFunctionOrConstructor(isolate, true, args); 1308 return HandleApiCallAsFunctionOrConstructor(isolate, true, args);
1300 } 1309 }
1301 1310
1302 1311
1303 static void Generate_LoadIC_Initialize(MacroAssembler* masm) {
1304 LoadIC::GenerateInitialize(masm);
1305 }
1306
1307
1308 static void Generate_LoadIC_PreMonomorphic(MacroAssembler* masm) {
1309 LoadIC::GeneratePreMonomorphic(masm);
1310 }
1311
1312
1313 static void Generate_LoadIC_Miss(MacroAssembler* masm) { 1312 static void Generate_LoadIC_Miss(MacroAssembler* masm) {
1314 LoadIC::GenerateMiss(masm); 1313 LoadIC::GenerateMiss(masm);
1315 } 1314 }
1316 1315
1317 1316
1318 static void Generate_LoadIC_Megamorphic(MacroAssembler* masm) {
1319 LoadIC::GenerateMegamorphic(masm);
1320 }
1321
1322
1323 static void Generate_LoadIC_Normal(MacroAssembler* masm) { 1317 static void Generate_LoadIC_Normal(MacroAssembler* masm) {
1324 LoadIC::GenerateNormal(masm); 1318 LoadIC::GenerateNormal(masm);
1325 } 1319 }
1326 1320
1327 1321
1328 static void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) { 1322 static void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) {
1329 LoadStubCompiler::GenerateLoadViaGetter( 1323 LoadStubCompiler::GenerateLoadViaGetter(
1330 masm, LoadStubCompiler::registers()[0], Handle<JSFunction>()); 1324 masm, LoadStubCompiler::registers()[0], Handle<JSFunction>());
1331 } 1325 }
1332 1326
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 static void Generate_KeyedLoadIC_NonStrictArguments(MacroAssembler* masm) { 1368 static void Generate_KeyedLoadIC_NonStrictArguments(MacroAssembler* masm) {
1375 KeyedLoadIC::GenerateNonStrictArguments(masm); 1369 KeyedLoadIC::GenerateNonStrictArguments(masm);
1376 } 1370 }
1377 1371
1378 1372
1379 static void Generate_StoreIC_Slow(MacroAssembler* masm) { 1373 static void Generate_StoreIC_Slow(MacroAssembler* masm) {
1380 StoreIC::GenerateSlow(masm); 1374 StoreIC::GenerateSlow(masm);
1381 } 1375 }
1382 1376
1383 1377
1384 static void Generate_StoreIC_Initialize(MacroAssembler* masm) {
1385 StoreIC::GenerateInitialize(masm);
1386 }
1387
1388
1389 static void Generate_StoreIC_Initialize_Strict(MacroAssembler* masm) {
1390 StoreIC::GenerateInitialize(masm);
1391 }
1392
1393
1394 static void Generate_StoreIC_PreMonomorphic(MacroAssembler* masm) {
1395 StoreIC::GeneratePreMonomorphic(masm);
1396 }
1397
1398
1399 static void Generate_StoreIC_PreMonomorphic_Strict(MacroAssembler* masm) {
1400 StoreIC::GeneratePreMonomorphic(masm);
1401 }
1402
1403
1404 static void Generate_StoreIC_Miss(MacroAssembler* masm) { 1378 static void Generate_StoreIC_Miss(MacroAssembler* masm) {
1405 StoreIC::GenerateMiss(masm); 1379 StoreIC::GenerateMiss(masm);
1406 } 1380 }
1407 1381
1408 1382
1409 static void Generate_StoreIC_Normal(MacroAssembler* masm) { 1383 static void Generate_StoreIC_Normal(MacroAssembler* masm) {
1410 StoreIC::GenerateNormal(masm); 1384 StoreIC::GenerateNormal(masm);
1411 } 1385 }
1412 1386
1413 1387
1414 static void Generate_StoreIC_Megamorphic(MacroAssembler* masm) {
1415 StoreIC::GenerateMegamorphic(masm,
1416 StoreIC::ComputeExtraICState(kNonStrictMode));
1417 }
1418
1419
1420 static void Generate_StoreIC_Megamorphic_Strict(MacroAssembler* masm) {
1421 StoreIC::GenerateMegamorphic(masm,
1422 StoreIC::ComputeExtraICState(kStrictMode));
1423 }
1424
1425
1426 static void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { 1388 static void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) {
1427 StoreStubCompiler::GenerateStoreViaSetter(masm, Handle<JSFunction>()); 1389 StoreStubCompiler::GenerateStoreViaSetter(masm, Handle<JSFunction>());
1428 } 1390 }
1429 1391
1430 1392
1431 static void Generate_StoreIC_Generic(MacroAssembler* masm) {
1432 StoreIC::GenerateRuntimeSetProperty(masm, kNonStrictMode);
1433 }
1434
1435
1436 static void Generate_StoreIC_Generic_Strict(MacroAssembler* masm) {
1437 StoreIC::GenerateRuntimeSetProperty(masm, kStrictMode);
1438 }
1439
1440
1441 static void Generate_KeyedStoreIC_Generic(MacroAssembler* masm) { 1393 static void Generate_KeyedStoreIC_Generic(MacroAssembler* masm) {
1442 KeyedStoreIC::GenerateGeneric(masm, kNonStrictMode); 1394 KeyedStoreIC::GenerateGeneric(masm, kNonStrictMode);
1443 } 1395 }
1444 1396
1445 1397
1446 static void Generate_KeyedStoreIC_Generic_Strict(MacroAssembler* masm) { 1398 static void Generate_KeyedStoreIC_Generic_Strict(MacroAssembler* masm) {
1447 KeyedStoreIC::GenerateGeneric(masm, kStrictMode); 1399 KeyedStoreIC::GenerateGeneric(masm, kStrictMode);
1448 } 1400 }
1449 1401
1450 1402
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 } 1741 }
1790 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1742 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1791 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1743 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1792 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 1744 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1793 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1745 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1794 #undef DEFINE_BUILTIN_ACCESSOR_C 1746 #undef DEFINE_BUILTIN_ACCESSOR_C
1795 #undef DEFINE_BUILTIN_ACCESSOR_A 1747 #undef DEFINE_BUILTIN_ACCESSOR_A
1796 1748
1797 1749
1798 } } // namespace v8::internal 1750 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/cached-powers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698