OLD | NEW |
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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 } | 520 } |
521 | 521 |
522 | 522 |
523 // ---------------------------------------------------------------------------- | 523 // ---------------------------------------------------------------------------- |
524 // Recording of type feedback | 524 // Recording of type feedback |
525 | 525 |
526 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 526 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
527 // Record type feedback from the oracle in the AST. | 527 // Record type feedback from the oracle in the AST. |
528 is_monomorphic_ = oracle->LoadIsMonomorphic(this); | 528 is_monomorphic_ = oracle->LoadIsMonomorphic(this); |
529 if (key()->IsPropertyName()) { | 529 if (key()->IsPropertyName()) { |
530 if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_ArrayLength)) { | 530 if (oracle->LoadIsBuiltin(this, Builtins::kLoadIC_ArrayLength)) { |
531 is_array_length_ = true; | 531 is_array_length_ = true; |
532 } else if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_StringLength)) { | 532 } else if (oracle->LoadIsBuiltin(this, Builtins::kLoadIC_StringLength)) { |
533 is_string_length_ = true; | 533 is_string_length_ = true; |
534 } else if (oracle->LoadIsBuiltin(this, | 534 } else if (oracle->LoadIsBuiltin(this, |
535 Builtins::LoadIC_FunctionPrototype)) { | 535 Builtins::kLoadIC_FunctionPrototype)) { |
536 is_function_prototype_ = true; | 536 is_function_prototype_ = true; |
537 } else { | 537 } else { |
538 Literal* lit_key = key()->AsLiteral(); | 538 Literal* lit_key = key()->AsLiteral(); |
539 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); | 539 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); |
540 Handle<String> name = Handle<String>::cast(lit_key->handle()); | 540 Handle<String> name = Handle<String>::cast(lit_key->handle()); |
541 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); | 541 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); |
542 receiver_types_ = types; | 542 receiver_types_ = types; |
543 } | 543 } |
544 } else if (oracle->LoadIsBuiltin(this, Builtins::KeyedLoadIC_String)) { | 544 } else if (oracle->LoadIsBuiltin(this, Builtins::kKeyedLoadIC_String)) { |
545 is_string_access_ = true; | 545 is_string_access_ = true; |
546 } else if (is_monomorphic_) { | 546 } else if (is_monomorphic_) { |
547 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); | 547 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); |
548 if (monomorphic_receiver_type_->has_external_array_elements()) { | 548 if (monomorphic_receiver_type_->has_external_array_elements()) { |
549 SetExternalArrayType(oracle->GetKeyedLoadExternalArrayType(this)); | 549 SetExternalArrayType(oracle->GetKeyedLoadExternalArrayType(this)); |
550 } | 550 } |
551 } | 551 } |
552 } | 552 } |
553 | 553 |
554 | 554 |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 ZoneList<Statement*>* statements, | 1069 ZoneList<Statement*>* statements, |
1070 int pos) | 1070 int pos) |
1071 : label_(label), | 1071 : label_(label), |
1072 statements_(statements), | 1072 statements_(statements), |
1073 position_(pos), | 1073 position_(pos), |
1074 compare_type_(NONE), | 1074 compare_type_(NONE), |
1075 entry_id_(AstNode::GetNextId()) { | 1075 entry_id_(AstNode::GetNextId()) { |
1076 } | 1076 } |
1077 | 1077 |
1078 } } // namespace v8::internal | 1078 } } // namespace v8::internal |
OLD | NEW |