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

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

Issue 96083005: Remove Reloc::Mode CODE_TARGET_CONTEXT (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Complete for ia32. 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Code::Kind, 131 Code::Kind,
132 ExtraICState extra_state, 132 ExtraICState extra_state,
133 Handle<Name> name, 133 Handle<Name> name,
134 Handle<JSObject> object, 134 Handle<JSObject> object,
135 Handle<GlobalObject> holder, 135 Handle<GlobalObject> holder,
136 Handle<PropertyCell> cell, 136 Handle<PropertyCell> cell,
137 Handle<JSFunction> function); 137 Handle<JSFunction> function);
138 138
139 // --- 139 // ---
140 140
141 Handle<Code> ComputeCallInitialize(int argc, RelocInfo::Mode mode); 141 Handle<Code> ComputeCallInitialize(int argc, ContextualMode mode);
142 142
143 Handle<Code> ComputeKeyedCallInitialize(int argc); 143 Handle<Code> ComputeKeyedCallInitialize(int argc);
144 144
145 Handle<Code> ComputeCallPreMonomorphic(int argc, 145 Handle<Code> ComputeCallPreMonomorphic(int argc,
146 Code::Kind kind, 146 Code::Kind kind,
147 ExtraICState extra_state); 147 ExtraICState extra_state);
148 148
149 Handle<Code> ComputeCallNormal(int argc, 149 Handle<Code> ComputeCallNormal(int argc,
150 Code::Kind kind, 150 Code::Kind kind,
151 ExtraICState state); 151 ExtraICState state);
(...skipping 20 matching lines...) Expand all
172 KeyedAccessStoreMode store_mode, 172 KeyedAccessStoreMode store_mode,
173 StrictModeFlag strict_mode); 173 StrictModeFlag strict_mode);
174 174
175 Handle<Code> ComputePolymorphicIC(TypeHandleList* types, 175 Handle<Code> ComputePolymorphicIC(TypeHandleList* types,
176 CodeHandleList* handlers, 176 CodeHandleList* handlers,
177 int number_of_valid_maps, 177 int number_of_valid_maps,
178 Handle<Name> name, 178 Handle<Name> name,
179 ExtraICState extra_ic_state); 179 ExtraICState extra_ic_state);
180 180
181 // Finds the Code object stored in the Heap::non_monomorphic_cache(). 181 // Finds the Code object stored in the Heap::non_monomorphic_cache().
182 Code* FindCallInitialize(int argc, RelocInfo::Mode mode, Code::Kind kind); 182 Code* FindCallInitialize(int argc, ContextualMode mode, Code::Kind kind);
183 183
184 #ifdef ENABLE_DEBUGGER_SUPPORT 184 #ifdef ENABLE_DEBUGGER_SUPPORT
185 Handle<Code> ComputeCallDebugBreak(int argc, Code::Kind kind); 185 Handle<Code> ComputeCallDebugBreak(int argc, Code::Kind kind);
186 186
187 Handle<Code> ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind); 187 Handle<Code> ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind);
188 #endif 188 #endif
189 189
190 // Update cache for entry hash(name, map). 190 // Update cache for entry hash(name, map).
191 Code* Set(Name* name, Map* map, Code* code); 191 Code* Set(Name* name, Map* map, Code* code);
192 192
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 static const int kInterceptorArgsNameIndex = 0; 256 static const int kInterceptorArgsNameIndex = 0;
257 static const int kInterceptorArgsInfoIndex = 1; 257 static const int kInterceptorArgsInfoIndex = 1;
258 static const int kInterceptorArgsThisIndex = 2; 258 static const int kInterceptorArgsThisIndex = 2;
259 static const int kInterceptorArgsHolderIndex = 3; 259 static const int kInterceptorArgsHolderIndex = 3;
260 static const int kInterceptorArgsLength = 4; 260 static const int kInterceptorArgsLength = 4;
261 261
262 private: 262 private:
263 explicit StubCache(Isolate* isolate); 263 explicit StubCache(Isolate* isolate);
264 264
265 Handle<Code> ComputeCallInitialize(int argc, 265 Handle<Code> ComputeCallInitialize(int argc,
266 RelocInfo::Mode mode, 266 ContextualMode mode,
267 Code::Kind kind); 267 Code::Kind kind);
268 268
269 // The stub cache has a primary and secondary level. The two levels have 269 // The stub cache has a primary and secondary level. The two levels have
270 // different hashing algorithms in order to avoid simultaneous collisions 270 // different hashing algorithms in order to avoid simultaneous collisions
271 // in both caches. Unlike a probing strategy (quadratic or otherwise) the 271 // in both caches. Unlike a probing strategy (quadratic or otherwise) the
272 // update strategy on updates is fairly clear and simple: Any existing entry 272 // update strategy on updates is fairly clear and simple: Any existing entry
273 // in the primary cache is moved to the secondary cache, and secondary cache 273 // in the primary cache is moved to the secondary cache, and secondary cache
274 // entries are overwritten. 274 // entries are overwritten.
275 275
276 // Hash algorithm for the primary table. This algorithm is replicated in 276 // Hash algorithm for the primary table. This algorithm is replicated in
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 MacroAssembler* masm() { return &masm_; } 496 MacroAssembler* masm() { return &masm_; }
497 void set_failure(Failure* failure) { failure_ = failure; } 497 void set_failure(Failure* failure) { failure_ = failure; }
498 498
499 static void LookupPostInterceptor(Handle<JSObject> holder, 499 static void LookupPostInterceptor(Handle<JSObject> holder,
500 Handle<Name> name, 500 Handle<Name> name,
501 LookupResult* lookup); 501 LookupResult* lookup);
502 502
503 Isolate* isolate() { return isolate_; } 503 Isolate* isolate() { return isolate_; }
504 Heap* heap() { return isolate()->heap(); } 504 Heap* heap() { return isolate()->heap(); }
505 Factory* factory() { return isolate()->factory(); } 505 Factory* factory() { return isolate()->factory(); }
506 ContextualMode contextual_mode() {
507 return IC::GetContextualMode(extra_state());
508 }
506 509
507 static void GenerateTailCall(MacroAssembler* masm, Handle<Code> code); 510 static void GenerateTailCall(MacroAssembler* masm, Handle<Code> code);
508 511
509 private: 512 private:
510 Isolate* isolate_; 513 Isolate* isolate_;
511 const ExtraICState extra_ic_state_; 514 const ExtraICState extra_ic_state_;
512 MacroAssembler masm_; 515 MacroAssembler masm_;
513 Failure* failure_; 516 Failure* failure_;
514 }; 517 };
515 518
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 Handle<JSFunction> constant_function_; 1061 Handle<JSFunction> constant_function_;
1059 bool is_simple_api_call_; 1062 bool is_simple_api_call_;
1060 Handle<FunctionTemplateInfo> expected_receiver_type_; 1063 Handle<FunctionTemplateInfo> expected_receiver_type_;
1061 Handle<CallHandlerInfo> api_call_info_; 1064 Handle<CallHandlerInfo> api_call_info_;
1062 }; 1065 };
1063 1066
1064 1067
1065 } } // namespace v8::internal 1068 } } // namespace v8::internal
1066 1069
1067 #endif // V8_STUB_CACHE_H_ 1070 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/builtins.cc ('K') | « src/objects.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698