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

Side by Side Diff: src/ast.cc

Issue 6697023: Merge 6800:7180 from the bleeding edge branch to the experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: 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/ast-inl.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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } else if (oracle->LoadIsBuiltin(this, 533 } else if (oracle->LoadIsBuiltin(this,
534 Builtins::LoadIC_FunctionPrototype)) { 534 Builtins::LoadIC_FunctionPrototype)) {
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 (oracle->LoadIsBuiltin(this, Builtins::KeyedLoadIC_String)) {
544 is_string_access_ = true;
543 } else if (is_monomorphic_) { 545 } else if (is_monomorphic_) {
544 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); 546 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this);
547 if (monomorphic_receiver_type_->has_external_array_elements()) {
548 SetExternalArrayType(oracle->GetKeyedLoadExternalArrayType(this));
549 }
545 } 550 }
546 } 551 }
547 552
548 553
549 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 554 void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
550 Property* prop = target()->AsProperty(); 555 Property* prop = target()->AsProperty();
551 ASSERT(prop != NULL); 556 ASSERT(prop != NULL);
552 is_monomorphic_ = oracle->StoreIsMonomorphic(this); 557 is_monomorphic_ = oracle->StoreIsMonomorphic(this);
553 if (prop->key()->IsPropertyName()) { 558 if (prop->key()->IsPropertyName()) {
554 Literal* lit_key = prop->key()->AsLiteral(); 559 Literal* lit_key = prop->key()->AsLiteral();
555 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 560 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
556 Handle<String> name = Handle<String>::cast(lit_key->handle()); 561 Handle<String> name = Handle<String>::cast(lit_key->handle());
557 ZoneMapList* types = oracle->StoreReceiverTypes(this, name); 562 ZoneMapList* types = oracle->StoreReceiverTypes(this, name);
558 receiver_types_ = types; 563 receiver_types_ = types;
559 } else if (is_monomorphic_) { 564 } else if (is_monomorphic_) {
560 // Record receiver type for monomorphic keyed loads. 565 // Record receiver type for monomorphic keyed loads.
561 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); 566 monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this);
567 if (monomorphic_receiver_type_->has_external_array_elements()) {
568 SetExternalArrayType(oracle->GetKeyedStoreExternalArrayType(this));
569 }
562 } 570 }
563 } 571 }
564 572
565 573
566 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 574 void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
567 TypeInfo info = oracle->SwitchType(this); 575 TypeInfo info = oracle->SwitchType(this);
568 if (info.IsSmi()) { 576 if (info.IsSmi()) {
569 compare_type_ = SMI_ONLY; 577 compare_type_ = SMI_ONLY;
570 } else if (info.IsNonPrimitive()) { 578 } else if (info.IsNonPrimitive()) {
571 compare_type_ = OBJECT_ONLY; 579 compare_type_ = OBJECT_ONLY;
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 } 1063 }
1056 } 1064 }
1057 1065
1058 1066
1059 CaseClause::CaseClause(Expression* label, 1067 CaseClause::CaseClause(Expression* label,
1060 ZoneList<Statement*>* statements, 1068 ZoneList<Statement*>* statements,
1061 int pos) 1069 int pos)
1062 : label_(label), 1070 : label_(label),
1063 statements_(statements), 1071 statements_(statements),
1064 position_(pos), 1072 position_(pos),
1065 compare_type_(NONE) {} 1073 compare_type_(NONE),
1074 entry_id_(AstNode::GetNextId()) {
1075 }
1066 1076
1067 } } // namespace v8::internal 1077 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/ast-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698