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

Side by Side Diff: src/code-stubs.cc

Issue 12390031: Unify grow mode and stub kind (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 9 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/code-stubs.h ('k') | src/heap.h » ('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 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 434
435 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { 435 void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
436 switch (elements_kind_) { 436 switch (elements_kind_) {
437 case FAST_ELEMENTS: 437 case FAST_ELEMENTS:
438 case FAST_HOLEY_ELEMENTS: 438 case FAST_HOLEY_ELEMENTS:
439 case FAST_SMI_ELEMENTS: 439 case FAST_SMI_ELEMENTS:
440 case FAST_HOLEY_SMI_ELEMENTS: { 440 case FAST_HOLEY_SMI_ELEMENTS: {
441 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, 441 KeyedStoreStubCompiler::GenerateStoreFastElement(masm,
442 is_js_array_, 442 is_js_array_,
443 elements_kind_, 443 elements_kind_,
444 grow_mode_); 444 store_mode_);
445 } 445 }
446 break; 446 break;
447 case FAST_DOUBLE_ELEMENTS: 447 case FAST_DOUBLE_ELEMENTS:
448 case FAST_HOLEY_DOUBLE_ELEMENTS: 448 case FAST_HOLEY_DOUBLE_ELEMENTS:
449 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, 449 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm,
450 is_js_array_, 450 is_js_array_,
451 grow_mode_); 451 store_mode_);
452 break; 452 break;
453 case EXTERNAL_BYTE_ELEMENTS: 453 case EXTERNAL_BYTE_ELEMENTS:
454 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 454 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
455 case EXTERNAL_SHORT_ELEMENTS: 455 case EXTERNAL_SHORT_ELEMENTS:
456 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 456 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
457 case EXTERNAL_INT_ELEMENTS: 457 case EXTERNAL_INT_ELEMENTS:
458 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 458 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
459 case EXTERNAL_FLOAT_ELEMENTS: 459 case EXTERNAL_FLOAT_ELEMENTS:
460 case EXTERNAL_DOUBLE_ELEMENTS: 460 case EXTERNAL_DOUBLE_ELEMENTS:
461 case EXTERNAL_PIXEL_ELEMENTS: 461 case EXTERNAL_PIXEL_ELEMENTS:
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 GenerateMapChangeElementsTransition(masm, mode, &fail); 585 GenerateMapChangeElementsTransition(masm, mode, &fail);
586 } else if (IsFastDoubleElementsKind(from_)) { 586 } else if (IsFastDoubleElementsKind(from_)) {
587 ASSERT(!IsFastSmiElementsKind(to_)); 587 ASSERT(!IsFastSmiElementsKind(to_));
588 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); 588 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
589 } else { 589 } else {
590 UNREACHABLE(); 590 UNREACHABLE();
591 } 591 }
592 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, 592 KeyedStoreStubCompiler::GenerateStoreFastElement(masm,
593 is_jsarray_, 593 is_jsarray_,
594 to_, 594 to_,
595 grow_mode_); 595 store_mode_);
596 } else if (IsFastSmiElementsKind(from_) && 596 } else if (IsFastSmiElementsKind(from_) &&
597 IsFastDoubleElementsKind(to_)) { 597 IsFastDoubleElementsKind(to_)) {
598 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); 598 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail);
599 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, 599 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm,
600 is_jsarray_, 600 is_jsarray_,
601 grow_mode_); 601 store_mode_);
602 } else if (IsFastDoubleElementsKind(from_)) { 602 } else if (IsFastDoubleElementsKind(from_)) {
603 ASSERT(to_ == FAST_HOLEY_DOUBLE_ELEMENTS); 603 ASSERT(to_ == FAST_HOLEY_DOUBLE_ELEMENTS);
604 ElementsTransitionGenerator:: 604 ElementsTransitionGenerator::
605 GenerateMapChangeElementsTransition(masm, mode, &fail); 605 GenerateMapChangeElementsTransition(masm, mode, &fail);
606 } else { 606 } else {
607 UNREACHABLE(); 607 UNREACHABLE();
608 } 608 }
609 } 609 }
610 masm->bind(&fail); 610 masm->bind(&fail);
611 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); 611 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_);
(...skipping 23 matching lines...) Expand all
635 // already active, as the hooks won't stack. 635 // already active, as the hooks won't stack.
636 if (entry_hook != 0 && entry_hook_ != 0) 636 if (entry_hook != 0 && entry_hook_ != 0)
637 return false; 637 return false;
638 638
639 entry_hook_ = entry_hook; 639 entry_hook_ = entry_hook;
640 return true; 640 return true;
641 } 641 }
642 642
643 643
644 } } // namespace v8::internal 644 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698