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

Side by Side Diff: src/x64/stub-cache-x64.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/stub-cache.cc ('k') | no next file » | 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 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 __ Cmp(rdi, function); 1565 __ Cmp(rdi, function);
1566 } 1566 }
1567 __ j(not_equal, miss); 1567 __ j(not_equal, miss);
1568 } 1568 }
1569 1569
1570 1570
1571 void CallStubCompiler::GenerateMissBranch() { 1571 void CallStubCompiler::GenerateMissBranch() {
1572 Handle<Code> code = 1572 Handle<Code> code =
1573 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), 1573 isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(),
1574 kind_, 1574 kind_,
1575 extra_state_); 1575 extra_state());
1576 __ Jump(code, RelocInfo::CODE_TARGET); 1576 __ Jump(code, RelocInfo::CODE_TARGET);
1577 } 1577 }
1578 1578
1579 1579
1580 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, 1580 Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object,
1581 Handle<JSObject> holder, 1581 Handle<JSObject> holder,
1582 PropertyIndex index, 1582 PropertyIndex index,
1583 Handle<Name> name) { 1583 Handle<Name> name) {
1584 Label miss; 1584 Label miss;
1585 1585
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 Handle<String> name, 1950 Handle<String> name,
1951 Code::StubType type) { 1951 Code::StubType type) {
1952 // If object is not a string, bail out to regular call. 1952 // If object is not a string, bail out to regular call.
1953 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null(); 1953 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null();
1954 1954
1955 Label miss; 1955 Label miss;
1956 Label name_miss; 1956 Label name_miss;
1957 Label index_out_of_range; 1957 Label index_out_of_range;
1958 Label* index_out_of_range_label = &index_out_of_range; 1958 Label* index_out_of_range_label = &index_out_of_range;
1959 if (kind_ == Code::CALL_IC && 1959 if (kind_ == Code::CALL_IC &&
1960 (CallICBase::StringStubState::decode(extra_state_) == 1960 (CallICBase::StringStubState::decode(extra_state()) ==
1961 DEFAULT_STRING_STUB)) { 1961 DEFAULT_STRING_STUB)) {
1962 index_out_of_range_label = &miss; 1962 index_out_of_range_label = &miss;
1963 } 1963 }
1964 1964
1965 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 1965 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
1966 1966
1967 Register receiver = rbx; 1967 Register receiver = rbx;
1968 Register index = rdi; 1968 Register index = rdi;
1969 Register result = rax; 1969 Register result = rax;
1970 const int argc = arguments().immediate(); 1970 const int argc = arguments().immediate();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null(); 2017 if (!object->IsString() || !cell.is_null()) return Handle<Code>::null();
2018 2018
2019 const int argc = arguments().immediate(); 2019 const int argc = arguments().immediate();
2020 StackArgumentsAccessor args(rsp, argc); 2020 StackArgumentsAccessor args(rsp, argc);
2021 2021
2022 Label miss; 2022 Label miss;
2023 Label name_miss; 2023 Label name_miss;
2024 Label index_out_of_range; 2024 Label index_out_of_range;
2025 Label* index_out_of_range_label = &index_out_of_range; 2025 Label* index_out_of_range_label = &index_out_of_range;
2026 if (kind_ == Code::CALL_IC && 2026 if (kind_ == Code::CALL_IC &&
2027 (CallICBase::StringStubState::decode(extra_state_) == 2027 (CallICBase::StringStubState::decode(extra_state()) ==
2028 DEFAULT_STRING_STUB)) { 2028 DEFAULT_STRING_STUB)) {
2029 index_out_of_range_label = &miss; 2029 index_out_of_range_label = &miss;
2030 } 2030 }
2031 2031
2032 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss); 2032 HandlerFrontendHeader(object, holder, name, STRING_CHECK, &name_miss);
2033 2033
2034 Register receiver = rax; 2034 Register receiver = rax;
2035 Register index = rdi; 2035 Register index = rdi;
2036 Register scratch = rdx; 2036 Register scratch = rdx;
2037 Register result = rax; 2037 Register result = rax;
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 Label miss; 2490 Label miss;
2491 GenerateNameCheck(name, &miss); 2491 GenerateNameCheck(name, &miss);
2492 2492
2493 LookupResult lookup(isolate()); 2493 LookupResult lookup(isolate());
2494 LookupPostInterceptor(holder, name, &lookup); 2494 LookupPostInterceptor(holder, name, &lookup);
2495 2495
2496 // Get the receiver from the stack. 2496 // Get the receiver from the stack.
2497 StackArgumentsAccessor args(rsp, arguments()); 2497 StackArgumentsAccessor args(rsp, arguments());
2498 __ movq(rdx, args.GetReceiverOperand()); 2498 __ movq(rdx, args.GetReceiverOperand());
2499 2499
2500 CallInterceptorCompiler compiler(this, arguments(), rcx, extra_state_); 2500 CallInterceptorCompiler compiler(this, arguments(), rcx, extra_state());
2501 compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax, 2501 compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax,
2502 &miss); 2502 &miss);
2503 2503
2504 // Restore receiver. 2504 // Restore receiver.
2505 __ movq(rdx, args.GetReceiverOperand()); 2505 __ movq(rdx, args.GetReceiverOperand());
2506 2506
2507 GenerateJumpFunction(object, rax, &miss); 2507 GenerateJumpFunction(object, rax, &miss);
2508 2508
2509 HandlerFrontendFooter(&miss); 2509 HandlerFrontendFooter(&miss);
2510 2510
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 // ----------------------------------- 2911 // -----------------------------------
2912 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2912 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2913 } 2913 }
2914 2914
2915 2915
2916 #undef __ 2916 #undef __
2917 2917
2918 } } // namespace v8::internal 2918 } } // namespace v8::internal
2919 2919
2920 #endif // V8_TARGET_ARCH_X64 2920 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698