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

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: Added growth Created 6 years, 9 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
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
145 Handle<ObjectHashTable> Factory::NewObjectHashTable( 154 Handle<ObjectHashTable> Factory::NewObjectHashTable(
146 int at_least_space_for, 155 int at_least_space_for,
147 MinimumCapacity capacity_option) { 156 MinimumCapacity capacity_option) {
148 ASSERT(0 <= at_least_space_for); 157 ASSERT(0 <= at_least_space_for);
149 CALL_HEAP_FUNCTION(isolate(), 158 CALL_HEAP_FUNCTION(isolate(),
150 ObjectHashTable::Allocate(isolate()->heap(), 159 ObjectHashTable::Allocate(isolate()->heap(),
151 at_least_space_for, 160 at_least_space_for,
152 capacity_option), 161 capacity_option),
153 ObjectHashTable); 162 ObjectHashTable);
154 } 163 }
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 return Handle<Object>::null(); 2043 return Handle<Object>::null();
2035 } 2044 }
2036 2045
2037 2046
2038 Handle<Object> Factory::ToBoolean(bool value) { 2047 Handle<Object> Factory::ToBoolean(bool value) {
2039 return value ? true_value() : false_value(); 2048 return value ? true_value() : false_value();
2040 } 2049 }
2041 2050
2042 2051
2043 } } // namespace v8::internal 2052 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698