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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 explicit FunctionEntry(Vector<unsigned> backing) | 61 explicit FunctionEntry(Vector<unsigned> backing) |
62 : backing_(backing) { } | 62 : backing_(backing) { } |
63 | 63 |
64 FunctionEntry() : backing_() { } | 64 FunctionEntry() : backing_() { } |
65 | 65 |
66 int start_pos() { return backing_[kStartPositionIndex]; } | 66 int start_pos() { return backing_[kStartPositionIndex]; } |
67 int end_pos() { return backing_[kEndPositionIndex]; } | 67 int end_pos() { return backing_[kEndPositionIndex]; } |
68 int literal_count() { return backing_[kLiteralCountIndex]; } | 68 int literal_count() { return backing_[kLiteralCountIndex]; } |
69 int property_count() { return backing_[kPropertyCountIndex]; } | 69 int property_count() { return backing_[kPropertyCountIndex]; } |
70 LanguageMode language_mode() { | 70 LanguageMode language_mode() { |
71 ASSERT(backing_[kLanguageModeIndex] == CLASSIC_MODE || | 71 ASSERT(backing_[kLanguageModeIndex] == SLOPPY_MODE || |
72 backing_[kLanguageModeIndex] == STRICT_MODE || | 72 backing_[kLanguageModeIndex] == STRICT_MODE || |
73 backing_[kLanguageModeIndex] == EXTENDED_MODE); | 73 backing_[kLanguageModeIndex] == EXTENDED_MODE); |
74 return static_cast<LanguageMode>(backing_[kLanguageModeIndex]); | 74 return static_cast<LanguageMode>(backing_[kLanguageModeIndex]); |
75 } | 75 } |
76 | 76 |
77 bool is_valid() { return !backing_.is_empty(); } | 77 bool is_valid() { return !backing_.is_empty(); } |
78 | 78 |
79 private: | 79 private: |
80 Vector<unsigned> backing_; | 80 Vector<unsigned> backing_; |
81 }; | 81 }; |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 private: | 786 private: |
787 static const int kLiteralTypeSlot = 0; | 787 static const int kLiteralTypeSlot = 0; |
788 static const int kElementsSlot = 1; | 788 static const int kElementsSlot = 1; |
789 | 789 |
790 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 790 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
791 }; | 791 }; |
792 | 792 |
793 } } // namespace v8::internal | 793 } } // namespace v8::internal |
794 | 794 |
795 #endif // V8_PARSER_H_ | 795 #endif // V8_PARSER_H_ |
OLD | NEW |