OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 Major MajorKey() { return FastCloneShallowArray; } | 319 Major MajorKey() { return FastCloneShallowArray; } |
320 int MinorKey() { | 320 int MinorKey() { |
321 ASSERT(mode_ == 0 || mode_ == 1); | 321 ASSERT(mode_ == 0 || mode_ == 1); |
322 return (length_ << 1) | mode_; | 322 return (length_ << 1) | mode_; |
323 } | 323 } |
324 }; | 324 }; |
325 | 325 |
326 | 326 |
327 class InstanceofStub: public CodeStub { | 327 class InstanceofStub: public CodeStub { |
328 public: | 328 public: |
329 InstanceofStub() { } | 329 enum Flags { |
| 330 kNoFlags = 0, |
| 331 kArgsInRegisters = 1 << 0 |
| 332 }; |
| 333 |
| 334 explicit InstanceofStub(Flags flags) : flags_(flags) { } |
330 | 335 |
331 void Generate(MacroAssembler* masm); | 336 void Generate(MacroAssembler* masm); |
332 | 337 |
333 private: | 338 private: |
334 Major MajorKey() { return Instanceof; } | 339 Major MajorKey() { return Instanceof; } |
335 int MinorKey() { return 0; } | 340 int MinorKey() { return args_in_registers() ? 1 : 0; } |
| 341 |
| 342 bool args_in_registers() { |
| 343 return (flags_ & kArgsInRegisters) != 0; |
| 344 } |
| 345 |
| 346 Flags flags_; |
336 }; | 347 }; |
337 | 348 |
338 | 349 |
339 enum NegativeZeroHandling { | 350 enum NegativeZeroHandling { |
340 kStrictNegativeZero, | 351 kStrictNegativeZero, |
341 kIgnoreNegativeZero | 352 kIgnoreNegativeZero |
342 }; | 353 }; |
343 | 354 |
344 | 355 |
345 enum UnaryOpFlags { | 356 enum UnaryOpFlags { |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 private: | 899 private: |
889 StringCharCodeAtGenerator char_code_at_generator_; | 900 StringCharCodeAtGenerator char_code_at_generator_; |
890 StringCharFromCodeGenerator char_from_code_generator_; | 901 StringCharFromCodeGenerator char_from_code_generator_; |
891 | 902 |
892 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 903 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
893 }; | 904 }; |
894 | 905 |
895 } } // namespace v8::internal | 906 } } // namespace v8::internal |
896 | 907 |
897 #endif // V8_CODE_STUBS_H_ | 908 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |