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

Side by Side Diff: src/ic.h

Issue 293023: Added infrastructure for optimizing new CanvasArray types in WebGL... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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/ia32/macro-assembler-ia32.cc ('k') | src/ic.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); } 262 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); }
263 263
264 Object* Load(State state, Handle<Object> object, Handle<Object> key); 264 Object* Load(State state, Handle<Object> object, Handle<Object> key);
265 265
266 // Code generator routines. 266 // Code generator routines.
267 static void GenerateMiss(MacroAssembler* masm); 267 static void GenerateMiss(MacroAssembler* masm);
268 static void GenerateInitialize(MacroAssembler* masm); 268 static void GenerateInitialize(MacroAssembler* masm);
269 static void GeneratePreMonomorphic(MacroAssembler* masm); 269 static void GeneratePreMonomorphic(MacroAssembler* masm);
270 static void GenerateGeneric(MacroAssembler* masm); 270 static void GenerateGeneric(MacroAssembler* masm);
271 271
272 // Generators for external array types. See objects.h.
273 // These are similar to the generic IC; they optimize the case of
274 // operating upon external array types but fall back to the runtime
275 // for all other types.
276 static void GenerateExternalArray(MacroAssembler* masm,
277 ExternalArrayType array_type);
278
272 // Clear the use of the inlined version. 279 // Clear the use of the inlined version.
273 static void ClearInlinedVersion(Address address); 280 static void ClearInlinedVersion(Address address);
274 281
275 private: 282 private:
276 static void Generate(MacroAssembler* masm, const ExternalReference& f); 283 static void Generate(MacroAssembler* masm, const ExternalReference& f);
277 284
278 // Update the inline cache. 285 // Update the inline cache.
279 void UpdateCaches(LookupResult* lookup, 286 void UpdateCaches(LookupResult* lookup,
280 State state, 287 State state,
281 Handle<Object> object, 288 Handle<Object> object,
282 Handle<String> name); 289 Handle<String> name);
283 290
284 // Stub accessors. 291 // Stub accessors.
285 static Code* initialize_stub() { 292 static Code* initialize_stub() {
286 return Builtins::builtin(Builtins::KeyedLoadIC_Initialize); 293 return Builtins::builtin(Builtins::KeyedLoadIC_Initialize);
287 } 294 }
288 static Code* megamorphic_stub() { 295 static Code* megamorphic_stub() {
289 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); 296 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
290 } 297 }
291 static Code* generic_stub() { 298 static Code* generic_stub() {
292 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); 299 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
293 } 300 }
294 static Code* pre_monomorphic_stub() { 301 static Code* pre_monomorphic_stub() {
295 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); 302 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic);
296 } 303 }
304 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
297 305
298 static void Clear(Address address, Code* target); 306 static void Clear(Address address, Code* target);
299 307
300 // Support for patching the map that is checked in an inlined 308 // Support for patching the map that is checked in an inlined
301 // version of keyed load. 309 // version of keyed load.
302 static bool PatchInlinedLoad(Address address, Object* map); 310 static bool PatchInlinedLoad(Address address, Object* map);
303 311
304 friend class IC; 312 friend class IC;
305 }; 313 };
306 314
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 Handle<Object> object, 359 Handle<Object> object,
352 Handle<Object> name, 360 Handle<Object> name,
353 Handle<Object> value); 361 Handle<Object> value);
354 362
355 // Code generators for stub routines. Only called once at startup. 363 // Code generators for stub routines. Only called once at startup.
356 static void GenerateInitialize(MacroAssembler* masm); 364 static void GenerateInitialize(MacroAssembler* masm);
357 static void GenerateMiss(MacroAssembler* masm); 365 static void GenerateMiss(MacroAssembler* masm);
358 static void GenerateGeneric(MacroAssembler* masm); 366 static void GenerateGeneric(MacroAssembler* masm);
359 static void GenerateExtendStorage(MacroAssembler* masm); 367 static void GenerateExtendStorage(MacroAssembler* masm);
360 368
369 // Generators for external array types. See objects.h.
370 // These are similar to the generic IC; they optimize the case of
371 // operating upon external array types but fall back to the runtime
372 // for all other types.
373 static void GenerateExternalArray(MacroAssembler* masm,
374 ExternalArrayType array_type);
375
361 // Clear the inlined version so the IC is always hit. 376 // Clear the inlined version so the IC is always hit.
362 static void ClearInlinedVersion(Address address); 377 static void ClearInlinedVersion(Address address);
363 378
364 // Restore the inlined version so the fast case can get hit. 379 // Restore the inlined version so the fast case can get hit.
365 static void RestoreInlinedVersion(Address address); 380 static void RestoreInlinedVersion(Address address);
366 381
367 private: 382 private:
368 static void Generate(MacroAssembler* masm, const ExternalReference& f); 383 static void Generate(MacroAssembler* masm, const ExternalReference& f);
369 384
370 // Update the inline cache. 385 // Update the inline cache.
371 void UpdateCaches(LookupResult* lookup, 386 void UpdateCaches(LookupResult* lookup,
372 State state, 387 State state,
373 Handle<JSObject> receiver, 388 Handle<JSObject> receiver,
374 Handle<String> name, 389 Handle<String> name,
375 Handle<Object> value); 390 Handle<Object> value);
376 391
377 // Stub accessors. 392 // Stub accessors.
378 static Code* initialize_stub() { 393 static Code* initialize_stub() {
379 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); 394 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize);
380 } 395 }
381 static Code* megamorphic_stub() { 396 static Code* megamorphic_stub() {
382 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 397 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
383 } 398 }
384 static Code* generic_stub() { 399 static Code* generic_stub() {
385 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 400 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
386 } 401 }
402 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
387 403
388 static void Clear(Address address, Code* target); 404 static void Clear(Address address, Code* target);
389 405
390 // Support for patching the map that is checked in an inlined 406 // Support for patching the map that is checked in an inlined
391 // version of keyed store. 407 // version of keyed store.
392 // The address is the patch point for the IC call 408 // The address is the patch point for the IC call
393 // (Assembler::kCallTargetAddressOffset before the end of 409 // (Assembler::kCallTargetAddressOffset before the end of
394 // the call/return address). 410 // the call/return address).
395 // The map is the new map that the inlined code should check against. 411 // The map is the new map that the inlined code should check against.
396 static bool PatchInlinedStore(Address address, Object* map); 412 static bool PatchInlinedStore(Address address, Object* map);
397 413
398 friend class IC; 414 friend class IC;
399 }; 415 };
400 416
401 417
402 } } // namespace v8::internal 418 } } // namespace v8::internal
403 419
404 #endif // V8_IC_H_ 420 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698