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

Side by Side Diff: src/stub-cache.cc

Issue 7172030: Revert "Merge arguments branch to bleeding merge." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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/stub-cache.h ('k') | src/type-info.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 2011 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
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 Object* probe; 1033 Object* probe;
1034 { MaybeObject* maybe_probe = ProbeCache(isolate_, flags); 1034 { MaybeObject* maybe_probe = ProbeCache(isolate_, flags);
1035 if (!maybe_probe->ToObject(&probe)) return maybe_probe; 1035 if (!maybe_probe->ToObject(&probe)) return maybe_probe;
1036 } 1036 }
1037 if (!probe->IsUndefined()) return probe; 1037 if (!probe->IsUndefined()) return probe;
1038 StubCompiler compiler; 1038 StubCompiler compiler;
1039 return FillCache(isolate_, compiler.CompileCallNormal(flags)); 1039 return FillCache(isolate_, compiler.CompileCallNormal(flags));
1040 } 1040 }
1041 1041
1042 1042
1043 MaybeObject* StubCache::ComputeCallArguments(int argc,
1044 InLoopFlag in_loop,
1045 Code::Kind kind) {
1046 ASSERT(kind == Code::KEYED_CALL_IC);
1047 Code::Flags flags = Code::ComputeFlags(kind,
1048 in_loop,
1049 MEGAMORPHIC,
1050 Code::kNoExtraICState,
1051 NORMAL,
1052 argc);
1053 Object* probe;
1054 { MaybeObject* maybe_probe = ProbeCache(isolate_, flags);
1055 if (!maybe_probe->ToObject(&probe)) return maybe_probe;
1056 }
1057 if (!probe->IsUndefined()) return probe;
1058 StubCompiler compiler;
1059 return FillCache(isolate_, compiler.CompileCallArguments(flags));
1060 }
1061
1062
1063 MaybeObject* StubCache::ComputeCallMegamorphic( 1043 MaybeObject* StubCache::ComputeCallMegamorphic(
1064 int argc, 1044 int argc,
1065 InLoopFlag in_loop, 1045 InLoopFlag in_loop,
1066 Code::Kind kind, 1046 Code::Kind kind,
1067 Code::ExtraICState extra_ic_state) { 1047 Code::ExtraICState extra_ic_state) {
1068 Code::Flags flags = Code::ComputeFlags(kind, 1048 Code::Flags flags = Code::ComputeFlags(kind,
1069 in_loop, 1049 in_loop,
1070 MEGAMORPHIC, 1050 MEGAMORPHIC,
1071 extra_ic_state, 1051 extra_ic_state,
1072 NORMAL, 1052 NORMAL,
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 Code* code = Code::cast(result); 1488 Code* code = Code::cast(result);
1509 USE(code); 1489 USE(code);
1510 PROFILE(isolate(), 1490 PROFILE(isolate(),
1511 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG), 1491 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
1512 code, code->arguments_count())); 1492 code, code->arguments_count()));
1513 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, Code::cast(code))); 1493 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, Code::cast(code)));
1514 return result; 1494 return result;
1515 } 1495 }
1516 1496
1517 1497
1518 MaybeObject* StubCompiler::CompileCallArguments(Code::Flags flags) {
1519 HandleScope scope(isolate());
1520 int argc = Code::ExtractArgumentsCountFromFlags(flags);
1521 KeyedCallIC::GenerateNonStrictArguments(masm(), argc);
1522 Code::Kind kind = Code::ExtractKindFromFlags(flags);
1523 Object* result;
1524 { MaybeObject* maybe_result =
1525 GetCodeWithFlags(flags, "CompileCallArguments");
1526 if (!maybe_result->ToObject(&result)) return maybe_result;
1527 }
1528 Code* code = Code::cast(result);
1529 USE(code);
1530 PROFILE(isolate(),
1531 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
1532 code, code->arguments_count()));
1533 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, Code::cast(code)));
1534 return result;
1535 }
1536
1537
1538 MaybeObject* StubCompiler::CompileCallMiss(Code::Flags flags) { 1498 MaybeObject* StubCompiler::CompileCallMiss(Code::Flags flags) {
1539 HandleScope scope(isolate()); 1499 HandleScope scope(isolate());
1540 int argc = Code::ExtractArgumentsCountFromFlags(flags); 1500 int argc = Code::ExtractArgumentsCountFromFlags(flags);
1541 Code::Kind kind = Code::ExtractKindFromFlags(flags); 1501 Code::Kind kind = Code::ExtractKindFromFlags(flags);
1542 Code::ExtraICState extra_ic_state = Code::ExtractExtraICStateFromFlags(flags); 1502 Code::ExtraICState extra_ic_state = Code::ExtractExtraICStateFromFlags(flags);
1543 if (kind == Code::CALL_IC) { 1503 if (kind == Code::CALL_IC) {
1544 CallIC::GenerateMiss(masm(), argc, extra_ic_state); 1504 CallIC::GenerateMiss(masm(), argc, extra_ic_state);
1545 } else { 1505 } else {
1546 KeyedCallIC::GenerateMiss(masm(), argc); 1506 KeyedCallIC::GenerateMiss(masm(), argc);
1547 } 1507 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 expected_receiver_type_ = 1870 expected_receiver_type_ =
1911 FunctionTemplateInfo::cast(signature->receiver()); 1871 FunctionTemplateInfo::cast(signature->receiver());
1912 } 1872 }
1913 } 1873 }
1914 1874
1915 is_simple_api_call_ = true; 1875 is_simple_api_call_ = true;
1916 } 1876 }
1917 1877
1918 1878
1919 } } // namespace v8::internal 1879 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698