OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/js-operator.h" | 5 #include "src/compiler/js-operator.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/lazy-instance.h" | 9 #include "src/base/lazy-instance.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 #define CACHED_WITH_LANGUAGE_MODE(Name, properties, value_input_count, \ | 505 #define CACHED_WITH_LANGUAGE_MODE(Name, properties, value_input_count, \ |
506 value_output_count) \ | 506 value_output_count) \ |
507 const Operator* JSOperatorBuilder::Name(LanguageMode language_mode) { \ | 507 const Operator* JSOperatorBuilder::Name(LanguageMode language_mode) { \ |
508 switch (language_mode) { \ | 508 switch (language_mode) { \ |
509 case SLOPPY: \ | 509 case SLOPPY: \ |
510 return &cache_.k##Name##SloppyOperator; \ | 510 return &cache_.k##Name##SloppyOperator; \ |
511 case STRICT: \ | 511 case STRICT: \ |
512 return &cache_.k##Name##StrictOperator; \ | 512 return &cache_.k##Name##StrictOperator; \ |
513 case STRONG: \ | 513 case STRONG: \ |
514 return &cache_.k##Name##StrongOperator; \ | 514 return &cache_.k##Name##StrongOperator; \ |
515 case STRONG_BIT: \ | 515 default: \ |
516 break; /* %*!%^$#@ */ \ | 516 break; /* %*!%^$#@ */ \ |
517 } \ | 517 } \ |
518 UNREACHABLE(); \ | 518 UNREACHABLE(); \ |
519 return nullptr; \ | 519 return nullptr; \ |
520 } | 520 } |
521 CACHED_OP_LIST_WITH_LANGUAGE_MODE(CACHED_WITH_LANGUAGE_MODE) | 521 CACHED_OP_LIST_WITH_LANGUAGE_MODE(CACHED_WITH_LANGUAGE_MODE) |
522 #undef CACHED_WITH_LANGUAGE_MODE | 522 #undef CACHED_WITH_LANGUAGE_MODE |
523 | 523 |
524 | 524 |
525 const Operator* JSOperatorBuilder::CallFunction(size_t arity, | 525 const Operator* JSOperatorBuilder::CallFunction(size_t arity, |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 return new (zone()) Operator1<Unique<String>>( // -- | 722 return new (zone()) Operator1<Unique<String>>( // -- |
723 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode | 723 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode |
724 "JSCreateCatchContext", // name | 724 "JSCreateCatchContext", // name |
725 2, 1, 1, 1, 1, 2, // counts | 725 2, 1, 1, 1, 1, 2, // counts |
726 name); // parameter | 726 name); // parameter |
727 } | 727 } |
728 | 728 |
729 } // namespace compiler | 729 } // namespace compiler |
730 } // namespace internal | 730 } // namespace internal |
731 } // namespace v8 | 731 } // namespace v8 |
OLD | NEW |