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/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ | 1354 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ |
1355 arg2); \ | 1355 arg2); \ |
1356 } | 1356 } |
1357 DEFINE_ERROR(Error, error) | 1357 DEFINE_ERROR(Error, error) |
1358 DEFINE_ERROR(EvalError, eval_error) | 1358 DEFINE_ERROR(EvalError, eval_error) |
1359 DEFINE_ERROR(RangeError, range_error) | 1359 DEFINE_ERROR(RangeError, range_error) |
1360 DEFINE_ERROR(ReferenceError, reference_error) | 1360 DEFINE_ERROR(ReferenceError, reference_error) |
1361 DEFINE_ERROR(SyntaxError, syntax_error) | 1361 DEFINE_ERROR(SyntaxError, syntax_error) |
1362 DEFINE_ERROR(TypeError, type_error) | 1362 DEFINE_ERROR(TypeError, type_error) |
1363 DEFINE_ERROR(WasmCompileError, wasm_compile_error) | 1363 DEFINE_ERROR(WasmCompileError, wasm_compile_error) |
| 1364 DEFINE_ERROR(WasmLinkError, wasm_link_error) |
1364 DEFINE_ERROR(WasmRuntimeError, wasm_runtime_error) | 1365 DEFINE_ERROR(WasmRuntimeError, wasm_runtime_error) |
1365 #undef DEFINE_ERROR | 1366 #undef DEFINE_ERROR |
1366 | 1367 |
1367 Handle<JSFunction> Factory::NewFunction(Handle<Map> map, | 1368 Handle<JSFunction> Factory::NewFunction(Handle<Map> map, |
1368 Handle<SharedFunctionInfo> info, | 1369 Handle<SharedFunctionInfo> info, |
1369 Handle<Object> context_or_undefined, | 1370 Handle<Object> context_or_undefined, |
1370 PretenureFlag pretenure) { | 1371 PretenureFlag pretenure) { |
1371 AllocationSpace space = pretenure == TENURED ? OLD_SPACE : NEW_SPACE; | 1372 AllocationSpace space = pretenure == TENURED ? OLD_SPACE : NEW_SPACE; |
1372 Handle<JSFunction> function = New<JSFunction>(map, space); | 1373 Handle<JSFunction> function = New<JSFunction>(map, space); |
1373 DCHECK(context_or_undefined->IsContext() || | 1374 DCHECK(context_or_undefined->IsContext() || |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 2781 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); |
2781 iterator->set_initial_next(*next); | 2782 iterator->set_initial_next(*next); |
2782 iterator->set_array(*array); | 2783 iterator->set_array(*array); |
2783 iterator->set_index(0); | 2784 iterator->set_index(0); |
2784 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 2785 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); |
2785 return iterator; | 2786 return iterator; |
2786 } | 2787 } |
2787 | 2788 |
2788 } // namespace internal | 2789 } // namespace internal |
2789 } // namespace v8 | 2790 } // namespace v8 |
OLD | NEW |