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

Side by Side Diff: src/heap.h

Issue 211333002: Replace HeapNumber as doublebox with an explicit MutableHeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | src/json-parser.h » ('J')
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 V(Oddball, the_hole_value, TheHoleValue) \ 58 V(Oddball, the_hole_value, TheHoleValue) \
59 V(Oddball, null_value, NullValue) \ 59 V(Oddball, null_value, NullValue) \
60 V(Oddball, true_value, TrueValue) \ 60 V(Oddball, true_value, TrueValue) \
61 V(Oddball, false_value, FalseValue) \ 61 V(Oddball, false_value, FalseValue) \
62 V(Oddball, uninitialized_value, UninitializedValue) \ 62 V(Oddball, uninitialized_value, UninitializedValue) \
63 V(Map, cell_map, CellMap) \ 63 V(Map, cell_map, CellMap) \
64 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ 64 V(Map, global_property_cell_map, GlobalPropertyCellMap) \
65 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ 65 V(Map, shared_function_info_map, SharedFunctionInfoMap) \
66 V(Map, meta_map, MetaMap) \ 66 V(Map, meta_map, MetaMap) \
67 V(Map, heap_number_map, HeapNumberMap) \ 67 V(Map, heap_number_map, HeapNumberMap) \
68 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \
68 V(Map, native_context_map, NativeContextMap) \ 69 V(Map, native_context_map, NativeContextMap) \
69 V(Map, fixed_array_map, FixedArrayMap) \ 70 V(Map, fixed_array_map, FixedArrayMap) \
70 V(Map, code_map, CodeMap) \ 71 V(Map, code_map, CodeMap) \
71 V(Map, scope_info_map, ScopeInfoMap) \ 72 V(Map, scope_info_map, ScopeInfoMap) \
72 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ 73 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
73 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ 74 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
74 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \ 75 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \
75 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ 76 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
76 V(Map, hash_table_map, HashTableMap) \ 77 V(Map, hash_table_map, HashTableMap) \
77 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ 78 V(FixedArray, empty_fixed_array, EmptyFixedArray) \
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 V(the_hole_value) \ 240 V(the_hole_value) \
240 V(null_value) \ 241 V(null_value) \
241 V(true_value) \ 242 V(true_value) \
242 V(false_value) \ 243 V(false_value) \
243 V(uninitialized_value) \ 244 V(uninitialized_value) \
244 V(cell_map) \ 245 V(cell_map) \
245 V(global_property_cell_map) \ 246 V(global_property_cell_map) \
246 V(shared_function_info_map) \ 247 V(shared_function_info_map) \
247 V(meta_map) \ 248 V(meta_map) \
248 V(heap_number_map) \ 249 V(heap_number_map) \
250 V(mutable_heap_number_map) \
249 V(native_context_map) \ 251 V(native_context_map) \
250 V(fixed_array_map) \ 252 V(fixed_array_map) \
251 V(code_map) \ 253 V(code_map) \
252 V(scope_info_map) \ 254 V(scope_info_map) \
253 V(fixed_cow_array_map) \ 255 V(fixed_cow_array_map) \
254 V(fixed_double_array_map) \ 256 V(fixed_double_array_map) \
255 V(constant_pool_array_map) \ 257 V(constant_pool_array_map) \
256 V(no_interceptor_result_sentinel) \ 258 V(no_interceptor_result_sentinel) \
257 V(hash_table_map) \ 259 V(hash_table_map) \
258 V(empty_fixed_array) \ 260 V(empty_fixed_array) \
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 MUST_USE_RESULT MaybeObject* AllocateArgumentsObject( 1114 MUST_USE_RESULT MaybeObject* AllocateArgumentsObject(
1113 Object* callee, int length); 1115 Object* callee, int length);
1114 1116
1115 // Same as NewNumberFromDouble, but may return a preallocated/immutable 1117 // Same as NewNumberFromDouble, but may return a preallocated/immutable
1116 // number object (e.g., minus_zero_value_, nan_value_) 1118 // number object (e.g., minus_zero_value_, nan_value_)
1117 MUST_USE_RESULT MaybeObject* NumberFromDouble( 1119 MUST_USE_RESULT MaybeObject* NumberFromDouble(
1118 double value, PretenureFlag pretenure = NOT_TENURED); 1120 double value, PretenureFlag pretenure = NOT_TENURED);
1119 1121
1120 // Allocated a HeapNumber from value. 1122 // Allocated a HeapNumber from value.
1121 MUST_USE_RESULT MaybeObject* AllocateHeapNumber( 1123 MUST_USE_RESULT MaybeObject* AllocateHeapNumber(
1122 double value, PretenureFlag pretenure = NOT_TENURED); 1124 double value,
1125 MutableMode mode = IMMUTABLE,
1126 PretenureFlag pretenure = NOT_TENURED);
1123 1127
1124 // Converts an int into either a Smi or a HeapNumber object. 1128 // Converts an int into either a Smi or a HeapNumber object.
1125 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 1129 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
1126 // failed. 1130 // failed.
1127 // Please note this does not perform a garbage collection. 1131 // Please note this does not perform a garbage collection.
1128 MUST_USE_RESULT inline MaybeObject* NumberFromInt32( 1132 MUST_USE_RESULT inline MaybeObject* NumberFromInt32(
1129 int32_t value, PretenureFlag pretenure = NOT_TENURED); 1133 int32_t value, PretenureFlag pretenure = NOT_TENURED);
1130 1134
1131 // Converts an int into either a Smi or a HeapNumber object. 1135 // Converts an int into either a Smi or a HeapNumber object.
1132 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 1136 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3146 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3143 3147
3144 private: 3148 private:
3145 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3149 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3146 }; 3150 };
3147 #endif // DEBUG 3151 #endif // DEBUG
3148 3152
3149 } } // namespace v8::internal 3153 } } // namespace v8::internal
3150 3154
3151 #endif // V8_HEAP_H_ 3155 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | src/json-parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698