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

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

Issue 25044002: Tag handlers as HANDLER rather than STUB. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 years, 2 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/objects-inl.h ('k') | src/type-info.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 Handle<Code> StubCache::FindLoadHandler(Handle<Name> name, 134 Handle<Code> StubCache::FindLoadHandler(Handle<Name> name,
135 Handle<JSObject> receiver, 135 Handle<JSObject> receiver,
136 Handle<JSObject> stub_holder, 136 Handle<JSObject> stub_holder,
137 Code::Kind kind, 137 Code::Kind kind,
138 Code::StubType type) { 138 Code::StubType type) {
139 InlineCacheHolderFlag holder_flag = receiver.is_identical_to(stub_holder) 139 InlineCacheHolderFlag holder_flag = receiver.is_identical_to(stub_holder)
140 ? OWN_MAP : PROTOTYPE_MAP; 140 ? OWN_MAP : PROTOTYPE_MAP;
141 ASSERT(type != Code::NORMAL); 141 ASSERT(type != Code::NORMAL);
142 Code::Flags flags = Code::ComputeMonomorphicFlags( 142 Code::Flags flags = Code::ComputeMonomorphicFlags(
143 Code::STUB, Code::kNoExtraICState, type, kind, holder_flag); 143 Code::HANDLER, Code::kNoExtraICState, type, kind, holder_flag);
144 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags), 144 Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags),
145 isolate_); 145 isolate_);
146 if (probe->IsCode()) return Handle<Code>::cast(probe); 146 if (probe->IsCode()) return Handle<Code>::cast(probe);
147 return Handle<Code>::null(); 147 return Handle<Code>::null();
148 } 148 }
149 149
150 150
151 Handle<Code> StubCache::FindStoreHandler(Handle<Name> name, 151 Handle<Code> StubCache::FindStoreHandler(Handle<Name> name,
152 Handle<JSObject> receiver, 152 Handle<JSObject> receiver,
153 Code::Kind kind, 153 Code::Kind kind,
154 Code::StubType type, 154 Code::StubType type,
155 StrictModeFlag strict_mode) { 155 StrictModeFlag strict_mode) {
156 Code::ExtraICState extra_ic_state = Code::ComputeExtraICState( 156 Code::ExtraICState extra_ic_state = Code::ComputeExtraICState(
157 STANDARD_STORE, strict_mode); 157 STANDARD_STORE, strict_mode);
158 ASSERT(type != Code::NORMAL); 158 ASSERT(type != Code::NORMAL);
159 Code::Flags flags = Code::ComputeMonomorphicFlags( 159 Code::Flags flags = Code::ComputeMonomorphicFlags(
160 Code::STUB, extra_ic_state, type, kind); 160 Code::HANDLER, extra_ic_state, type, kind);
161 Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags), 161 Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags),
162 isolate_); 162 isolate_);
163 if (probe->IsCode()) return Handle<Code>::cast(probe); 163 if (probe->IsCode()) return Handle<Code>::cast(probe);
164 return Handle<Code>::null(); 164 return Handle<Code>::null();
165 } 165 }
166 166
167 167
168 Handle<Code> StubCache::ComputeMonomorphicLoadIC(Handle<HeapObject> receiver, 168 Handle<Code> StubCache::ComputeMonomorphicLoadIC(Handle<HeapObject> receiver,
169 Handle<Code> handler, 169 Handle<Code> handler,
170 Handle<Name> name) { 170 Handle<Name> name) {
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 JitEvent(name, code); 1980 JitEvent(name, code);
1981 return code; 1981 return code;
1982 } 1982 }
1983 1983
1984 1984
1985 Handle<Code> BaseLoadStubCompiler::GetCode(Code::Kind kind, 1985 Handle<Code> BaseLoadStubCompiler::GetCode(Code::Kind kind,
1986 Code::StubType type, 1986 Code::StubType type,
1987 Handle<Name> name) { 1987 Handle<Name> name) {
1988 ASSERT(type != Code::NORMAL); 1988 ASSERT(type != Code::NORMAL);
1989 Code::Flags flags = Code::ComputeFlags( 1989 Code::Flags flags = Code::ComputeFlags(
1990 Code::STUB, MONOMORPHIC, Code::kNoExtraICState, type, kind); 1990 Code::HANDLER, MONOMORPHIC, Code::kNoExtraICState, type, kind);
1991 Handle<Code> code = GetCodeWithFlags(flags, name); 1991 Handle<Code> code = GetCodeWithFlags(flags, name);
1992 PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name)); 1992 PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name));
1993 JitEvent(name, code); 1993 JitEvent(name, code);
1994 return code; 1994 return code;
1995 } 1995 }
1996 1996
1997 1997
1998 Handle<Code> BaseStoreStubCompiler::GetCode(Code::Kind kind, 1998 Handle<Code> BaseStoreStubCompiler::GetCode(Code::Kind kind,
1999 Code::StubType type, 1999 Code::StubType type,
2000 Handle<Name> name) { 2000 Handle<Name> name) {
2001 ASSERT(type != Code::NORMAL); 2001 ASSERT(type != Code::NORMAL);
2002 Code::Flags flags = Code::ComputeFlags( 2002 Code::Flags flags = Code::ComputeFlags(
2003 Code::STUB, MONOMORPHIC, extra_state(), type, kind); 2003 Code::HANDLER, MONOMORPHIC, extra_state(), type, kind);
2004 Handle<Code> code = GetCodeWithFlags(flags, name); 2004 Handle<Code> code = GetCodeWithFlags(flags, name);
2005 PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name)); 2005 PROFILE(isolate(), CodeCreateEvent(log_kind(code), *code, *name));
2006 JitEvent(name, code); 2006 JitEvent(name, code);
2007 return code; 2007 return code;
2008 } 2008 }
2009 2009
2010 2010
2011 void KeyedLoadStubCompiler::CompileElementHandlers(MapHandleList* receiver_maps, 2011 void KeyedLoadStubCompiler::CompileElementHandlers(MapHandleList* receiver_maps,
2012 CodeHandleList* handlers) { 2012 CodeHandleList* handlers) {
2013 for (int i = 0; i < receiver_maps->length(); ++i) { 2013 for (int i = 0; i < receiver_maps->length(); ++i) {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 Handle<FunctionTemplateInfo>( 2253 Handle<FunctionTemplateInfo>(
2254 FunctionTemplateInfo::cast(signature->receiver())); 2254 FunctionTemplateInfo::cast(signature->receiver()));
2255 } 2255 }
2256 } 2256 }
2257 2257
2258 is_simple_api_call_ = true; 2258 is_simple_api_call_ = true;
2259 } 2259 }
2260 2260
2261 2261
2262 } } // namespace v8::internal 2262 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698