OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 return false; | 360 return false; |
361 } | 361 } |
362 | 362 |
363 | 363 |
364 bool Slot::IsInlineable() const { | 364 bool Slot::IsInlineable() const { |
365 UNREACHABLE(); | 365 UNREACHABLE(); |
366 return false; | 366 return false; |
367 } | 367 } |
368 | 368 |
369 | 369 |
370 bool ForStatement::IsInlineable() const { | |
371 return false; | |
372 } | |
373 | |
374 | |
375 bool WhileStatement::IsInlineable() const { | |
376 return false; | |
377 } | |
378 | |
379 | |
380 bool DoWhileStatement::IsInlineable() const { | |
381 return false; | |
382 } | |
383 | |
384 | |
385 bool ForInStatement::IsInlineable() const { | 370 bool ForInStatement::IsInlineable() const { |
386 return false; | 371 return false; |
387 } | 372 } |
388 | 373 |
389 | 374 |
390 bool ContinueStatement::IsInlineable() const { | |
391 return false; | |
392 } | |
393 | |
394 | |
395 bool BreakStatement::IsInlineable() const { | |
396 return false; | |
397 } | |
398 | |
399 | |
400 bool WithEnterStatement::IsInlineable() const { | 375 bool WithEnterStatement::IsInlineable() const { |
401 return false; | 376 return false; |
402 } | 377 } |
403 | 378 |
404 | 379 |
405 bool WithExitStatement::IsInlineable() const { | 380 bool WithExitStatement::IsInlineable() const { |
406 return false; | 381 return false; |
407 } | 382 } |
408 | 383 |
409 | 384 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 return false; | 439 return false; |
465 } | 440 } |
466 | 441 |
467 | 442 |
468 bool ValidLeftHandSideSentinel::IsInlineable() const { | 443 bool ValidLeftHandSideSentinel::IsInlineable() const { |
469 UNREACHABLE(); | 444 UNREACHABLE(); |
470 return false; | 445 return false; |
471 } | 446 } |
472 | 447 |
473 | 448 |
| 449 bool ForStatement::IsInlineable() const { |
| 450 return (init() == NULL || init()->IsInlineable()) |
| 451 && (cond() == NULL || cond()->IsInlineable()) |
| 452 && (next() == NULL || next()->IsInlineable()) |
| 453 && body()->IsInlineable(); |
| 454 } |
| 455 |
| 456 |
| 457 bool WhileStatement::IsInlineable() const { |
| 458 return cond()->IsInlineable() |
| 459 && body()->IsInlineable(); |
| 460 } |
| 461 |
| 462 |
| 463 bool DoWhileStatement::IsInlineable() const { |
| 464 return cond()->IsInlineable() |
| 465 && body()->IsInlineable(); |
| 466 } |
| 467 |
| 468 |
| 469 bool ContinueStatement::IsInlineable() const { |
| 470 return true; |
| 471 } |
| 472 |
| 473 |
| 474 bool BreakStatement::IsInlineable() const { |
| 475 return true; |
| 476 } |
| 477 |
| 478 |
474 bool EmptyStatement::IsInlineable() const { | 479 bool EmptyStatement::IsInlineable() const { |
475 return true; | 480 return true; |
476 } | 481 } |
477 | 482 |
478 | 483 |
479 bool Literal::IsInlineable() const { | 484 bool Literal::IsInlineable() const { |
480 return true; | 485 return true; |
481 } | 486 } |
482 | 487 |
483 | 488 |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 ZoneList<Statement*>* statements, | 1145 ZoneList<Statement*>* statements, |
1141 int pos) | 1146 int pos) |
1142 : label_(label), | 1147 : label_(label), |
1143 statements_(statements), | 1148 statements_(statements), |
1144 position_(pos), | 1149 position_(pos), |
1145 compare_type_(NONE), | 1150 compare_type_(NONE), |
1146 entry_id_(AstNode::GetNextId()) { | 1151 entry_id_(AstNode::GetNextId()) { |
1147 } | 1152 } |
1148 | 1153 |
1149 } } // namespace v8::internal | 1154 } } // namespace v8::internal |
OLD | NEW |