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

Side by Side Diff: src/ia32/stub-cache-ia32.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/arm/stub-cache-arm.cc ('k') | src/ic.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 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 __ cmp(edi, Immediate(function)); 1632 __ cmp(edi, Immediate(function));
1633 } 1633 }
1634 __ j(not_equal, miss); 1634 __ j(not_equal, miss);
1635 } 1635 }
1636 1636
1637 1637
1638 void CallStubCompiler::GenerateMissBranch() { 1638 void CallStubCompiler::GenerateMissBranch() {
1639 Handle<Code> code = 1639 Handle<Code> code =
1640 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), 1640 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(),
1641 kind_, 1641 kind_,
1642 extra_state_); 1642 extra_state());
1643 __ jmp(code, RelocInfo::CODE_TARGET); 1643 __ jmp(code, RelocInfo::CODE_TARGET);
1644 } 1644 }
1645 1645
1646 1646
1647 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, 1647 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object,
1648 Handle<JSObject> holder, 1648 Handle<JSObject> holder,
1649 PropertyIndex index, 1649 PropertyIndex index,
1650 Handle<Name> name) { 1650 Handle<Name> name) {
1651 Label miss; 1651 Label miss;
1652 1652
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 } 2026 }
2027 2027
2028 const int argc = arguments().immediate(); 2028 const int argc = arguments().immediate();
2029 2029
2030 Label miss; 2030 Label miss;
2031 Label name_miss; 2031 Label name_miss;
2032 Label index_out_of_range; 2032 Label index_out_of_range;
2033 Label* index_out_of_range_label = &index_out_of_range; 2033 Label* index_out_of_range_label = &index_out_of_range;
2034 2034
2035 if (kind_ == Code::CALL_IC && 2035 if (kind_ == Code::CALL_IC &&
2036 (CallICBase::StringStubState::decode(extra_state_) == 2036 (CallICBase::StringStubState::decode(extra_state()) ==
2037 DEFAULT_STRING_STUB)) { 2037 DEFAULT_STRING_STUB)) {
2038 index_out_of_range_label = &miss; 2038 index_out_of_range_label = &miss;
2039 } 2039 }
2040 2040
2041 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 2041 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
2042 2042
2043 Register receiver = ebx; 2043 Register receiver = ebx;
2044 Register index = edi; 2044 Register index = edi;
2045 Register result = eax; 2045 Register result = eax;
2046 __ mov(receiver, Operand(esp, (argc + 1) * kPointerSize)); 2046 __ mov(receiver, Operand(esp, (argc + 1) * kPointerSize));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 } 2092 }
2093 2093
2094 const int argc = arguments().immediate(); 2094 const int argc = arguments().immediate();
2095 2095
2096 Label miss; 2096 Label miss;
2097 Label name_miss; 2097 Label name_miss;
2098 Label index_out_of_range; 2098 Label index_out_of_range;
2099 Label* index_out_of_range_label = &index_out_of_range; 2099 Label* index_out_of_range_label = &index_out_of_range;
2100 2100
2101 if (kind_ == Code::CALL_IC && 2101 if (kind_ == Code::CALL_IC &&
2102 (CallICBase::StringStubState::decode(extra_state_) == 2102 (CallICBase::StringStubState::decode(extra_state()) ==
2103 DEFAULT_STRING_STUB)) { 2103 DEFAULT_STRING_STUB)) {
2104 index_out_of_range_label = &miss; 2104 index_out_of_range_label = &miss;
2105 } 2105 }
2106 2106
2107 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 2107 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
2108 2108
2109 Register receiver = eax; 2109 Register receiver = eax;
2110 Register index = edi; 2110 Register index = edi;
2111 Register scratch = edx; 2111 Register scratch = edx;
2112 Register result = eax; 2112 Register result = eax;
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 2582
2583 // Get the number of arguments. 2583 // Get the number of arguments.
2584 const int argc = arguments().immediate(); 2584 const int argc = arguments().immediate();
2585 2585
2586 LookupResult lookup(isolate()); 2586 LookupResult lookup(isolate());
2587 LookupPostInterceptor(holder, name, &lookup); 2587 LookupPostInterceptor(holder, name, &lookup);
2588 2588
2589 // Get the receiver from the stack. 2589 // Get the receiver from the stack.
2590 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 2590 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
2591 2591
2592 CallInterceptorCompiler compiler(this, arguments(), ecx, extra_state_); 2592 CallInterceptorCompiler compiler(this, arguments(), ecx, extra_state());
2593 compiler.Compile(masm(), object, holder, name, &lookup, edx, ebx, edi, eax, 2593 compiler.Compile(masm(), object, holder, name, &lookup, edx, ebx, edi, eax,
2594 &miss); 2594 &miss);
2595 2595
2596 // Restore receiver. 2596 // Restore receiver.
2597 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); 2597 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
2598 2598
2599 GenerateJumpFunction(object, eax, &miss); 2599 GenerateJumpFunction(object, eax, &miss);
2600 2600
2601 HandlerFrontendFooter(&miss); 2601 HandlerFrontendFooter(&miss);
2602 2602
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2992 // ----------------------------------- 2992 // -----------------------------------
2993 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2993 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2994 } 2994 }
2995 2995
2996 2996
2997 #undef __ 2997 #undef __
2998 2998
2999 } } // namespace v8::internal 2999 } } // namespace v8::internal
3000 3000
3001 #endif // V8_TARGET_ARCH_IA32 3001 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698