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

Side by Side Diff: src/ic.h

Issue 6303012: Truncate rather than round to nearest when performing float-to-integer... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // Code generator routines. 338 // Code generator routines.
339 static void GenerateMiss(MacroAssembler* masm); 339 static void GenerateMiss(MacroAssembler* masm);
340 static void GenerateRuntimeGetProperty(MacroAssembler* masm); 340 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
341 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 341 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
342 static void GeneratePreMonomorphic(MacroAssembler* masm) { 342 static void GeneratePreMonomorphic(MacroAssembler* masm) {
343 GenerateMiss(masm); 343 GenerateMiss(masm);
344 } 344 }
345 static void GenerateGeneric(MacroAssembler* masm); 345 static void GenerateGeneric(MacroAssembler* masm);
346 static void GenerateString(MacroAssembler* masm); 346 static void GenerateString(MacroAssembler* masm);
347 347
348 // Generators for external array types. See objects.h.
349 // These are similar to the generic IC; they optimize the case of
350 // operating upon external array types but fall back to the runtime
351 // for all other types.
352 static void GenerateExternalArray(MacroAssembler* masm,
353 ExternalArrayType array_type);
354 static void GenerateIndexedInterceptor(MacroAssembler* masm); 348 static void GenerateIndexedInterceptor(MacroAssembler* masm);
355 349
356 // Clear the use of the inlined version. 350 // Clear the use of the inlined version.
357 static void ClearInlinedVersion(Address address); 351 static void ClearInlinedVersion(Address address);
358 352
359 // Bit mask to be tested against bit field for the cases when 353 // Bit mask to be tested against bit field for the cases when
360 // generic stub should go into slow case. 354 // generic stub should go into slow case.
361 // Access check is necessary explicitly since generic stub does not perform 355 // Access check is necessary explicitly since generic stub does not perform
362 // map checks. 356 // map checks.
363 static const int kSlowCaseBitFieldMask = 357 static const int kSlowCaseBitFieldMask =
(...skipping 15 matching lines...) Expand all
379 } 373 }
380 static Code* generic_stub() { 374 static Code* generic_stub() {
381 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); 375 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
382 } 376 }
383 static Code* pre_monomorphic_stub() { 377 static Code* pre_monomorphic_stub() {
384 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); 378 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic);
385 } 379 }
386 static Code* string_stub() { 380 static Code* string_stub() {
387 return Builtins::builtin(Builtins::KeyedLoadIC_String); 381 return Builtins::builtin(Builtins::KeyedLoadIC_String);
388 } 382 }
389 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
390 383
391 static Code* indexed_interceptor_stub() { 384 static Code* indexed_interceptor_stub() {
392 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor); 385 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor);
393 } 386 }
394 387
395 static void Clear(Address address, Code* target); 388 static void Clear(Address address, Code* target);
396 389
397 // Support for patching the map that is checked in an inlined 390 // Support for patching the map that is checked in an inlined
398 // version of keyed load. 391 // version of keyed load.
399 static bool PatchInlinedLoad(Address address, Object* map); 392 static bool PatchInlinedLoad(Address address, Object* map);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 Handle<Object> object, 456 Handle<Object> object,
464 Handle<Object> name, 457 Handle<Object> name,
465 Handle<Object> value); 458 Handle<Object> value);
466 459
467 // Code generators for stub routines. Only called once at startup. 460 // Code generators for stub routines. Only called once at startup.
468 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 461 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
469 static void GenerateMiss(MacroAssembler* masm); 462 static void GenerateMiss(MacroAssembler* masm);
470 static void GenerateRuntimeSetProperty(MacroAssembler* masm); 463 static void GenerateRuntimeSetProperty(MacroAssembler* masm);
471 static void GenerateGeneric(MacroAssembler* masm); 464 static void GenerateGeneric(MacroAssembler* masm);
472 465
473 // Generators for external array types. See objects.h.
474 // These are similar to the generic IC; they optimize the case of
475 // operating upon external array types but fall back to the runtime
476 // for all other types.
477 static void GenerateExternalArray(MacroAssembler* masm,
478 ExternalArrayType array_type);
479
480 // Clear the inlined version so the IC is always hit. 466 // Clear the inlined version so the IC is always hit.
481 static void ClearInlinedVersion(Address address); 467 static void ClearInlinedVersion(Address address);
482 468
483 // Restore the inlined version so the fast case can get hit. 469 // Restore the inlined version so the fast case can get hit.
484 static void RestoreInlinedVersion(Address address); 470 static void RestoreInlinedVersion(Address address);
485 471
486 private: 472 private:
487 // Update the inline cache. 473 // Update the inline cache.
488 void UpdateCaches(LookupResult* lookup, 474 void UpdateCaches(LookupResult* lookup,
489 State state, 475 State state,
490 Handle<JSObject> receiver, 476 Handle<JSObject> receiver,
491 Handle<String> name, 477 Handle<String> name,
492 Handle<Object> value); 478 Handle<Object> value);
493 479
494 // Stub accessors. 480 // Stub accessors.
495 static Code* initialize_stub() { 481 static Code* initialize_stub() {
496 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); 482 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize);
497 } 483 }
498 static Code* megamorphic_stub() { 484 static Code* megamorphic_stub() {
499 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 485 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
500 } 486 }
501 static Code* generic_stub() { 487 static Code* generic_stub() {
502 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 488 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
503 } 489 }
504 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
505 490
506 static void Clear(Address address, Code* target); 491 static void Clear(Address address, Code* target);
507 492
508 // Support for patching the map that is checked in an inlined 493 // Support for patching the map that is checked in an inlined
509 // version of keyed store. 494 // version of keyed store.
510 // The address is the patch point for the IC call 495 // The address is the patch point for the IC call
511 // (Assembler::kCallTargetAddressOffset before the end of 496 // (Assembler::kCallTargetAddressOffset before the end of
512 // the call/return address). 497 // the call/return address).
513 // The map is the new map that the inlined code should check against. 498 // The map is the new map that the inlined code should check against.
514 static bool PatchInlinedStore(Address address, Object* map); 499 static bool PatchInlinedStore(Address address, Object* map);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 589
605 Token::Value op_; 590 Token::Value op_;
606 }; 591 };
607 592
608 // Helper for TRBinaryOpIC and CompareIC. 593 // Helper for TRBinaryOpIC and CompareIC.
609 void PatchInlinedSmiCode(Address address); 594 void PatchInlinedSmiCode(Address address);
610 595
611 } } // namespace v8::internal 596 } } // namespace v8::internal
612 597
613 #endif // V8_IC_H_ 598 #endif // V8_IC_H_
OLDNEW
« src/ia32/stub-cache-ia32.cc ('K') | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698