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

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

Issue 6879009: Support Float64Arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 years, 8 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/runtime.cc ('k') | src/x64/lithium-codegen-x64.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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 case JSObject::EXTERNAL_SHORT_ELEMENTS: 548 case JSObject::EXTERNAL_SHORT_ELEMENTS:
549 return kExternalShortArray; 549 return kExternalShortArray;
550 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 550 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
551 return kExternalUnsignedShortArray; 551 return kExternalUnsignedShortArray;
552 case JSObject::EXTERNAL_INT_ELEMENTS: 552 case JSObject::EXTERNAL_INT_ELEMENTS:
553 return kExternalIntArray; 553 return kExternalIntArray;
554 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: 554 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS:
555 return kExternalUnsignedIntArray; 555 return kExternalUnsignedIntArray;
556 case JSObject::EXTERNAL_FLOAT_ELEMENTS: 556 case JSObject::EXTERNAL_FLOAT_ELEMENTS:
557 return kExternalFloatArray; 557 return kExternalFloatArray;
558 case JSObject::EXTERNAL_DOUBLE_ELEMENTS:
559 return kExternalDoubleArray;
558 case JSObject::EXTERNAL_PIXEL_ELEMENTS: 560 case JSObject::EXTERNAL_PIXEL_ELEMENTS:
559 return kExternalPixelArray; 561 return kExternalPixelArray;
560 default: 562 default:
561 UNREACHABLE(); 563 UNREACHABLE();
562 return static_cast<ExternalArrayType>(0); 564 return static_cast<ExternalArrayType>(0);
563 } 565 }
564 } 566 }
565 567
566 String* ExternalArrayTypeToStubName(Heap* heap, 568 String* ExternalArrayTypeToStubName(Heap* heap,
567 ExternalArrayType array_type, 569 ExternalArrayType array_type,
568 bool is_store) { 570 bool is_store) {
569 if (is_store) { 571 if (is_store) {
570 switch (array_type) { 572 switch (array_type) {
571 case kExternalByteArray: 573 case kExternalByteArray:
572 return heap->KeyedStoreExternalByteArray_symbol(); 574 return heap->KeyedStoreExternalByteArray_symbol();
573 case kExternalUnsignedByteArray: 575 case kExternalUnsignedByteArray:
574 return heap->KeyedStoreExternalUnsignedByteArray_symbol(); 576 return heap->KeyedStoreExternalUnsignedByteArray_symbol();
575 case kExternalShortArray: 577 case kExternalShortArray:
576 return heap->KeyedStoreExternalShortArray_symbol(); 578 return heap->KeyedStoreExternalShortArray_symbol();
577 case kExternalUnsignedShortArray: 579 case kExternalUnsignedShortArray:
578 return heap->KeyedStoreExternalUnsignedShortArray_symbol(); 580 return heap->KeyedStoreExternalUnsignedShortArray_symbol();
579 case kExternalIntArray: 581 case kExternalIntArray:
580 return heap->KeyedStoreExternalIntArray_symbol(); 582 return heap->KeyedStoreExternalIntArray_symbol();
581 case kExternalUnsignedIntArray: 583 case kExternalUnsignedIntArray:
582 return heap->KeyedStoreExternalUnsignedIntArray_symbol(); 584 return heap->KeyedStoreExternalUnsignedIntArray_symbol();
583 case kExternalFloatArray: 585 case kExternalFloatArray:
584 return heap->KeyedStoreExternalFloatArray_symbol(); 586 return heap->KeyedStoreExternalFloatArray_symbol();
587 case kExternalDoubleArray:
588 return heap->KeyedStoreExternalDoubleArray_symbol();
585 case kExternalPixelArray: 589 case kExternalPixelArray:
586 return heap->KeyedStoreExternalPixelArray_symbol(); 590 return heap->KeyedStoreExternalPixelArray_symbol();
587 default: 591 default:
588 UNREACHABLE(); 592 UNREACHABLE();
589 return NULL; 593 return NULL;
590 } 594 }
591 } else { 595 } else {
592 switch (array_type) { 596 switch (array_type) {
593 case kExternalByteArray: 597 case kExternalByteArray:
594 return heap->KeyedLoadExternalByteArray_symbol(); 598 return heap->KeyedLoadExternalByteArray_symbol();
595 case kExternalUnsignedByteArray: 599 case kExternalUnsignedByteArray:
596 return heap->KeyedLoadExternalUnsignedByteArray_symbol(); 600 return heap->KeyedLoadExternalUnsignedByteArray_symbol();
597 case kExternalShortArray: 601 case kExternalShortArray:
598 return heap->KeyedLoadExternalShortArray_symbol(); 602 return heap->KeyedLoadExternalShortArray_symbol();
599 case kExternalUnsignedShortArray: 603 case kExternalUnsignedShortArray:
600 return heap->KeyedLoadExternalUnsignedShortArray_symbol(); 604 return heap->KeyedLoadExternalUnsignedShortArray_symbol();
601 case kExternalIntArray: 605 case kExternalIntArray:
602 return heap->KeyedLoadExternalIntArray_symbol(); 606 return heap->KeyedLoadExternalIntArray_symbol();
603 case kExternalUnsignedIntArray: 607 case kExternalUnsignedIntArray:
604 return heap->KeyedLoadExternalUnsignedIntArray_symbol(); 608 return heap->KeyedLoadExternalUnsignedIntArray_symbol();
605 case kExternalFloatArray: 609 case kExternalFloatArray:
606 return heap->KeyedLoadExternalFloatArray_symbol(); 610 return heap->KeyedLoadExternalFloatArray_symbol();
611 case kExternalDoubleArray:
612 return heap->KeyedLoadExternalDoubleArray_symbol();
607 case kExternalPixelArray: 613 case kExternalPixelArray:
608 return heap->KeyedLoadExternalPixelArray_symbol(); 614 return heap->KeyedLoadExternalPixelArray_symbol();
609 default: 615 default:
610 UNREACHABLE(); 616 UNREACHABLE();
611 return NULL; 617 return NULL;
612 } 618 }
613 } 619 }
614 } 620 }
615 621
616 } // anonymous namespace 622 } // anonymous namespace
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 } 1937 }
1932 Code* code = Code::cast(result); 1938 Code* code = Code::cast(result);
1933 USE(code); 1939 USE(code);
1934 PROFILE(isolate(), 1940 PROFILE(isolate(),
1935 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStub")); 1941 CodeCreateEvent(Logger::STUB_TAG, code, "ExternalArrayStub"));
1936 return result; 1942 return result;
1937 } 1943 }
1938 1944
1939 1945
1940 } } // namespace v8::internal 1946 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698