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

Side by Side Diff: src/factory.h

Issue 334323003: Reland r22082 "Replace HeapNumber as doublebox with an explicit MutableHeapNumber." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Migrations test fixed Created 6 years, 5 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/deoptimizer.cc ('k') | src/factory.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/isolate.h" 8 #include "src/isolate.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 PretenureFlag pretenure = NOT_TENURED); 345 PretenureFlag pretenure = NOT_TENURED);
346 Handle<Object> NewNumberFromSize(size_t value, 346 Handle<Object> NewNumberFromSize(size_t value,
347 PretenureFlag pretenure = NOT_TENURED) { 347 PretenureFlag pretenure = NOT_TENURED) {
348 if (Smi::IsValid(static_cast<intptr_t>(value))) { 348 if (Smi::IsValid(static_cast<intptr_t>(value))) {
349 return Handle<Object>(Smi::FromIntptr(static_cast<intptr_t>(value)), 349 return Handle<Object>(Smi::FromIntptr(static_cast<intptr_t>(value)),
350 isolate()); 350 isolate());
351 } 351 }
352 return NewNumber(static_cast<double>(value), pretenure); 352 return NewNumber(static_cast<double>(value), pretenure);
353 } 353 }
354 Handle<HeapNumber> NewHeapNumber(double value, 354 Handle<HeapNumber> NewHeapNumber(double value,
355 MutableMode mode = IMMUTABLE,
355 PretenureFlag pretenure = NOT_TENURED); 356 PretenureFlag pretenure = NOT_TENURED);
356 357
357
358 // These objects are used by the api to create env-independent data 358 // These objects are used by the api to create env-independent data
359 // structures in the heap. 359 // structures in the heap.
360 inline Handle<JSObject> NewNeanderObject() { 360 inline Handle<JSObject> NewNeanderObject() {
361 return NewJSObjectFromMap(neander_map()); 361 return NewJSObjectFromMap(neander_map());
362 } 362 }
363 363
364 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); 364 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length);
365 365
366 // JS objects are pretenured when allocated by the bootstrapper and 366 // JS objects are pretenured when allocated by the bootstrapper and
367 // runtime. 367 // runtime.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 PretenureFlag pretenure = TENURED); 710 PretenureFlag pretenure = TENURED);
711 711
712 Handle<JSFunction> NewFunction(Handle<Map> map, 712 Handle<JSFunction> NewFunction(Handle<Map> map,
713 Handle<String> name, 713 Handle<String> name,
714 MaybeHandle<Code> maybe_code); 714 MaybeHandle<Code> maybe_code);
715 }; 715 };
716 716
717 } } // namespace v8::internal 717 } } // namespace v8::internal
718 718
719 #endif // V8_FACTORY_H_ 719 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698