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

Side by Side Diff: src/builtins.cc

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 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/code.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 // with this receiver. Returns Heap::null_value() if the call is 1027 // with this receiver. Returns Heap::null_value() if the call is
1028 // illegal. Any arguments that don't fit the expected type is 1028 // illegal. Any arguments that don't fit the expected type is
1029 // overwritten with undefined. Arguments that do fit the expected 1029 // overwritten with undefined. Arguments that do fit the expected
1030 // type is overwritten with the object in the prototype chain that 1030 // type is overwritten with the object in the prototype chain that
1031 // actually has that type. 1031 // actually has that type.
1032 static inline Object* TypeCheck(Heap* heap, 1032 static inline Object* TypeCheck(Heap* heap,
1033 int argc, 1033 int argc,
1034 Object** argv, 1034 Object** argv,
1035 FunctionTemplateInfo* info) { 1035 FunctionTemplateInfo* info) {
1036 Object* recv = argv[0]; 1036 Object* recv = argv[0];
1037 // API calls are only supported with JSObject receivers.
1038 if (!recv->IsJSObject()) return heap->null_value();
1037 Object* sig_obj = info->signature(); 1039 Object* sig_obj = info->signature();
1038 if (sig_obj->IsUndefined()) return recv; 1040 if (sig_obj->IsUndefined()) return recv;
1039 SignatureInfo* sig = SignatureInfo::cast(sig_obj); 1041 SignatureInfo* sig = SignatureInfo::cast(sig_obj);
1040 // If necessary, check the receiver 1042 // If necessary, check the receiver
1041 Object* recv_type = sig->receiver(); 1043 Object* recv_type = sig->receiver();
1042 1044
1043 Object* holder = recv; 1045 Object* holder = recv;
1044 if (!recv_type->IsUndefined()) { 1046 if (!recv_type->IsUndefined()) {
1045 for (; holder != heap->null_value(); holder = holder->GetPrototype()) { 1047 for (; holder != heap->null_value(); holder = holder->GetPrototype()) {
1046 if (holder->IsInstanceOf(FunctionTemplateInfo::cast(recv_type))) { 1048 if (holder->IsInstanceOf(FunctionTemplateInfo::cast(recv_type))) {
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 static void Generate_LoadIC_Normal(MacroAssembler* masm) { 1342 static void Generate_LoadIC_Normal(MacroAssembler* masm) {
1341 LoadIC::GenerateNormal(masm); 1343 LoadIC::GenerateNormal(masm);
1342 } 1344 }
1343 1345
1344 1346
1345 static void Generate_KeyedLoadIC_Initialize(MacroAssembler* masm) { 1347 static void Generate_KeyedLoadIC_Initialize(MacroAssembler* masm) {
1346 KeyedLoadIC::GenerateInitialize(masm); 1348 KeyedLoadIC::GenerateInitialize(masm);
1347 } 1349 }
1348 1350
1349 1351
1352 static void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) {
1353 KeyedLoadIC::GenerateRuntimeGetProperty(masm);
1354 }
1355
1356
1350 static void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) { 1357 static void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) {
1351 KeyedLoadIC::GenerateMiss(masm); 1358 KeyedLoadIC::GenerateMiss(masm, false);
1359 }
1360
1361
1362 static void Generate_KeyedLoadIC_MissForceGeneric(MacroAssembler* masm) {
1363 KeyedLoadIC::GenerateMiss(masm, true);
1352 } 1364 }
1353 1365
1354 1366
1355 static void Generate_KeyedLoadIC_Generic(MacroAssembler* masm) { 1367 static void Generate_KeyedLoadIC_Generic(MacroAssembler* masm) {
1356 KeyedLoadIC::GenerateGeneric(masm); 1368 KeyedLoadIC::GenerateGeneric(masm);
1357 } 1369 }
1358 1370
1359 1371
1360 static void Generate_KeyedLoadIC_String(MacroAssembler* masm) { 1372 static void Generate_KeyedLoadIC_String(MacroAssembler* masm) {
1361 KeyedLoadIC::GenerateString(masm); 1373 KeyedLoadIC::GenerateString(masm);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 KeyedStoreIC::GenerateGeneric(masm, kNonStrictMode); 1442 KeyedStoreIC::GenerateGeneric(masm, kNonStrictMode);
1431 } 1443 }
1432 1444
1433 1445
1434 static void Generate_KeyedStoreIC_Generic_Strict(MacroAssembler* masm) { 1446 static void Generate_KeyedStoreIC_Generic_Strict(MacroAssembler* masm) {
1435 KeyedStoreIC::GenerateGeneric(masm, kStrictMode); 1447 KeyedStoreIC::GenerateGeneric(masm, kStrictMode);
1436 } 1448 }
1437 1449
1438 1450
1439 static void Generate_KeyedStoreIC_Miss(MacroAssembler* masm) { 1451 static void Generate_KeyedStoreIC_Miss(MacroAssembler* masm) {
1440 KeyedStoreIC::GenerateMiss(masm); 1452 KeyedStoreIC::GenerateMiss(masm, false);
1453 }
1454
1455
1456 static void Generate_KeyedStoreIC_MissForceGeneric(MacroAssembler* masm) {
1457 KeyedStoreIC::GenerateMiss(masm, true);
1458 }
1459
1460
1461 static void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) {
1462 KeyedStoreIC::GenerateSlow(masm);
1441 } 1463 }
1442 1464
1443 1465
1444 static void Generate_KeyedStoreIC_Initialize(MacroAssembler* masm) { 1466 static void Generate_KeyedStoreIC_Initialize(MacroAssembler* masm) {
1445 KeyedStoreIC::GenerateInitialize(masm); 1467 KeyedStoreIC::GenerateInitialize(masm);
1446 } 1468 }
1447 1469
1448 1470
1449 static void Generate_KeyedStoreIC_Initialize_Strict(MacroAssembler* masm) { 1471 static void Generate_KeyedStoreIC_Initialize_Strict(MacroAssembler* masm) {
1450 KeyedStoreIC::GenerateInitialize(masm); 1472 KeyedStoreIC::GenerateInitialize(masm);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 return Handle<Code>(code_address); \ 1729 return Handle<Code>(code_address); \
1708 } 1730 }
1709 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1731 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1710 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1732 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1711 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1733 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1712 #undef DEFINE_BUILTIN_ACCESSOR_C 1734 #undef DEFINE_BUILTIN_ACCESSOR_C
1713 #undef DEFINE_BUILTIN_ACCESSOR_A 1735 #undef DEFINE_BUILTIN_ACCESSOR_A
1714 1736
1715 1737
1716 } } // namespace v8::internal 1738 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698