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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 DCHECK(!map->IsUndefined(isolate())); | 1248 DCHECK(!map->IsUndefined(isolate())); |
1249 DCHECK( | 1249 DCHECK( |
1250 map.is_identical_to(isolate()->sloppy_function_map()) || | 1250 map.is_identical_to(isolate()->sloppy_function_map()) || |
1251 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || | 1251 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || |
1252 map.is_identical_to( | 1252 map.is_identical_to( |
1253 isolate()->sloppy_function_with_readonly_prototype_map()) || | 1253 isolate()->sloppy_function_with_readonly_prototype_map()) || |
1254 map.is_identical_to(isolate()->strict_function_map()) || | 1254 map.is_identical_to(isolate()->strict_function_map()) || |
1255 map.is_identical_to(isolate()->strict_function_without_prototype_map()) || | 1255 map.is_identical_to(isolate()->strict_function_without_prototype_map()) || |
1256 // TODO(titzer): wasm_function_map() could be undefined here. ugly. | 1256 // TODO(titzer): wasm_function_map() could be undefined here. ugly. |
1257 (*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) || | 1257 (*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) || |
| 1258 (*map == context->get(Context::NATIVE_FUNCTION_MAP_INDEX)) || |
1258 map.is_identical_to(isolate()->proxy_function_map())); | 1259 map.is_identical_to(isolate()->proxy_function_map())); |
1259 return NewFunction(map, info, context); | 1260 return NewFunction(map, info, context); |
1260 } | 1261 } |
1261 | 1262 |
1262 | 1263 |
1263 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { | 1264 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { |
1264 return NewFunction( | 1265 return NewFunction( |
1265 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); | 1266 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); |
1266 } | 1267 } |
1267 | 1268 |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2392 } | 2393 } |
2393 | 2394 |
2394 | 2395 |
2395 Handle<Object> Factory::ToBoolean(bool value) { | 2396 Handle<Object> Factory::ToBoolean(bool value) { |
2396 return value ? true_value() : false_value(); | 2397 return value ? true_value() : false_value(); |
2397 } | 2398 } |
2398 | 2399 |
2399 | 2400 |
2400 } // namespace internal | 2401 } // namespace internal |
2401 } // namespace v8 | 2402 } // namespace v8 |
OLD | NEW |