| 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 29 matching lines...) Expand all Loading... |
| 40 V(GenericBinaryOp) \ | 40 V(GenericBinaryOp) \ |
| 41 V(TypeRecordingBinaryOp) \ | 41 V(TypeRecordingBinaryOp) \ |
| 42 V(StringAdd) \ | 42 V(StringAdd) \ |
| 43 V(StringCharAt) \ | 43 V(StringCharAt) \ |
| 44 V(SubString) \ | 44 V(SubString) \ |
| 45 V(StringCompare) \ | 45 V(StringCompare) \ |
| 46 V(SmiOp) \ | 46 V(SmiOp) \ |
| 47 V(Compare) \ | 47 V(Compare) \ |
| 48 V(CompareIC) \ | 48 V(CompareIC) \ |
| 49 V(MathPow) \ | 49 V(MathPow) \ |
| 50 V(TranscendentalCache) \ |
| 50 V(RecordWrite) \ | 51 V(RecordWrite) \ |
| 51 V(ConvertToDouble) \ | 52 V(ConvertToDouble) \ |
| 52 V(WriteInt32ToHeapNumber) \ | 53 V(WriteInt32ToHeapNumber) \ |
| 53 V(IntegerMod) \ | 54 V(IntegerMod) \ |
| 54 V(StackCheck) \ | 55 V(StackCheck) \ |
| 55 V(FastNewClosure) \ | 56 V(FastNewClosure) \ |
| 56 V(FastNewContext) \ | 57 V(FastNewContext) \ |
| 57 V(FastCloneShallowArray) \ | 58 V(FastCloneShallowArray) \ |
| 58 V(TranscendentalCache) \ | |
| 59 V(GenericUnaryOp) \ | 59 V(GenericUnaryOp) \ |
| 60 V(RevertToNumber) \ | 60 V(RevertToNumber) \ |
| 61 V(ToBoolean) \ | 61 V(ToBoolean) \ |
| 62 V(Instanceof) \ | 62 V(Instanceof) \ |
| 63 V(CounterOp) \ | 63 V(CounterOp) \ |
| 64 V(ArgumentsAccess) \ | 64 V(ArgumentsAccess) \ |
| 65 V(RegExpExec) \ | 65 V(RegExpExec) \ |
| 66 V(RegExpConstructResult) \ | 66 V(RegExpConstructResult) \ |
| 67 V(NumberToString) \ | 67 V(NumberToString) \ |
| 68 V(CEntry) \ | 68 V(CEntry) \ |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 Major MajorKey() { return FastCloneShallowArray; } | 318 Major MajorKey() { return FastCloneShallowArray; } |
| 319 int MinorKey() { | 319 int MinorKey() { |
| 320 ASSERT(mode_ == 0 || mode_ == 1); | 320 ASSERT(mode_ == 0 || mode_ == 1); |
| 321 return (length_ << 1) | mode_; | 321 return (length_ << 1) | mode_; |
| 322 } | 322 } |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 | 325 |
| 326 class InstanceofStub: public CodeStub { | 326 class InstanceofStub: public CodeStub { |
| 327 public: | 327 public: |
| 328 InstanceofStub() { } | 328 enum Flags { |
| 329 kNoFlags = 0, |
| 330 kArgsInRegisters = 1 << 0 |
| 331 }; |
| 332 |
| 333 explicit InstanceofStub(Flags flags) : flags_(flags) { } |
| 329 | 334 |
| 330 void Generate(MacroAssembler* masm); | 335 void Generate(MacroAssembler* masm); |
| 331 | 336 |
| 332 private: | 337 private: |
| 333 Major MajorKey() { return Instanceof; } | 338 Major MajorKey() { return Instanceof; } |
| 334 int MinorKey() { return 0; } | 339 int MinorKey() { return args_in_registers() ? 1 : 0; } |
| 340 |
| 341 bool args_in_registers() { |
| 342 return (flags_ & kArgsInRegisters) != 0; |
| 343 } |
| 344 |
| 345 Flags flags_; |
| 335 }; | 346 }; |
| 336 | 347 |
| 337 | 348 |
| 338 enum NegativeZeroHandling { | 349 enum NegativeZeroHandling { |
| 339 kStrictNegativeZero, | 350 kStrictNegativeZero, |
| 340 kIgnoreNegativeZero | 351 kIgnoreNegativeZero |
| 341 }; | 352 }; |
| 342 | 353 |
| 343 | 354 |
| 344 enum UnaryOpFlags { | 355 enum UnaryOpFlags { |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 private: | 898 private: |
| 888 StringCharCodeAtGenerator char_code_at_generator_; | 899 StringCharCodeAtGenerator char_code_at_generator_; |
| 889 StringCharFromCodeGenerator char_from_code_generator_; | 900 StringCharFromCodeGenerator char_from_code_generator_; |
| 890 | 901 |
| 891 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 902 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
| 892 }; | 903 }; |
| 893 | 904 |
| 894 } } // namespace v8::internal | 905 } } // namespace v8::internal |
| 895 | 906 |
| 896 #endif // V8_CODE_STUBS_H_ | 907 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |