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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 | 510 |
511 // ---------------------------------------------------------------------------- | 511 // ---------------------------------------------------------------------------- |
512 // Recording of type feedback | 512 // Recording of type feedback |
513 | 513 |
514 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { | 514 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
515 // Record type feedback from the oracle in the AST. | 515 // Record type feedback from the oracle in the AST. |
516 is_monomorphic_ = oracle->LoadIsMonomorphic(this); | 516 is_monomorphic_ = oracle->LoadIsMonomorphic(this); |
517 if (key()->IsPropertyName()) { | 517 if (key()->IsPropertyName()) { |
518 if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_ArrayLength)) { | 518 if (oracle->LoadIsBuiltin(this, Builtins::LoadIC_ArrayLength)) { |
519 is_array_length_ = true; | 519 is_array_length_ = true; |
| 520 } else if (oracle->LoadIsBuiltin(this, |
| 521 Builtins::LoadIC_FunctionPrototype)) { |
| 522 is_function_prototype_ = true; |
520 } else { | 523 } else { |
521 Literal* lit_key = key()->AsLiteral(); | 524 Literal* lit_key = key()->AsLiteral(); |
522 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); | 525 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); |
523 Handle<String> name = Handle<String>::cast(lit_key->handle()); | 526 Handle<String> name = Handle<String>::cast(lit_key->handle()); |
524 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); | 527 ZoneMapList* types = oracle->LoadReceiverTypes(this, name); |
525 receiver_types_ = types; | 528 receiver_types_ = types; |
526 } | 529 } |
527 } else if (is_monomorphic_) { | 530 } else if (is_monomorphic_) { |
528 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); | 531 monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); |
529 } | 532 } |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 | 1041 |
1039 CaseClause::CaseClause(Expression* label, | 1042 CaseClause::CaseClause(Expression* label, |
1040 ZoneList<Statement*>* statements, | 1043 ZoneList<Statement*>* statements, |
1041 int pos) | 1044 int pos) |
1042 : label_(label), | 1045 : label_(label), |
1043 statements_(statements), | 1046 statements_(statements), |
1044 position_(pos), | 1047 position_(pos), |
1045 compare_type_(NONE) {} | 1048 compare_type_(NONE) {} |
1046 | 1049 |
1047 } } // namespace v8::internal | 1050 } } // namespace v8::internal |
OLD | NEW |