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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 PrintF("CompareStub (cc %d), (strict %s)\n", | 279 PrintF("CompareStub (cc %d), (strict %s)\n", |
280 static_cast<int>(cc_), | 280 static_cast<int>(cc_), |
281 strict_ ? "true" : "false"); | 281 strict_ ? "true" : "false"); |
282 } | 282 } |
283 #endif | 283 #endif |
284 }; | 284 }; |
285 | 285 |
286 | 286 |
287 class CEntryStub : public CodeStub { | 287 class CEntryStub : public CodeStub { |
288 public: | 288 public: |
289 CEntryStub() { } | 289 explicit CEntryStub(int result_size) : result_size_(result_size) { } |
290 | 290 |
291 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } | 291 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } |
292 | 292 |
293 protected: | 293 protected: |
294 void GenerateBody(MacroAssembler* masm, bool is_debug_break); | 294 void GenerateBody(MacroAssembler* masm, bool is_debug_break); |
295 void GenerateCore(MacroAssembler* masm, | 295 void GenerateCore(MacroAssembler* masm, |
296 Label* throw_normal_exception, | 296 Label* throw_normal_exception, |
297 Label* throw_termination_exception, | 297 Label* throw_termination_exception, |
298 Label* throw_out_of_memory_exception, | 298 Label* throw_out_of_memory_exception, |
299 StackFrame::Type frame_type, | 299 StackFrame::Type frame_type, |
300 bool do_gc, | 300 bool do_gc, |
301 bool always_allocate_scope); | 301 bool always_allocate_scope); |
302 void GenerateThrowTOS(MacroAssembler* masm); | 302 void GenerateThrowTOS(MacroAssembler* masm); |
303 void GenerateThrowUncatchable(MacroAssembler* masm, | 303 void GenerateThrowUncatchable(MacroAssembler* masm, |
304 UncatchableExceptionType type); | 304 UncatchableExceptionType type); |
305 private: | |
306 // Number of pointers/values returned. | |
307 int result_size_; | |
305 | 308 |
306 private: | |
307 Major MajorKey() { return CEntry; } | 309 Major MajorKey() { return CEntry; } |
308 int MinorKey() { return 0; } | 310 // Minor key must differ if different result_size_ values means different |
311 // code is generated. | |
312 int MinorKey(); | |
309 | 313 |
310 const char* GetName() { return "CEntryStub"; } | 314 const char* GetName() { return "CEntryStub"; } |
311 }; | 315 }; |
312 | 316 |
313 | 317 |
314 class CEntryDebugBreakStub : public CEntryStub { | 318 class CEntryDebugBreakStub : public CEntryStub { |
315 public: | 319 public: |
316 CEntryDebugBreakStub() { } | 320 explicit CEntryDebugBreakStub() : CEntryStub(1) { } |
Søren Thygesen Gjesse
2009/09/07 12:22:33
explicit only required when there is one argument,
Lasse Reichstein
2009/09/08 11:51:35
Good catch.
(There was an argument at a point, but
| |
317 | 321 |
318 void Generate(MacroAssembler* masm) { GenerateBody(masm, true); } | 322 void Generate(MacroAssembler* masm) { GenerateBody(masm, true); } |
319 | 323 |
320 private: | 324 private: |
321 int MinorKey() { return 1; } | 325 int MinorKey() { return 1; } |
322 | 326 |
323 const char* GetName() { return "CEntryDebugBreakStub"; } | 327 const char* GetName() { return "CEntryDebugBreakStub"; } |
324 }; | 328 }; |
325 | 329 |
326 | 330 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 PrintF("ArgumentsAccessStub (type %d)\n", type_); | 386 PrintF("ArgumentsAccessStub (type %d)\n", type_); |
383 } | 387 } |
384 #endif | 388 #endif |
385 }; | 389 }; |
386 | 390 |
387 | 391 |
388 } // namespace internal | 392 } // namespace internal |
389 } // namespace v8 | 393 } // namespace v8 |
390 | 394 |
391 #endif // V8_CODEGEN_H_ | 395 #endif // V8_CODEGEN_H_ |
OLD | NEW |