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

Side by Side Diff: src/heap/heap.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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/globals.h ('k') | src/hydrogen-instructions.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 #include <limits>
6
7 #include "src/v8.h" 5 #include "src/v8.h"
8 6
9 #include "src/accessors.h" 7 #include "src/accessors.h"
10 #include "src/api.h" 8 #include "src/api.h"
11 #include "src/base/bits.h" 9 #include "src/base/bits.h"
12 #include "src/base/once.h" 10 #include "src/base/once.h"
13 #include "src/base/utils/random-number-generator.h" 11 #include "src/base/utils/random-number-generator.h"
14 #include "src/bootstrapper.h" 12 #include "src/bootstrapper.h"
15 #include "src/codegen.h" 13 #include "src/codegen.h"
16 #include "src/compilation-cache.h" 14 #include "src/compilation-cache.h"
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 void Heap::CreateInitialObjects() { 2901 void Heap::CreateInitialObjects() {
2904 HandleScope scope(isolate()); 2902 HandleScope scope(isolate());
2905 Factory* factory = isolate()->factory(); 2903 Factory* factory = isolate()->factory();
2906 2904
2907 // The -0 value must be set before NewNumber works. 2905 // The -0 value must be set before NewNumber works.
2908 set_minus_zero_value(*factory->NewHeapNumber(-0.0, IMMUTABLE, TENURED)); 2906 set_minus_zero_value(*factory->NewHeapNumber(-0.0, IMMUTABLE, TENURED));
2909 DCHECK(std::signbit(minus_zero_value()->Number()) != 0); 2907 DCHECK(std::signbit(minus_zero_value()->Number()) != 0);
2910 2908
2911 set_nan_value( 2909 set_nan_value(
2912 *factory->NewHeapNumber(base::OS::nan_value(), IMMUTABLE, TENURED)); 2910 *factory->NewHeapNumber(base::OS::nan_value(), IMMUTABLE, TENURED));
2913 set_infinity_value(*factory->NewHeapNumber( 2911 set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, IMMUTABLE, TENURED));
2914 std::numeric_limits<double>::infinity(), IMMUTABLE, TENURED));
2915 2912
2916 // The hole has not been created yet, but we want to put something 2913 // The hole has not been created yet, but we want to put something
2917 // predictable in the gaps in the string table, so lets make that Smi zero. 2914 // predictable in the gaps in the string table, so lets make that Smi zero.
2918 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0))); 2915 set_the_hole_value(reinterpret_cast<Oddball*>(Smi::FromInt(0)));
2919 2916
2920 // Allocate initial string table. 2917 // Allocate initial string table.
2921 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize)); 2918 set_string_table(*StringTable::New(isolate(), kInitialStringTableSize));
2922 2919
2923 // Finish initializing oddballs after creating the string table. 2920 // Finish initializing oddballs after creating the string table.
2924 Oddball::Initialize(isolate(), factory->undefined_value(), "undefined", 2921 Oddball::Initialize(isolate(), factory->undefined_value(), "undefined",
(...skipping 3511 matching lines...) Expand 10 before | Expand all | Expand 10 after
6436 static_cast<int>(object_sizes_last_time_[index])); 6433 static_cast<int>(object_sizes_last_time_[index]));
6437 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6434 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6438 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6435 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6439 6436
6440 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6437 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6441 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6438 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6442 ClearObjectStats(); 6439 ClearObjectStats();
6443 } 6440 }
6444 } 6441 }
6445 } // namespace v8::internal 6442 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698