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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 public: | 237 public: |
238 void Generate(MacroAssembler* masm); | 238 void Generate(MacroAssembler* masm); |
239 | 239 |
240 private: | 240 private: |
241 const char* GetName() { return "FastNewClosureStub"; } | 241 const char* GetName() { return "FastNewClosureStub"; } |
242 Major MajorKey() { return FastNewClosure; } | 242 Major MajorKey() { return FastNewClosure; } |
243 int MinorKey() { return 0; } | 243 int MinorKey() { return 0; } |
244 }; | 244 }; |
245 | 245 |
246 | 246 |
| 247 class FastNewContextStub : public CodeStub { |
| 248 public: |
| 249 static const int kMaximumSlots = 64; |
| 250 |
| 251 explicit FastNewContextStub(int slots) : slots_(slots) { |
| 252 ASSERT(slots_ > 0 && slots <= kMaximumSlots); |
| 253 } |
| 254 |
| 255 void Generate(MacroAssembler* masm); |
| 256 |
| 257 private: |
| 258 int slots_; |
| 259 |
| 260 const char* GetName() { return "FastNewContextStub"; } |
| 261 Major MajorKey() { return FastNewContext; } |
| 262 int MinorKey() { return slots_; } |
| 263 }; |
| 264 |
| 265 |
247 class InstanceofStub: public CodeStub { | 266 class InstanceofStub: public CodeStub { |
248 public: | 267 public: |
249 InstanceofStub() { } | 268 InstanceofStub() { } |
250 | 269 |
251 void Generate(MacroAssembler* masm); | 270 void Generate(MacroAssembler* masm); |
252 | 271 |
253 private: | 272 private: |
254 Major MajorKey() { return Instanceof; } | 273 Major MajorKey() { return Instanceof; } |
255 int MinorKey() { return 0; } | 274 int MinorKey() { return 0; } |
256 }; | 275 }; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 PrintF("ArgumentsAccessStub (type %d)\n", type_); | 448 PrintF("ArgumentsAccessStub (type %d)\n", type_); |
430 } | 449 } |
431 #endif | 450 #endif |
432 }; | 451 }; |
433 | 452 |
434 | 453 |
435 } // namespace internal | 454 } // namespace internal |
436 } // namespace v8 | 455 } // namespace v8 |
437 | 456 |
438 #endif // V8_CODEGEN_H_ | 457 #endif // V8_CODEGEN_H_ |
OLD | NEW |