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

Side by Side Diff: src/factory.cc

Issue 202293004: Work in progress: ES6 Maps and Sets with deterministic iteration support (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Avoid unnecessary growth Created 6 years, 8 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/objects.cc » ('j') | src/objects.cc » ('J')
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 20 matching lines...) Expand all
31 #include "debug.h" 31 #include "debug.h"
32 #include "execution.h" 32 #include "execution.h"
33 #include "factory.h" 33 #include "factory.h"
34 #include "isolate-inl.h" 34 #include "isolate-inl.h"
35 #include "macro-assembler.h" 35 #include "macro-assembler.h"
36 #include "objects.h" 36 #include "objects.h"
37 #include "objects-visiting.h" 37 #include "objects-visiting.h"
38 #include "platform.h" 38 #include "platform.h"
39 #include "scopeinfo.h" 39 #include "scopeinfo.h"
40 40
41 #include "close-table.h"
42
41 namespace v8 { 43 namespace v8 {
42 namespace internal { 44 namespace internal {
43 45
44 46
45 Handle<Box> Factory::NewBox(Handle<Object> value, PretenureFlag pretenure) { 47 Handle<Box> Factory::NewBox(Handle<Object> value, PretenureFlag pretenure) {
46 CALL_HEAP_FUNCTION( 48 CALL_HEAP_FUNCTION(
47 isolate(), 49 isolate(),
48 isolate()->heap()->AllocateBox(*value, pretenure), 50 isolate()->heap()->AllocateBox(*value, pretenure),
49 Box); 51 Box);
50 } 52 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 137
136 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) { 138 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) {
137 ASSERT(0 <= at_least_space_for); 139 ASSERT(0 <= at_least_space_for);
138 CALL_HEAP_FUNCTION(isolate(), 140 CALL_HEAP_FUNCTION(isolate(),
139 ObjectHashSet::Allocate(isolate()->heap(), 141 ObjectHashSet::Allocate(isolate()->heap(),
140 at_least_space_for), 142 at_least_space_for),
141 ObjectHashSet); 143 ObjectHashSet);
142 } 144 }
143 145
144 146
147 Handle<CloseTableSet> Factory::NewCloseTableSet() {
148 CALL_HEAP_FUNCTION(isolate(),
149 CloseTableSet::Allocate(isolate()->heap(), 4),
150 CloseTableSet);
151 }
152
153
154 Handle<CloseTableMap> Factory::NewCloseTableMap() {
155 CALL_HEAP_FUNCTION(isolate(),
156 CloseTableMap::Allocate(isolate()->heap(), 4),
157 CloseTableMap);
158 }
159
160
145 Handle<ObjectHashTable> Factory::NewObjectHashTable( 161 Handle<ObjectHashTable> Factory::NewObjectHashTable(
146 int at_least_space_for, 162 int at_least_space_for,
147 MinimumCapacity capacity_option) { 163 MinimumCapacity capacity_option) {
148 ASSERT(0 <= at_least_space_for); 164 ASSERT(0 <= at_least_space_for);
149 CALL_HEAP_FUNCTION(isolate(), 165 CALL_HEAP_FUNCTION(isolate(),
150 ObjectHashTable::Allocate(isolate()->heap(), 166 ObjectHashTable::Allocate(isolate()->heap(),
151 at_least_space_for, 167 at_least_space_for,
152 capacity_option), 168 capacity_option),
153 ObjectHashTable); 169 ObjectHashTable);
154 } 170 }
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 return Handle<Object>::null(); 2050 return Handle<Object>::null();
2035 } 2051 }
2036 2052
2037 2053
2038 Handle<Object> Factory::ToBoolean(bool value) { 2054 Handle<Object> Factory::ToBoolean(bool value) {
2039 return value ? true_value() : false_value(); 2055 return value ? true_value() : false_value();
2040 } 2056 }
2041 2057
2042 2058
2043 } } // namespace v8::internal 2059 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698