Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/runtime.h

Issue 11638037: Remove most uses of StringInputBuffer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cleanup Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 F(RegExpConstructResult, 3, 1) \ 570 F(RegExpConstructResult, 3, 1) \
571 F(GetFromCache, 2, 1) \ 571 F(GetFromCache, 2, 1) \
572 F(NumberToString, 1, 1) 572 F(NumberToString, 1, 1)
573 573
574 574
575 //--------------------------------------------------------------------------- 575 //---------------------------------------------------------------------------
576 // Runtime provides access to all C++ runtime functions. 576 // Runtime provides access to all C++ runtime functions.
577 577
578 class RuntimeState { 578 class RuntimeState {
579 public: 579 public:
580 StaticResource<StringInputBuffer>* string_input_buffer() { 580 StaticResource<ConsStringIteratorOp>* string_iterator() {
581 return &string_input_buffer_; 581 return &string_iterator_;
582 } 582 }
583 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() { 583 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() {
584 return &to_upper_mapping_; 584 return &to_upper_mapping_;
585 } 585 }
586 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() { 586 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() {
587 return &to_lower_mapping_; 587 return &to_lower_mapping_;
588 } 588 }
589 StringInputBuffer* string_input_buffer_compare_bufx() { 589 ConsStringIteratorOp* string_iterator_compare_x() {
590 return &string_input_buffer_compare_bufx_; 590 return &string_iterator_compare_x_;
591 } 591 }
592 StringInputBuffer* string_input_buffer_compare_bufy() { 592 ConsStringIteratorOp* string_iterator_compare_y() {
593 return &string_input_buffer_compare_bufy_; 593 return &string_iterator_compare_y_;
594 } 594 }
595 StringInputBuffer* string_locale_compare_buf1() { 595 ConsStringIteratorOp* string_locale_compare_it1() {
596 return &string_locale_compare_buf1_; 596 return &string_locale_compare_it1_;
597 } 597 }
598 StringInputBuffer* string_locale_compare_buf2() { 598 ConsStringIteratorOp* string_locale_compare_it2() {
599 return &string_locale_compare_buf2_; 599 return &string_locale_compare_it2_;
600 } 600 }
601 601
602 private: 602 private:
603 RuntimeState() {} 603 RuntimeState() {}
604 // Non-reentrant string buffer for efficient general use in the runtime. 604 // Non-reentrant string buffer for efficient general use in the runtime.
605 StaticResource<StringInputBuffer> string_input_buffer_; 605 StaticResource<ConsStringIteratorOp> string_iterator_;
606 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_; 606 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_;
607 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_; 607 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_;
608 StringInputBuffer string_input_buffer_compare_bufx_; 608 ConsStringIteratorOp string_iterator_compare_x_;
609 StringInputBuffer string_input_buffer_compare_bufy_; 609 ConsStringIteratorOp string_iterator_compare_y_;
610 StringInputBuffer string_locale_compare_buf1_; 610 ConsStringIteratorOp string_locale_compare_it1_;
611 StringInputBuffer string_locale_compare_buf2_; 611 ConsStringIteratorOp string_locale_compare_it2_;
612 612
613 friend class Isolate; 613 friend class Isolate;
614 friend class Runtime; 614 friend class Runtime;
615 615
616 DISALLOW_COPY_AND_ASSIGN(RuntimeState); 616 DISALLOW_COPY_AND_ASSIGN(RuntimeState);
617 }; 617 };
618 618
619 619
620 class Runtime : public AllStatic { 620 class Runtime : public AllStatic {
621 public: 621 public:
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 //--------------------------------------------------------------------------- 724 //---------------------------------------------------------------------------
725 // Constants used by interface to runtime functions. 725 // Constants used by interface to runtime functions.
726 726
727 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 727 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
728 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 728 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
729 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; 729 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {};
730 730
731 } } // namespace v8::internal 731 } } // namespace v8::internal
732 732
733 #endif // V8_RUNTIME_H_ 733 #endif // V8_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698