| 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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 Handle<SharedFunctionInfo> info = | 1221 Handle<SharedFunctionInfo> info = |
| 1222 NewSharedFunctionInfo(name, code, map->is_constructor()); | 1222 NewSharedFunctionInfo(name, code, map->is_constructor()); |
| 1223 DCHECK(is_sloppy(info->language_mode())); | 1223 DCHECK(is_sloppy(info->language_mode())); |
| 1224 DCHECK(!map->IsUndefined()); | 1224 DCHECK(!map->IsUndefined()); |
| 1225 DCHECK( | 1225 DCHECK( |
| 1226 map.is_identical_to(isolate()->sloppy_function_map()) || | 1226 map.is_identical_to(isolate()->sloppy_function_map()) || |
| 1227 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || | 1227 map.is_identical_to(isolate()->sloppy_function_without_prototype_map()) || |
| 1228 map.is_identical_to( | 1228 map.is_identical_to( |
| 1229 isolate()->sloppy_function_with_readonly_prototype_map()) || | 1229 isolate()->sloppy_function_with_readonly_prototype_map()) || |
| 1230 map.is_identical_to(isolate()->strict_function_map()) || | 1230 map.is_identical_to(isolate()->strict_function_map()) || |
| 1231 map.is_identical_to(isolate()->strict_function_without_prototype_map()) || |
| 1231 // TODO(titzer): wasm_function_map() could be undefined here. ugly. | 1232 // TODO(titzer): wasm_function_map() could be undefined here. ugly. |
| 1232 (*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) || | 1233 (*map == context->get(Context::WASM_FUNCTION_MAP_INDEX)) || |
| 1233 map.is_identical_to(isolate()->proxy_function_map())); | 1234 map.is_identical_to(isolate()->proxy_function_map())); |
| 1234 return NewFunction(map, info, context); | 1235 return NewFunction(map, info, context); |
| 1235 } | 1236 } |
| 1236 | 1237 |
| 1237 | 1238 |
| 1238 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { | 1239 Handle<JSFunction> Factory::NewFunction(Handle<String> name) { |
| 1239 return NewFunction( | 1240 return NewFunction( |
| 1240 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); | 1241 isolate()->sloppy_function_map(), name, MaybeHandle<Code>()); |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 } | 2373 } |
| 2373 | 2374 |
| 2374 | 2375 |
| 2375 Handle<Object> Factory::ToBoolean(bool value) { | 2376 Handle<Object> Factory::ToBoolean(bool value) { |
| 2376 return value ? true_value() : false_value(); | 2377 return value ? true_value() : false_value(); |
| 2377 } | 2378 } |
| 2378 | 2379 |
| 2379 | 2380 |
| 2380 } // namespace internal | 2381 } // namespace internal |
| 2381 } // namespace v8 | 2382 } // namespace v8 |
| OLD | NEW |