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

Side by Side Diff: src/factory.cc

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 | « src/factory.h ('k') | src/heap.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 23 matching lines...) Expand all
34 #include "macro-assembler.h" 34 #include "macro-assembler.h"
35 #include "objects.h" 35 #include "objects.h"
36 #include "objects-visiting.h" 36 #include "objects-visiting.h"
37 #include "platform.h" 37 #include "platform.h"
38 #include "scopeinfo.h" 38 #include "scopeinfo.h"
39 39
40 namespace v8 { 40 namespace v8 {
41 namespace internal { 41 namespace internal {
42 42
43 43
44 Handle<Box> Factory::NewBox(Handle<Object> value, PretenureFlag pretenure) {
45 CALL_HEAP_FUNCTION(
46 isolate(),
47 isolate()->heap()->AllocateBox(*value, pretenure),
48 Box);
49 }
50
51
44 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) { 52 Handle<FixedArray> Factory::NewFixedArray(int size, PretenureFlag pretenure) {
45 ASSERT(0 <= size); 53 ASSERT(0 <= size);
46 CALL_HEAP_FUNCTION( 54 CALL_HEAP_FUNCTION(
47 isolate(), 55 isolate(),
48 isolate()->heap()->AllocateFixedArray(size, pretenure), 56 isolate()->heap()->AllocateFixedArray(size, pretenure),
49 FixedArray); 57 FixedArray);
50 } 58 }
51 59
52 60
53 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size, 61 Handle<FixedArray> Factory::NewFixedArrayWithHoles(int size,
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 return Handle<Object>::null(); 1564 return Handle<Object>::null();
1557 } 1565 }
1558 1566
1559 1567
1560 Handle<Object> Factory::ToBoolean(bool value) { 1568 Handle<Object> Factory::ToBoolean(bool value) {
1561 return value ? true_value() : false_value(); 1569 return value ? true_value() : false_value();
1562 } 1570 }
1563 1571
1564 1572
1565 } } // namespace v8::internal 1573 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698