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

Side by Side Diff: src/arm/stub-cache-arm.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 | « no previous file | src/ia32/stub-cache-ia32.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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 __ cmp(r1, Operand(function)); 1540 __ cmp(r1, Operand(function));
1541 } 1541 }
1542 __ b(ne, miss); 1542 __ b(ne, miss);
1543 } 1543 }
1544 1544
1545 1545
1546 void CallStubCompiler::GenerateMissBranch() { 1546 void CallStubCompiler::GenerateMissBranch() {
1547 Handle<Code> code = 1547 Handle<Code> code =
1548 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), 1548 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(),
1549 kind_, 1549 kind_,
1550 extra_state_); 1550 extra_state());
1551 __ Jump(code, RelocInfo::CODE_TARGET); 1551 __ Jump(code, RelocInfo::CODE_TARGET);
1552 } 1552 }
1553 1553
1554 1554
1555 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, 1555 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object,
1556 Handle<JSObject> holder, 1556 Handle<JSObject> holder,
1557 PropertyIndex index, 1557 PropertyIndex index,
1558 Handle<Name> name) { 1558 Handle<Name> name) {
1559 Label miss; 1559 Label miss;
1560 1560
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 Code::StubType type) { 1931 Code::StubType type) {
1932 // If object is not a string, bail out to regular call. 1932 // If object is not a string, bail out to regular call.
1933 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null(); 1933 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null();
1934 1934
1935 Label miss; 1935 Label miss;
1936 Label name_miss; 1936 Label name_miss;
1937 Label index_out_of_range; 1937 Label index_out_of_range;
1938 Label* index_out_of_range_label = &index_out_of_range; 1938 Label* index_out_of_range_label = &index_out_of_range;
1939 1939
1940 if (kind_ == Code::CALL_IC && 1940 if (kind_ == Code::CALL_IC &&
1941 (CallICBase::StringStubState::decode(extra_state_) == 1941 (CallICBase::StringStubState::decode(extra_state()) ==
1942 DEFAULT_STRING_STUB)) { 1942 DEFAULT_STRING_STUB)) {
1943 index_out_of_range_label = &miss; 1943 index_out_of_range_label = &miss;
1944 } 1944 }
1945 1945
1946 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 1946 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
1947 1947
1948 Register receiver = r0; 1948 Register receiver = r0;
1949 Register index = r4; 1949 Register index = r4;
1950 Register result = r1; 1950 Register result = r1;
1951 const int argc = arguments().immediate(); 1951 const int argc = arguments().immediate();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 Code::StubType type) { 1997 Code::StubType type) {
1998 // If object is not a string, bail out to regular call. 1998 // If object is not a string, bail out to regular call.
1999 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null(); 1999 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null();
2000 2000
2001 const int argc = arguments().immediate(); 2001 const int argc = arguments().immediate();
2002 Label miss; 2002 Label miss;
2003 Label name_miss; 2003 Label name_miss;
2004 Label index_out_of_range; 2004 Label index_out_of_range;
2005 Label* index_out_of_range_label = &index_out_of_range; 2005 Label* index_out_of_range_label = &index_out_of_range;
2006 if (kind_ == Code::CALL_IC && 2006 if (kind_ == Code::CALL_IC &&
2007 (CallICBase::StringStubState::decode(extra_state_) == 2007 (CallICBase::StringStubState::decode(extra_state()) ==
2008 DEFAULT_STRING_STUB)) { 2008 DEFAULT_STRING_STUB)) {
2009 index_out_of_range_label = &miss; 2009 index_out_of_range_label = &miss;
2010 } 2010 }
2011 2011
2012 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 2012 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
2013 2013
2014 Register receiver = r0; 2014 Register receiver = r0;
2015 Register index = r4; 2015 Register index = r4;
2016 Register scratch = r3; 2016 Register scratch = r3;
2017 Register result = r1; 2017 Register result = r1;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 GenerateNameCheck(name, &miss); 2459 GenerateNameCheck(name, &miss);
2460 2460
2461 // Get the number of arguments. 2461 // Get the number of arguments.
2462 const int argc = arguments().immediate(); 2462 const int argc = arguments().immediate();
2463 LookupResult lookup(isolate()); 2463 LookupResult lookup(isolate());
2464 LookupPostInterceptor(holder, name, &lookup); 2464 LookupPostInterceptor(holder, name, &lookup);
2465 2465
2466 // Get the receiver from the stack. 2466 // Get the receiver from the stack.
2467 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); 2467 __ ldr(r1, MemOperand(sp, argc * kPointerSize));
2468 2468
2469 CallInterceptorCompiler compiler(this, arguments(), r2, extra_state_); 2469 CallInterceptorCompiler compiler(this, arguments(), r2, extra_state());
2470 compiler.Compile(masm(), object, holder, name, &lookup, r1, r3, r4, r0, 2470 compiler.Compile(masm(), object, holder, name, &lookup, r1, r3, r4, r0,
2471 &miss); 2471 &miss);
2472 2472
2473 // Move returned value, the function to call, to r1. 2473 // Move returned value, the function to call, to r1.
2474 __ mov(r1, r0); 2474 __ mov(r1, r0);
2475 // Restore receiver. 2475 // Restore receiver.
2476 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); 2476 __ ldr(r0, MemOperand(sp, argc * kPointerSize));
2477 2477
2478 GenerateJumpFunction(object, r1, &miss); 2478 GenerateJumpFunction(object, r1, &miss);
2479 2479
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 // ----------------------------------- 2891 // -----------------------------------
2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2893 } 2893 }
2894 2894
2895 2895
2896 #undef __ 2896 #undef __
2897 2897
2898 } } // namespace v8::internal 2898 } } // namespace v8::internal
2899 2899
2900 #endif // V8_TARGET_ARCH_ARM 2900 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698