OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 Expression* expression() const { return expression_; } | 1525 Expression* expression() const { return expression_; } |
1526 ZoneList<Expression*>* arguments() const { return arguments_; } | 1526 ZoneList<Expression*>* arguments() const { return arguments_; } |
1527 virtual int position() const { return pos_; } | 1527 virtual int position() const { return pos_; } |
1528 | 1528 |
1529 // Type feedback information. | 1529 // Type feedback information. |
1530 TypeFeedbackId CallFeedbackId() const { return reuse(id()); } | 1530 TypeFeedbackId CallFeedbackId() const { return reuse(id()); } |
1531 void RecordTypeFeedback(TypeFeedbackOracle* oracle, CallKind call_kind); | 1531 void RecordTypeFeedback(TypeFeedbackOracle* oracle, CallKind call_kind); |
1532 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } | 1532 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } |
1533 virtual bool IsMonomorphic() { return is_monomorphic_; } | 1533 virtual bool IsMonomorphic() { return is_monomorphic_; } |
1534 CheckType check_type() const { return check_type_; } | 1534 CheckType check_type() const { return check_type_; } |
| 1535 |
| 1536 void set_string_check(Handle<JSObject> holder) { |
| 1537 holder_ = holder; |
| 1538 check_type_ = STRING_CHECK; |
| 1539 } |
| 1540 |
| 1541 void set_number_check(Handle<JSObject> holder) { |
| 1542 holder_ = holder; |
| 1543 check_type_ = NUMBER_CHECK; |
| 1544 } |
| 1545 |
| 1546 void set_map_check() { |
| 1547 holder_ = Handle<JSObject>::null(); |
| 1548 check_type_ = RECEIVER_MAP_CHECK; |
| 1549 } |
| 1550 |
1535 Handle<JSFunction> target() { return target_; } | 1551 Handle<JSFunction> target() { return target_; } |
1536 | 1552 |
1537 // A cache for the holder, set as a side effect of computing the target of the | 1553 // A cache for the holder, set as a side effect of computing the target of the |
1538 // call. Note that it contains the null handle when the receiver is the same | 1554 // call. Note that it contains the null handle when the receiver is the same |
1539 // as the holder! | 1555 // as the holder! |
1540 Handle<JSObject> holder() { return holder_; } | 1556 Handle<JSObject> holder() { return holder_; } |
1541 | 1557 |
1542 Handle<JSGlobalPropertyCell> cell() { return cell_; } | 1558 Handle<JSGlobalPropertyCell> cell() { return cell_; } |
1543 | 1559 |
1544 bool ComputeTarget(Handle<Map> type, Handle<String> name); | 1560 bool ComputeTarget(Handle<Map> type, Handle<String> name); |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2935 private: | 2951 private: |
2936 Isolate* isolate_; | 2952 Isolate* isolate_; |
2937 Zone* zone_; | 2953 Zone* zone_; |
2938 Visitor visitor_; | 2954 Visitor visitor_; |
2939 }; | 2955 }; |
2940 | 2956 |
2941 | 2957 |
2942 } } // namespace v8::internal | 2958 } } // namespace v8::internal |
2943 | 2959 |
2944 #endif // V8_AST_H_ | 2960 #endif // V8_AST_H_ |
OLD | NEW |