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

Unified Diff: src/stub-cache.cc

Issue 19485008: Replace CONSTANT_FUNCTION by CONSTANT (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index d554d0cb0a5bb9a1490a0e8b7cd07e382382e432..73c7a0a2087df8113758b0945ee60046098a283c 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -335,10 +335,10 @@ Handle<Code> StubCache::ComputeLoadViaGetter(Handle<Name> name,
Handle<Code> StubCache::ComputeLoadConstant(Handle<Name> name,
Handle<JSObject> receiver,
Handle<JSObject> holder,
- Handle<JSFunction> value) {
+ Handle<Object> value) {
Handle<JSObject> stub_holder = StubHolder(receiver, holder);
Handle<Code> handler = FindLoadHandler(
- name, receiver, stub_holder, Code::LOAD_IC, Code::CONSTANT_FUNCTION);
+ name, receiver, stub_holder, Code::LOAD_IC, Code::CONSTANT);
if (!handler.is_null()) return handler;
LoadStubCompiler compiler(isolate_);
@@ -417,11 +417,11 @@ Handle<Code> StubCache::ComputeKeyedLoadField(Handle<Name> name,
Handle<Code> StubCache::ComputeKeyedLoadConstant(Handle<Name> name,
Handle<JSObject> receiver,
Handle<JSObject> holder,
- Handle<JSFunction> value) {
+ Handle<Object> value) {
Handle<JSObject> stub_holder = StubHolder(receiver, holder);
Handle<Code> handler = FindLoadHandler(
name, receiver, stub_holder, Code::KEYED_LOAD_IC,
- Code::CONSTANT_FUNCTION);
+ Code::CONSTANT);
if (!handler.is_null()) return handler;
KeyedLoadStubCompiler compiler(isolate_);
@@ -698,7 +698,7 @@ Handle<Code> StubCache::ComputeCallConstant(int argc,
}
Code::Flags flags = Code::ComputeMonomorphicFlags(
- kind, extra_state, Code::CONSTANT_FUNCTION, argc, cache_holder);
+ kind, extra_state, Code::CONSTANT, argc, cache_holder);
Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags),
isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
@@ -1619,14 +1619,14 @@ Handle<Code> BaseLoadStubCompiler::CompileLoadConstant(
Handle<JSObject> object,
Handle<JSObject> holder,
Handle<Name> name,
- Handle<JSFunction> value) {
+ Handle<Object> value) {
Label success;
HandlerFrontend(object, receiver(), holder, name, &success);
__ bind(&success);
GenerateLoadConstant(value);
// Return the generated code.
- return GetCode(kind(), Code::CONSTANT_FUNCTION, name);
+ return GetCode(kind(), Code::CONSTANT, name);
}
@@ -2130,14 +2130,14 @@ Handle<Code> CallStubCompiler::GetCode(Handle<JSFunction> function) {
if (function->shared()->name()->IsString()) {
function_name = Handle<String>(String::cast(function->shared()->name()));
}
- return GetCode(Code::CONSTANT_FUNCTION, function_name);
+ return GetCode(Code::CONSTANT, function_name);
}
CallOptimization::CallOptimization(LookupResult* lookup) {
if (lookup->IsFound() &&
lookup->IsCacheable() &&
- lookup->type() == CONSTANT_FUNCTION) {
+ lookup->IsConstantFunction()) {
// We only optimize constant function calls.
Initialize(Handle<JSFunction>(lookup->GetConstantFunction()));
} else {
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698