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

Side by Side Diff: src/ast.cc

Issue 7112010: Plumbing changes to merge various element kind implementaions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 6 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/ast.h ('k') | src/code-stubs.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 Literal* lit_key = key()->AsLiteral(); 600 Literal* lit_key = key()->AsLiteral();
601 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 601 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
602 Handle<String> name = Handle<String>::cast(lit_key->handle()); 602 Handle<String> name = Handle<String>::cast(lit_key->handle());
603 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); 603 ZoneMapList* types = oracle->LoadReceiverTypes(this, name);
604 receiver_types_ = types; 604 receiver_types_ = types;
605 } 605 }
606 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) { 606 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) {
607 is_string_access_ = true; 607 is_string_access_ = true;
608 } else if (is_monomorphic_) { 608 } else if (is_monomorphic_) {
609 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); 609 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this);
610 if (monomorphic_receiver_type_->has_external_array_elements()) {
611 set_external_array_type(oracle->GetKeyedLoadExternalArrayType(this));
612 }
613 } 610 }
614 } 611 }
615 612
616 613
617 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 614 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
618 Property* prop = target()->AsProperty(); 615 Property* prop = target()->AsProperty();
619 ASSERT(prop != NULL); 616 ASSERT(prop != NULL);
620 is_monomorphic_ = oracle->StoreIsMonomorphic(this); 617 is_monomorphic_ = oracle->StoreIsMonomorphic(this);
621 if (prop->key()->IsPropertyName()) { 618 if (prop->key()->IsPropertyName()) {
622 Literal* lit_key = prop->key()->AsLiteral(); 619 Literal* lit_key = prop->key()->AsLiteral();
623 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 620 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
624 Handle<String> name = Handle<String>::cast(lit_key->handle()); 621 Handle<String> name = Handle<String>::cast(lit_key->handle());
625 ZoneMapList* types = oracle->StoreReceiverTypes(this, name); 622 ZoneMapList* types = oracle->StoreReceiverTypes(this, name);
626 receiver_types_ = types; 623 receiver_types_ = types;
627 } else if (is_monomorphic_) { 624 } else if (is_monomorphic_) {
628 // Record receiver type for monomorphic keyed loads. 625 // Record receiver type for monomorphic keyed loads.
629 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); 626 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this);
630 if (monomorphic_receiver_type_->has_external_array_elements()) {
631 set_external_array_type(oracle->GetKeyedStoreExternalArrayType(this));
632 }
633 } 627 }
634 } 628 }
635 629
636 630
637 void CountOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 631 void CountOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
638 is_monomorphic_ = oracle->StoreIsMonomorphic(this); 632 is_monomorphic_ = oracle->StoreIsMonomorphic(this);
639 if (is_monomorphic_) { 633 if (is_monomorphic_) {
640 // Record receiver type for monomorphic keyed loads. 634 // Record receiver type for monomorphic keyed loads.
641 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); 635 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this);
642 if (monomorphic_receiver_type_->has_external_array_elements()) {
643 set_external_array_type(oracle->GetKeyedStoreExternalArrayType(this));
644 }
645 } 636 }
646 } 637 }
647 638
648 639
649 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 640 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
650 TypeInfo info = oracle->SwitchType(this); 641 TypeInfo info = oracle->SwitchType(this);
651 if (info.IsSmi()) { 642 if (info.IsSmi()) {
652 compare_type_ = SMI_ONLY; 643 compare_type_ = SMI_ONLY;
653 } else if (info.IsNonPrimitive()) { 644 } else if (info.IsNonPrimitive()) {
654 compare_type_ = OBJECT_ONLY; 645 compare_type_ = OBJECT_ONLY;
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 int pos) 1133 int pos)
1143 : label_(label), 1134 : label_(label),
1144 statements_(statements), 1135 statements_(statements),
1145 position_(pos), 1136 position_(pos),
1146 compare_type_(NONE), 1137 compare_type_(NONE),
1147 compare_id_(AstNode::GetNextId()), 1138 compare_id_(AstNode::GetNextId()),
1148 entry_id_(AstNode::GetNextId()) { 1139 entry_id_(AstNode::GetNextId()) {
1149 } 1140 }
1150 1141
1151 } } // namespace v8::internal 1142 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698