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

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

Issue 15993016: Remove the optimized construct stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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/x64/stub-cache-x64.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 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 2022
2023 Handle<Code> CallStubCompiler::GetCode(Handle<JSFunction> function) { 2023 Handle<Code> CallStubCompiler::GetCode(Handle<JSFunction> function) {
2024 Handle<String> function_name; 2024 Handle<String> function_name;
2025 if (function->shared()->name()->IsString()) { 2025 if (function->shared()->name()->IsString()) {
2026 function_name = Handle<String>(String::cast(function->shared()->name())); 2026 function_name = Handle<String>(String::cast(function->shared()->name()));
2027 } 2027 }
2028 return GetCode(Code::CONSTANT_FUNCTION, function_name); 2028 return GetCode(Code::CONSTANT_FUNCTION, function_name);
2029 } 2029 }
2030 2030
2031 2031
2032 Handle<Code> ConstructStubCompiler::GetCode() {
2033 Code::Flags flags = Code::ComputeFlags(Code::STUB);
2034 Handle<Code> code = GetCodeWithFlags(flags, "ConstructStub");
2035 PROFILE(isolate(), CodeCreateEvent(Logger::STUB_TAG, *code, "ConstructStub"));
2036 GDBJIT(AddCode(GDBJITInterface::STUB, "ConstructStub", *code));
2037 return code;
2038 }
2039
2040
2041 CallOptimization::CallOptimization(LookupResult* lookup) { 2032 CallOptimization::CallOptimization(LookupResult* lookup) {
2042 if (lookup->IsFound() && 2033 if (lookup->IsFound() &&
2043 lookup->IsCacheable() && 2034 lookup->IsCacheable() &&
2044 lookup->type() == CONSTANT_FUNCTION) { 2035 lookup->type() == CONSTANT_FUNCTION) {
2045 // We only optimize constant function calls. 2036 // We only optimize constant function calls.
2046 Initialize(Handle<JSFunction>(lookup->GetConstantFunction())); 2037 Initialize(Handle<JSFunction>(lookup->GetConstantFunction()));
2047 } else { 2038 } else {
2048 Initialize(Handle<JSFunction>::null()); 2039 Initialize(Handle<JSFunction>::null());
2049 } 2040 }
2050 } 2041 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2104 Handle<FunctionTemplateInfo>( 2095 Handle<FunctionTemplateInfo>(
2105 FunctionTemplateInfo::cast(signature->receiver())); 2096 FunctionTemplateInfo::cast(signature->receiver()));
2106 } 2097 }
2107 } 2098 }
2108 2099
2109 is_simple_api_call_ = true; 2100 is_simple_api_call_ = true;
2110 } 2101 }
2111 2102
2112 2103
2113 } } // namespace v8::internal 2104 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698