| 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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 Handle<Object> arg2) { \ | 1184 Handle<Object> arg2) { \ |
| 1185 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ | 1185 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ |
| 1186 arg2); \ | 1186 arg2); \ |
| 1187 } | 1187 } |
| 1188 DEFINE_ERROR(Error, error) | 1188 DEFINE_ERROR(Error, error) |
| 1189 DEFINE_ERROR(EvalError, eval_error) | 1189 DEFINE_ERROR(EvalError, eval_error) |
| 1190 DEFINE_ERROR(RangeError, range_error) | 1190 DEFINE_ERROR(RangeError, range_error) |
| 1191 DEFINE_ERROR(ReferenceError, reference_error) | 1191 DEFINE_ERROR(ReferenceError, reference_error) |
| 1192 DEFINE_ERROR(SyntaxError, syntax_error) | 1192 DEFINE_ERROR(SyntaxError, syntax_error) |
| 1193 DEFINE_ERROR(TypeError, type_error) | 1193 DEFINE_ERROR(TypeError, type_error) |
| 1194 DEFINE_ERROR(URIError, uri_error) |
| 1195 |
| 1194 #undef DEFINE_ERROR | 1196 #undef DEFINE_ERROR |
| 1195 | 1197 |
| 1196 | 1198 |
| 1197 Handle<JSFunction> Factory::NewFunction(Handle<Map> map, | 1199 Handle<JSFunction> Factory::NewFunction(Handle<Map> map, |
| 1198 Handle<SharedFunctionInfo> info, | 1200 Handle<SharedFunctionInfo> info, |
| 1199 Handle<Context> context, | 1201 Handle<Context> context, |
| 1200 PretenureFlag pretenure) { | 1202 PretenureFlag pretenure) { |
| 1201 AllocationSpace space = pretenure == TENURED ? OLD_SPACE : NEW_SPACE; | 1203 AllocationSpace space = pretenure == TENURED ? OLD_SPACE : NEW_SPACE; |
| 1202 Handle<JSFunction> function = New<JSFunction>(map, space); | 1204 Handle<JSFunction> function = New<JSFunction>(map, space); |
| 1203 | 1205 |
| (...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2373 } | 2375 } |
| 2374 | 2376 |
| 2375 | 2377 |
| 2376 Handle<Object> Factory::ToBoolean(bool value) { | 2378 Handle<Object> Factory::ToBoolean(bool value) { |
| 2377 return value ? true_value() : false_value(); | 2379 return value ? true_value() : false_value(); |
| 2378 } | 2380 } |
| 2379 | 2381 |
| 2380 | 2382 |
| 2381 } // namespace internal | 2383 } // namespace internal |
| 2382 } // namespace v8 | 2384 } // namespace v8 |
| OLD | NEW |