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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 // List of functions with custom constant call IC stubs. | 562 // List of functions with custom constant call IC stubs. |
563 // | 563 // |
564 // Installation of custom call generators for the selected builtins is | 564 // Installation of custom call generators for the selected builtins is |
565 // handled by the bootstrapper. | 565 // handled by the bootstrapper. |
566 // | 566 // |
567 // Each entry has a name of a global function (lowercased), a name of | 567 // Each entry has a name of a global function (lowercased), a name of |
568 // a builtin function on its instance prototype (the one the generator | 568 // a builtin function on its instance prototype (the one the generator |
569 // is set for), and a name of a generator itself (used to build ids | 569 // is set for), and a name of a generator itself (used to build ids |
570 // and generator function names). | 570 // and generator function names). |
571 #define CUSTOM_CALL_IC_GENERATORS(V) \ | 571 #define CUSTOM_CALL_IC_GENERATORS(V) \ |
572 V(array, push, ArrayPush) \ | 572 V(array, push, ArrayPush) \ |
573 V(array, pop, ArrayPop) | 573 V(array, pop, ArrayPop) \ |
| 574 V(string, charCodeAt, StringCharCodeAt) \ |
| 575 V(string, charAt, StringCharAt) |
574 | 576 |
575 | 577 |
576 class CallStubCompiler: public StubCompiler { | 578 class CallStubCompiler: public StubCompiler { |
577 public: | 579 public: |
578 enum { | 580 enum { |
579 #define DECLARE_CALL_GENERATOR_ID(ignored1, ignored2, name) \ | 581 #define DECLARE_CALL_GENERATOR_ID(ignored1, ignored2, name) \ |
580 k##name##CallGenerator, | 582 k##name##CallGenerator, |
581 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR_ID) | 583 CUSTOM_CALL_IC_GENERATORS(DECLARE_CALL_GENERATOR_ID) |
582 #undef DECLARE_CALL_GENERATOR_ID | 584 #undef DECLARE_CALL_GENERATOR_ID |
583 kNumCallGenerators | 585 kNumCallGenerators |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 | 692 |
691 JSFunction* constant_function_; | 693 JSFunction* constant_function_; |
692 bool is_simple_api_call_; | 694 bool is_simple_api_call_; |
693 FunctionTemplateInfo* expected_receiver_type_; | 695 FunctionTemplateInfo* expected_receiver_type_; |
694 CallHandlerInfo* api_call_info_; | 696 CallHandlerInfo* api_call_info_; |
695 }; | 697 }; |
696 | 698 |
697 } } // namespace v8::internal | 699 } } // namespace v8::internal |
698 | 700 |
699 #endif // V8_STUB_CACHE_H_ | 701 #endif // V8_STUB_CACHE_H_ |
OLD | NEW |