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

Side by Side Diff: src/runtime/runtime.h

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 4 months 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/regexp/jsregexp.cc ('k') | src/runtime/runtime-i18n.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 // 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 #ifndef V8_RUNTIME_RUNTIME_H_ 5 #ifndef V8_RUNTIME_RUNTIME_H_
6 #define V8_RUNTIME_RUNTIME_H_ 6 #define V8_RUNTIME_RUNTIME_H_
7 7
8 #include <memory>
9
8 #include "src/allocation.h" 10 #include "src/allocation.h"
9 #include "src/base/platform/time.h" 11 #include "src/base/platform/time.h"
10 #include "src/objects.h" 12 #include "src/objects.h"
11 #include "src/unicode.h" 13 #include "src/unicode.h"
12 #include "src/zone.h" 14 #include "src/zone.h"
13 15
14 namespace v8 { 16 namespace v8 {
15 namespace internal { 17 namespace internal {
16 18
17 // * Each intrinsic is consistently exposed in JavaScript via 2 names: 19 // * Each intrinsic is consistently exposed in JavaScript via 2 names:
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() { 1091 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() {
1090 return &to_lower_mapping_; 1092 return &to_lower_mapping_;
1091 } 1093 }
1092 1094
1093 Runtime::Function* redirected_intrinsic_functions() { 1095 Runtime::Function* redirected_intrinsic_functions() {
1094 return redirected_intrinsic_functions_.get(); 1096 return redirected_intrinsic_functions_.get();
1095 } 1097 }
1096 1098
1097 void set_redirected_intrinsic_functions( 1099 void set_redirected_intrinsic_functions(
1098 Runtime::Function* redirected_intrinsic_functions) { 1100 Runtime::Function* redirected_intrinsic_functions) {
1099 redirected_intrinsic_functions_.Reset(redirected_intrinsic_functions); 1101 redirected_intrinsic_functions_.reset(redirected_intrinsic_functions);
1100 } 1102 }
1101 1103
1102 private: 1104 private:
1103 RuntimeState() {} 1105 RuntimeState() {}
1104 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_; 1106 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_;
1105 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_; 1107 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_;
1106 1108
1107 1109 std::unique_ptr<Runtime::Function[]> redirected_intrinsic_functions_;
1108 base::SmartArrayPointer<Runtime::Function> redirected_intrinsic_functions_;
1109 1110
1110 friend class Isolate; 1111 friend class Isolate;
1111 friend class Runtime; 1112 friend class Runtime;
1112 1113
1113 DISALLOW_COPY_AND_ASSIGN(RuntimeState); 1114 DISALLOW_COPY_AND_ASSIGN(RuntimeState);
1114 }; 1115 };
1115 1116
1116 1117
1117 std::ostream& operator<<(std::ostream&, Runtime::FunctionId); 1118 std::ostream& operator<<(std::ostream&, Runtime::FunctionId);
1118 1119
1119 //--------------------------------------------------------------------------- 1120 //---------------------------------------------------------------------------
1120 // Constants used by interface to runtime functions. 1121 // Constants used by interface to runtime functions.
1121 1122
1122 class AllocateDoubleAlignFlag : public BitField<bool, 0, 1> {}; 1123 class AllocateDoubleAlignFlag : public BitField<bool, 0, 1> {};
1123 class AllocateTargetSpace : public BitField<AllocationSpace, 1, 3> {}; 1124 class AllocateTargetSpace : public BitField<AllocationSpace, 1, 3> {};
1124 1125
1125 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; 1126 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {};
1126 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; 1127 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {};
1127 STATIC_ASSERT(LANGUAGE_END == 3); 1128 STATIC_ASSERT(LANGUAGE_END == 3);
1128 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; 1129 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {};
1129 1130
1130 } // namespace internal 1131 } // namespace internal
1131 } // namespace v8 1132 } // namespace v8
1132 1133
1133 #endif // V8_RUNTIME_RUNTIME_H_ 1134 #endif // V8_RUNTIME_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/regexp/jsregexp.cc ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698