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

Side by Side Diff: src/factory.h

Issue 2631123002: [crankshaft][runtime] Initialize uninitialized double fields with hole NaN value instead of 0.0. (Closed)
Patch Set: Addressing comments Created 3 years, 11 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/crankshaft/hydrogen.cc ('k') | src/json-parser.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_FACTORY_H_ 5 #ifndef V8_FACTORY_H_
6 #define V8_FACTORY_H_ 6 #define V8_FACTORY_H_
7 7
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 Smi::IsValid(static_cast<int32_t>(value))) { 429 Smi::IsValid(static_cast<int32_t>(value))) {
430 return Handle<Object>(Smi::FromInt(static_cast<int32_t>(value)), 430 return Handle<Object>(Smi::FromInt(static_cast<int32_t>(value)),
431 isolate()); 431 isolate());
432 } 432 }
433 return NewNumber(static_cast<double>(value), pretenure); 433 return NewNumber(static_cast<double>(value), pretenure);
434 } 434 }
435 Handle<HeapNumber> NewHeapNumber(double value, 435 Handle<HeapNumber> NewHeapNumber(double value,
436 MutableMode mode = IMMUTABLE, 436 MutableMode mode = IMMUTABLE,
437 PretenureFlag pretenure = NOT_TENURED); 437 PretenureFlag pretenure = NOT_TENURED);
438 438
439 Handle<HeapNumber> NewMutableHeapNumber(
440 PretenureFlag pretenure = NOT_TENURED) {
441 double hole_nan = bit_cast<double>(kHoleNanInt64);
442 return NewHeapNumber(hole_nan, MUTABLE, pretenure);
443 }
444
439 #define SIMD128_NEW_DECL(TYPE, Type, type, lane_count, lane_type) \ 445 #define SIMD128_NEW_DECL(TYPE, Type, type, lane_count, lane_type) \
440 Handle<Type> New##Type(lane_type lanes[lane_count], \ 446 Handle<Type> New##Type(lane_type lanes[lane_count], \
441 PretenureFlag pretenure = NOT_TENURED); 447 PretenureFlag pretenure = NOT_TENURED);
442 SIMD128_TYPES(SIMD128_NEW_DECL) 448 SIMD128_TYPES(SIMD128_NEW_DECL)
443 #undef SIMD128_NEW_DECL 449 #undef SIMD128_NEW_DECL
444 450
445 Handle<JSWeakMap> NewJSWeakMap(); 451 Handle<JSWeakMap> NewJSWeakMap();
446 452
447 Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length); 453 Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length);
448 454
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, 817 void SetStrictFunctionInstanceDescriptor(Handle<Map> map,
812 FunctionMode function_mode); 818 FunctionMode function_mode);
813 819
814 void SetClassFunctionInstanceDescriptor(Handle<Map> map); 820 void SetClassFunctionInstanceDescriptor(Handle<Map> map);
815 }; 821 };
816 822
817 } // namespace internal 823 } // namespace internal
818 } // namespace v8 824 } // namespace v8
819 825
820 #endif // V8_FACTORY_H_ 826 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/json-parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698