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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 private: | 242 private: |
243 bool overwrite_; | 243 bool overwrite_; |
244 Major MajorKey() { return UnarySub; } | 244 Major MajorKey() { return UnarySub; } |
245 int MinorKey() { return overwrite_ ? 1 : 0; } | 245 int MinorKey() { return overwrite_ ? 1 : 0; } |
246 void Generate(MacroAssembler* masm); | 246 void Generate(MacroAssembler* masm); |
247 | 247 |
248 const char* GetName() { return "UnarySubStub"; } | 248 const char* GetName() { return "UnarySubStub"; } |
249 }; | 249 }; |
250 | 250 |
251 | 251 |
| 252 class CompareStub: public CodeStub { |
| 253 public: |
| 254 CompareStub(Condition cc, bool strict) : cc_(cc), strict_(strict) { } |
| 255 |
| 256 void Generate(MacroAssembler* masm); |
| 257 |
| 258 private: |
| 259 Condition cc_; |
| 260 bool strict_; |
| 261 |
| 262 Major MajorKey() { return Compare; } |
| 263 |
| 264 int MinorKey(); |
| 265 |
| 266 // Branch to the label if the given object isn't a symbol. |
| 267 void BranchIfNonSymbol(MacroAssembler* masm, |
| 268 Label* label, |
| 269 Register object, |
| 270 Register scratch); |
| 271 |
| 272 #ifdef DEBUG |
| 273 void Print() { |
| 274 PrintF("CompareStub (cc %d), (strict %s)\n", |
| 275 static_cast<int>(cc_), |
| 276 strict_ ? "true" : "false"); |
| 277 } |
| 278 #endif |
| 279 }; |
| 280 |
| 281 |
252 class CEntryStub : public CodeStub { | 282 class CEntryStub : public CodeStub { |
253 public: | 283 public: |
254 CEntryStub() { } | 284 CEntryStub() { } |
255 | 285 |
256 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } | 286 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } |
257 | 287 |
258 protected: | 288 protected: |
259 void GenerateBody(MacroAssembler* masm, bool is_debug_break); | 289 void GenerateBody(MacroAssembler* masm, bool is_debug_break); |
260 void GenerateCore(MacroAssembler* masm, | 290 void GenerateCore(MacroAssembler* masm, |
261 Label* throw_normal_exception, | 291 Label* throw_normal_exception, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 PrintF("ArgumentsAccessStub (type %d)\n", type_); | 375 PrintF("ArgumentsAccessStub (type %d)\n", type_); |
346 } | 376 } |
347 #endif | 377 #endif |
348 }; | 378 }; |
349 | 379 |
350 | 380 |
351 } // namespace internal | 381 } // namespace internal |
352 } // namespace v8 | 382 } // namespace v8 |
353 | 383 |
354 #endif // V8_CODEGEN_H_ | 384 #endif // V8_CODEGEN_H_ |
OLD | NEW |