| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 enum Flags { | 328 enum Flags { |
| 329 kNoFlags = 0, | 329 kNoFlags = 0, |
| 330 kArgsInRegisters = 1 << 0 | 330 kArgsInRegisters = 1 << 0, |
| 331 kCallSiteInlineCheck = 1 << 1, |
| 332 kReturnTrueFalseObject = 1 << 2 |
| 331 }; | 333 }; |
| 332 | 334 |
| 333 explicit InstanceofStub(Flags flags) : flags_(flags) { } | 335 explicit InstanceofStub(Flags flags) : flags_(flags), name_(NULL) { } |
| 336 |
| 337 static Register left(); |
| 338 static Register right(); |
| 334 | 339 |
| 335 void Generate(MacroAssembler* masm); | 340 void Generate(MacroAssembler* masm); |
| 336 | 341 |
| 337 private: | 342 private: |
| 338 Major MajorKey() { return Instanceof; } | 343 Major MajorKey() { return Instanceof; } |
| 339 int MinorKey() { return args_in_registers() ? 1 : 0; } | 344 int MinorKey() { return static_cast<int>(flags_); } |
| 340 | 345 |
| 341 bool args_in_registers() { | 346 bool HasArgsInRegisters() const { |
| 342 return (flags_ & kArgsInRegisters) != 0; | 347 return (flags_ & kArgsInRegisters) != 0; |
| 343 } | 348 } |
| 344 | 349 |
| 350 bool HasCallSiteInlineCheck() const { |
| 351 return (flags_ & kCallSiteInlineCheck) != 0; |
| 352 } |
| 353 |
| 354 bool ReturnTrueFalseObject() const { |
| 355 return (flags_ & kReturnTrueFalseObject) != 0; |
| 356 } |
| 357 |
| 358 const char* GetName(); |
| 359 |
| 345 Flags flags_; | 360 Flags flags_; |
| 361 char* name_; |
| 346 }; | 362 }; |
| 347 | 363 |
| 348 | 364 |
| 349 enum NegativeZeroHandling { | 365 enum NegativeZeroHandling { |
| 350 kStrictNegativeZero, | 366 kStrictNegativeZero, |
| 351 kIgnoreNegativeZero | 367 kIgnoreNegativeZero |
| 352 }; | 368 }; |
| 353 | 369 |
| 354 | 370 |
| 355 enum UnaryOpFlags { | 371 enum UnaryOpFlags { |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 private: | 914 private: |
| 899 StringCharCodeAtGenerator char_code_at_generator_; | 915 StringCharCodeAtGenerator char_code_at_generator_; |
| 900 StringCharFromCodeGenerator char_from_code_generator_; | 916 StringCharFromCodeGenerator char_from_code_generator_; |
| 901 | 917 |
| 902 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); | 918 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); |
| 903 }; | 919 }; |
| 904 | 920 |
| 905 } } // namespace v8::internal | 921 } } // namespace v8::internal |
| 906 | 922 |
| 907 #endif // V8_CODE_STUBS_H_ | 923 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |