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

Side by Side Diff: src/ast.cc

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 9 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/ast.h ('k') | src/factory.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 is_function_prototype_ = true; 535 is_function_prototype_ = true;
536 } else { 536 } else {
537 Literal* lit_key = key()->AsLiteral(); 537 Literal* lit_key = key()->AsLiteral();
538 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 538 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
539 Handle<String> name = Handle<String>::cast(lit_key->handle()); 539 Handle<String> name = Handle<String>::cast(lit_key->handle());
540 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); 540 ZoneMapList* types = oracle->LoadReceiverTypes(this, name);
541 receiver_types_ = types; 541 receiver_types_ = types;
542 } 542 }
543 } else if (is_monomorphic_) { 543 } else if (is_monomorphic_) {
544 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); 544 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this);
545 if (monomorphic_receiver_type_->has_external_array_elements()) {
546 SetExternalArrayType(oracle->GetKeyedLoadExternalArrayType(this));
547 }
545 } 548 }
546 } 549 }
547 550
548 551
549 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 552 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
550 Property* prop = target()->AsProperty(); 553 Property* prop = target()->AsProperty();
551 ASSERT(prop != NULL); 554 ASSERT(prop != NULL);
552 is_monomorphic_ = oracle->StoreIsMonomorphic(this); 555 is_monomorphic_ = oracle->StoreIsMonomorphic(this);
553 if (prop->key()->IsPropertyName()) { 556 if (prop->key()->IsPropertyName()) {
554 Literal* lit_key = prop->key()->AsLiteral(); 557 Literal* lit_key = prop->key()->AsLiteral();
555 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 558 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
556 Handle<String> name = Handle<String>::cast(lit_key->handle()); 559 Handle<String> name = Handle<String>::cast(lit_key->handle());
557 ZoneMapList* types = oracle->StoreReceiverTypes(this, name); 560 ZoneMapList* types = oracle->StoreReceiverTypes(this, name);
558 receiver_types_ = types; 561 receiver_types_ = types;
559 } else if (is_monomorphic_) { 562 } else if (is_monomorphic_) {
560 // Record receiver type for monomorphic keyed loads. 563 // Record receiver type for monomorphic keyed loads.
561 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); 564 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this);
565 if (monomorphic_receiver_type_->has_external_array_elements()) {
566 SetExternalArrayType(oracle->GetKeyedStoreExternalArrayType(this));
567 }
562 } 568 }
563 } 569 }
564 570
565 571
566 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 572 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
567 TypeInfo info = oracle->SwitchType(this); 573 TypeInfo info = oracle->SwitchType(this);
568 if (info.IsSmi()) { 574 if (info.IsSmi()) {
569 compare_type_ = SMI_ONLY; 575 compare_type_ = SMI_ONLY;
570 } else if (info.IsNonPrimitive()) { 576 } else if (info.IsNonPrimitive()) {
571 compare_type_ = OBJECT_ONLY; 577 compare_type_ = OBJECT_ONLY;
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 ZoneList<Statement*>* statements, 1066 ZoneList<Statement*>* statements,
1061 int pos) 1067 int pos)
1062 : label_(label), 1068 : label_(label),
1063 statements_(statements), 1069 statements_(statements),
1064 position_(pos), 1070 position_(pos),
1065 compare_type_(NONE), 1071 compare_type_(NONE),
1066 entry_id_(AstNode::GetNextId()) { 1072 entry_id_(AstNode::GetNextId()) {
1067 } 1073 }
1068 1074
1069 } } // namespace v8::internal 1075 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698