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

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

Issue 98853002: StubCompiler gets extra_ic_state member. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 7 years 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/ic.cc ('k') | src/stub-cache.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 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 } else { 1526 } else {
1527 __ Branch(miss, ne, a1, Operand(function)); 1527 __ Branch(miss, ne, a1, Operand(function));
1528 } 1528 }
1529 } 1529 }
1530 1530
1531 1531
1532 void CallStubCompiler::GenerateMissBranch() { 1532 void CallStubCompiler::GenerateMissBranch() {
1533 Handle<Code> code = 1533 Handle<Code> code =
1534 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), 1534 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(),
1535 kind_, 1535 kind_,
1536 extra_state_); 1536 extra_state());
1537 __ Jump(code, RelocInfo::CODE_TARGET); 1537 __ Jump(code, RelocInfo::CODE_TARGET);
1538 } 1538 }
1539 1539
1540 1540
1541 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, 1541 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object,
1542 Handle<JSObject> holder, 1542 Handle<JSObject> holder,
1543 PropertyIndex index, 1543 PropertyIndex index,
1544 Handle<Name> name) { 1544 Handle<Name> name) {
1545 Label miss; 1545 Label miss;
1546 1546
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 // If object is not a string, bail out to regular call. 1916 // If object is not a string, bail out to regular call.
1917 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null(); 1917 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null();
1918 1918
1919 Label miss; 1919 Label miss;
1920 Label name_miss; 1920 Label name_miss;
1921 Label index_out_of_range; 1921 Label index_out_of_range;
1922 1922
1923 Label* index_out_of_range_label = &index_out_of_range; 1923 Label* index_out_of_range_label = &index_out_of_range;
1924 1924
1925 if (kind_ == Code::CALL_IC && 1925 if (kind_ == Code::CALL_IC &&
1926 (CallICBase::StringStubState::decode(extra_state_) == 1926 (CallICBase::StringStubState::decode(extra_state()) ==
1927 DEFAULT_STRING_STUB)) { 1927 DEFAULT_STRING_STUB)) {
1928 index_out_of_range_label = &miss; 1928 index_out_of_range_label = &miss;
1929 } 1929 }
1930 1930
1931 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 1931 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
1932 1932
1933 Register receiver = a0; 1933 Register receiver = a0;
1934 Register index = t1; 1934 Register index = t1;
1935 Register result = a1; 1935 Register result = a1;
1936 const int argc = arguments().immediate(); 1936 const int argc = arguments().immediate();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 Code::StubType type) { 1980 Code::StubType type) {
1981 // If object is not a string, bail out to regular call. 1981 // If object is not a string, bail out to regular call.
1982 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null(); 1982 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null();
1983 1983
1984 const int argc = arguments().immediate(); 1984 const int argc = arguments().immediate();
1985 Label miss; 1985 Label miss;
1986 Label name_miss; 1986 Label name_miss;
1987 Label index_out_of_range; 1987 Label index_out_of_range;
1988 Label* index_out_of_range_label = &index_out_of_range; 1988 Label* index_out_of_range_label = &index_out_of_range;
1989 if (kind_ == Code::CALL_IC && 1989 if (kind_ == Code::CALL_IC &&
1990 (CallICBase::StringStubState::decode(extra_state_) == 1990 (CallICBase::StringStubState::decode(extra_state()) ==
1991 DEFAULT_STRING_STUB)) { 1991 DEFAULT_STRING_STUB)) {
1992 index_out_of_range_label = &miss; 1992 index_out_of_range_label = &miss;
1993 } 1993 }
1994 1994
1995 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 1995 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
1996 1996
1997 Register receiver = a0; 1997 Register receiver = a0;
1998 Register index = t1; 1998 Register index = t1;
1999 Register scratch = a3; 1999 Register scratch = a3;
2000 Register result = a1; 2000 Register result = a1;
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 GenerateNameCheck(name, &miss); 2456 GenerateNameCheck(name, &miss);
2457 2457
2458 // Get the number of arguments. 2458 // Get the number of arguments.
2459 const int argc = arguments().immediate(); 2459 const int argc = arguments().immediate();
2460 LookupResult lookup(isolate()); 2460 LookupResult lookup(isolate());
2461 LookupPostInterceptor(holder, name, &lookup); 2461 LookupPostInterceptor(holder, name, &lookup);
2462 2462
2463 // Get the receiver from the stack. 2463 // Get the receiver from the stack.
2464 __ lw(a1, MemOperand(sp, argc * kPointerSize)); 2464 __ lw(a1, MemOperand(sp, argc * kPointerSize));
2465 2465
2466 CallInterceptorCompiler compiler(this, arguments(), a2, extra_state_); 2466 CallInterceptorCompiler compiler(this, arguments(), a2, extra_state());
2467 compiler.Compile(masm(), object, holder, name, &lookup, a1, a3, t0, a0, 2467 compiler.Compile(masm(), object, holder, name, &lookup, a1, a3, t0, a0,
2468 &miss); 2468 &miss);
2469 2469
2470 // Move returned value, the function to call, to a1. 2470 // Move returned value, the function to call, to a1.
2471 __ mov(a1, v0); 2471 __ mov(a1, v0);
2472 // Restore receiver. 2472 // Restore receiver.
2473 __ lw(a0, MemOperand(sp, argc * kPointerSize)); 2473 __ lw(a0, MemOperand(sp, argc * kPointerSize));
2474 2474
2475 GenerateJumpFunction(object, a1, &miss); 2475 GenerateJumpFunction(object, a1, &miss);
2476 2476
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 // ----------------------------------- 2885 // -----------------------------------
2886 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2886 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2887 } 2887 }
2888 2888
2889 2889
2890 #undef __ 2890 #undef __
2891 2891
2892 } } // namespace v8::internal 2892 } } // namespace v8::internal
2893 2893
2894 #endif // V8_TARGET_ARCH_MIPS 2894 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698