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

Side by Side Diff: src/factory.h

Issue 16562003: Allow smis for singleton types (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 7 years, 6 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 | « include/v8.h ('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 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 21 matching lines...) Expand all
32 #include "handles.h" 32 #include "handles.h"
33 #include "heap.h" 33 #include "heap.h"
34 34
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 // Interface for handle based allocation. 38 // Interface for handle based allocation.
39 39
40 class Factory { 40 class Factory {
41 public: 41 public:
42 // Allocate a new boxed value.
43 Handle<Box> NewBox(
44 Handle<Object> value,
45 PretenureFlag pretenure = NOT_TENURED);
46
42 // Allocate a new uninitialized fixed array. 47 // Allocate a new uninitialized fixed array.
43 Handle<FixedArray> NewFixedArray( 48 Handle<FixedArray> NewFixedArray(
44 int size, 49 int size,
45 PretenureFlag pretenure = NOT_TENURED); 50 PretenureFlag pretenure = NOT_TENURED);
46 51
47 // Allocate a new fixed array with non-existing entries (the hole). 52 // Allocate a new fixed array with non-existing entries (the hole).
48 Handle<FixedArray> NewFixedArrayWithHoles( 53 Handle<FixedArray> NewFixedArrayWithHoles(
49 int size, 54 int size,
50 PretenureFlag pretenure = NOT_TENURED); 55 PretenureFlag pretenure = NOT_TENURED);
51 56
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 } else { 554 } else {
550 return NewNumber(static_cast<double>(value), pretenure); 555 return NewNumber(static_cast<double>(value), pretenure);
551 } 556 }
552 } 557 }
553 558
554 559
555 560
556 } } // namespace v8::internal 561 } } // namespace v8::internal
557 562
558 #endif // V8_FACTORY_H_ 563 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698