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

Side by Side Diff: src/ic.h

Issue 6315004: 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
« no previous file with comments | « src/ia32/stub-cache-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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Code generator routines. 325 // Code generator routines.
326 static void GenerateMiss(MacroAssembler* masm); 326 static void GenerateMiss(MacroAssembler* masm);
327 static void GenerateRuntimeGetProperty(MacroAssembler* masm); 327 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
328 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 328 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
329 static void GeneratePreMonomorphic(MacroAssembler* masm) { 329 static void GeneratePreMonomorphic(MacroAssembler* masm) {
330 GenerateMiss(masm); 330 GenerateMiss(masm);
331 } 331 }
332 static void GenerateGeneric(MacroAssembler* masm); 332 static void GenerateGeneric(MacroAssembler* masm);
333 static void GenerateString(MacroAssembler* masm); 333 static void GenerateString(MacroAssembler* masm);
334 334
335 // Generators for external array types. See objects.h.
336 // These are similar to the generic IC; they optimize the case of
337 // operating upon external array types but fall back to the runtime
338 // for all other types.
339 static void GenerateExternalArray(MacroAssembler* masm,
340 ExternalArrayType array_type);
341 static void GenerateIndexedInterceptor(MacroAssembler* masm); 335 static void GenerateIndexedInterceptor(MacroAssembler* masm);
342 336
343 // Clear the use of the inlined version. 337 // Clear the use of the inlined version.
344 static void ClearInlinedVersion(Address address); 338 static void ClearInlinedVersion(Address address);
345 339
346 // Bit mask to be tested against bit field for the cases when 340 // Bit mask to be tested against bit field for the cases when
347 // generic stub should go into slow case. 341 // generic stub should go into slow case.
348 // Access check is necessary explicitly since generic stub does not perform 342 // Access check is necessary explicitly since generic stub does not perform
349 // map checks. 343 // map checks.
350 static const int kSlowCaseBitFieldMask = 344 static const int kSlowCaseBitFieldMask =
(...skipping 15 matching lines...) Expand all
366 } 360 }
367 static Code* generic_stub() { 361 static Code* generic_stub() {
368 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); 362 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
369 } 363 }
370 static Code* pre_monomorphic_stub() { 364 static Code* pre_monomorphic_stub() {
371 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); 365 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic);
372 } 366 }
373 static Code* string_stub() { 367 static Code* string_stub() {
374 return Builtins::builtin(Builtins::KeyedLoadIC_String); 368 return Builtins::builtin(Builtins::KeyedLoadIC_String);
375 } 369 }
376 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
377 370
378 static Code* indexed_interceptor_stub() { 371 static Code* indexed_interceptor_stub() {
379 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor); 372 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor);
380 } 373 }
381 374
382 static void Clear(Address address, Code* target); 375 static void Clear(Address address, Code* target);
383 376
384 // Support for patching the map that is checked in an inlined 377 // Support for patching the map that is checked in an inlined
385 // version of keyed load. 378 // version of keyed load.
386 static bool PatchInlinedLoad(Address address, Object* map); 379 static bool PatchInlinedLoad(Address address, Object* map);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 Handle<Object> object, 443 Handle<Object> object,
451 Handle<Object> name, 444 Handle<Object> name,
452 Handle<Object> value); 445 Handle<Object> value);
453 446
454 // Code generators for stub routines. Only called once at startup. 447 // Code generators for stub routines. Only called once at startup.
455 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 448 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
456 static void GenerateMiss(MacroAssembler* masm); 449 static void GenerateMiss(MacroAssembler* masm);
457 static void GenerateRuntimeSetProperty(MacroAssembler* masm); 450 static void GenerateRuntimeSetProperty(MacroAssembler* masm);
458 static void GenerateGeneric(MacroAssembler* masm); 451 static void GenerateGeneric(MacroAssembler* masm);
459 452
460 // Generators for external array types. See objects.h.
461 // These are similar to the generic IC; they optimize the case of
462 // operating upon external array types but fall back to the runtime
463 // for all other types.
464 static void GenerateExternalArray(MacroAssembler* masm,
465 ExternalArrayType array_type);
466
467 // Clear the inlined version so the IC is always hit. 453 // Clear the inlined version so the IC is always hit.
468 static void ClearInlinedVersion(Address address); 454 static void ClearInlinedVersion(Address address);
469 455
470 // Restore the inlined version so the fast case can get hit. 456 // Restore the inlined version so the fast case can get hit.
471 static void RestoreInlinedVersion(Address address); 457 static void RestoreInlinedVersion(Address address);
472 458
473 private: 459 private:
474 // Update the inline cache. 460 // Update the inline cache.
475 void UpdateCaches(LookupResult* lookup, 461 void UpdateCaches(LookupResult* lookup,
476 State state, 462 State state,
477 Handle<JSObject> receiver, 463 Handle<JSObject> receiver,
478 Handle<String> name, 464 Handle<String> name,
479 Handle<Object> value); 465 Handle<Object> value);
480 466
481 // Stub accessors. 467 // Stub accessors.
482 static Code* initialize_stub() { 468 static Code* initialize_stub() {
483 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); 469 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize);
484 } 470 }
485 static Code* megamorphic_stub() { 471 static Code* megamorphic_stub() {
486 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 472 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
487 } 473 }
488 static Code* generic_stub() { 474 static Code* generic_stub() {
489 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); 475 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
490 } 476 }
491 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
492 477
493 static void Clear(Address address, Code* target); 478 static void Clear(Address address, Code* target);
494 479
495 // Support for patching the map that is checked in an inlined 480 // Support for patching the map that is checked in an inlined
496 // version of keyed store. 481 // version of keyed store.
497 // The address is the patch point for the IC call 482 // The address is the patch point for the IC call
498 // (Assembler::kCallTargetAddressOffset before the end of 483 // (Assembler::kCallTargetAddressOffset before the end of
499 // the call/return address). 484 // the call/return address).
500 // The map is the new map that the inlined code should check against. 485 // The map is the new map that the inlined code should check against.
501 static bool PatchInlinedStore(Address address, Object* map); 486 static bool PatchInlinedStore(Address address, Object* map);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 576
592 Token::Value op_; 577 Token::Value op_;
593 }; 578 };
594 579
595 // Helper for TRBinaryOpIC and CompareIC. 580 // Helper for TRBinaryOpIC and CompareIC.
596 void PatchInlinedSmiCode(Address address); 581 void PatchInlinedSmiCode(Address address);
597 582
598 } } // namespace v8::internal 583 } } // namespace v8::internal
599 584
600 #endif // V8_IC_H_ 585 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « 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