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

Side by Side Diff: test/cctest/cctest.h

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: merging with master Created 4 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
« no previous file with comments | « src/runtime/runtime-utils.h ('k') | test/cctest/test-strings.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 ~InitializedHandleScope(); 576 ~InitializedHandleScope();
577 577
578 // Prefixing the below with main_ reduces a lot of naming clashes. 578 // Prefixing the below with main_ reduces a lot of naming clashes.
579 i::Isolate* main_isolate() { return main_isolate_; } 579 i::Isolate* main_isolate() { return main_isolate_; }
580 580
581 private: 581 private:
582 i::Isolate* main_isolate_; 582 i::Isolate* main_isolate_;
583 std::unique_ptr<InitializedHandleScopeImpl> initialized_handle_scope_impl_; 583 std::unique_ptr<InitializedHandleScopeImpl> initialized_handle_scope_impl_;
584 }; 584 };
585 585
586
587 class HandleAndZoneScope : public InitializedHandleScope { 586 class HandleAndZoneScope : public InitializedHandleScope {
588 public: 587 public:
589 HandleAndZoneScope(); 588 HandleAndZoneScope();
590 ~HandleAndZoneScope(); 589 ~HandleAndZoneScope();
591 590
592 // Prefixing the below with main_ reduces a lot of naming clashes. 591 // Prefixing the below with main_ reduces a lot of naming clashes.
593 i::Zone* main_zone() { return main_zone_.get(); } 592 i::Zone* main_zone() { return main_zone_.get(); }
594 593
595 private: 594 private:
596 v8::internal::AccountingAllocator allocator_; 595 v8::internal::AccountingAllocator allocator_;
597 std::unique_ptr<i::Zone> main_zone_; 596 std::unique_ptr<i::Zone> main_zone_;
598 }; 597 };
599 598
599 class StaticOneByteResource : public v8::String::ExternalOneByteStringResource {
600 public:
601 explicit StaticOneByteResource(const char* data) : data_(data) {}
602
603 ~StaticOneByteResource() {}
604
605 const char* data() const { return data_; }
606
607 size_t length() const { return strlen(data_); }
608
609 private:
610 const char* data_;
611 };
612
600 #endif // ifndef CCTEST_H_ 613 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-utils.h ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698