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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 514 |
515 // ---------------------------------------------------------------------------- | 515 // ---------------------------------------------------------------------------- |
516 // Recording of type feedback | 516 // Recording of type feedback |
517 | 517 |
518 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 518 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
519 // Record type feedback from the oracle in the AST. | 519 // Record type feedback from the oracle in the AST. |
520 is_monomorphic_ = oracle->LoadIsMonomorphic(this); | 520 is_monomorphic_ = oracle->LoadIsMonomorphic(this); |
521 if (key()->IsPropertyName()) { | 521 if (key()->IsPropertyName()) { |
522 if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_ArrayLength)) { | 522 if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_ArrayLength)) { |
523 is_array_length_ = true; | 523 is_array_length_ = true; |
| 524 } else if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_StringLength)) { |
| 525 is_string_length_ = true; |
524 } else if (oracle->LoadIsBuiltin(this, | 526 } else if (oracle->LoadIsBuiltin(this, |
525 Builtins::LoadIC_FunctionPrototype)) { | 527 Builtins::LoadIC_FunctionPrototype)) { |
526 is_function_prototype_ = true; | 528 is_function_prototype_ = true; |
527 } else { | 529 } else { |
528 Literal* lit_key = key()->AsLiteral(); | 530 Literal* lit_key = key()->AsLiteral(); |
529 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); | 531 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); |
530 Handle<String> name = Handle<String>::cast(lit_key->handle()); | 532 Handle<String> name = Handle<String>::cast(lit_key->handle()); |
531 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); | 533 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); |
532 receiver_types_ = types; | 534 receiver_types_ = types; |
533 } | 535 } |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 | 1057 |
1056 CaseClause::CaseClause(Expression* label, | 1058 CaseClause::CaseClause(Expression* label, |
1057 ZoneList<Statement*>* statements, | 1059 ZoneList<Statement*>* statements, |
1058 int pos) | 1060 int pos) |
1059 : label_(label), | 1061 : label_(label), |
1060 statements_(statements), | 1062 statements_(statements), |
1061 position_(pos), | 1063 position_(pos), |
1062 compare_type_(NONE) {} | 1064 compare_type_(NONE) {} |
1063 | 1065 |
1064 } } // namespace v8::internal | 1066 } } // namespace v8::internal |
OLD | NEW |