OLD | NEW |
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 #include "src/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 Handle<Context> context(isolate()->native_context()); | 1207 Handle<Context> context(isolate()->native_context()); |
1208 Handle<SharedFunctionInfo> info = | 1208 Handle<SharedFunctionInfo> info = |
1209 NewSharedFunctionInfo(name, code, map->is_constructor()); | 1209 NewSharedFunctionInfo(name, code, map->is_constructor()); |
1210 DCHECK(is_sloppy(info->language_mode())); | 1210 DCHECK(is_sloppy(info->language_mode())); |
1211 DCHECK( | 1211 DCHECK( |
1212 map.is_identical_to(isolate()->sloppy_function_map()) || | 1212 map.is_identical_to(isolate()->sloppy_function_map()) || |
1213 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || | 1213 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || |
1214 map.is_identical_to( | 1214 map.is_identical_to( |
1215 isolate()->sloppy_function_with_readonly_prototype_map()) || | 1215 isolate()->sloppy_function_with_readonly_prototype_map()) || |
1216 map.is_identical_to(isolate()->strict_function_map()) || | 1216 map.is_identical_to(isolate()->strict_function_map()) || |
| 1217 (FLAG_expose_wasm && |
| 1218 map.is_identical_to(isolate()->wasm_function_map())) || |
1217 map.is_identical_to(isolate()->proxy_function_map())); | 1219 map.is_identical_to(isolate()->proxy_function_map())); |
1218 return NewFunction(map, info, context); | 1220 return NewFunction(map, info, context); |
1219 } | 1221 } |
1220 | 1222 |
1221 | 1223 |
1222 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { | 1224 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { |
1223 return NewFunction( | 1225 return NewFunction( |
1224 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); | 1226 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); |
1225 } | 1227 } |
1226 | 1228 |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2320 } | 2322 } |
2321 | 2323 |
2322 | 2324 |
2323 Handle<Object> Factory::ToBoolean(bool value) { | 2325 Handle<Object> Factory::ToBoolean(bool value) { |
2324 return value ? true_value() : false_value(); | 2326 return value ? true_value() : false_value(); |
2325 } | 2327 } |
2326 | 2328 |
2327 | 2329 |
2328 } // namespace internal | 2330 } // namespace internal |
2329 } // namespace v8 | 2331 } // namespace v8 |
OLD | NEW |