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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 Handle<Object> arg2) { \ | 1282 Handle<Object> arg2) { \ |
1283 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ | 1283 return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ |
1284 arg2); \ | 1284 arg2); \ |
1285 } | 1285 } |
1286 DEFINE_ERROR(Error, error) | 1286 DEFINE_ERROR(Error, error) |
1287 DEFINE_ERROR(EvalError, eval_error) | 1287 DEFINE_ERROR(EvalError, eval_error) |
1288 DEFINE_ERROR(RangeError, range_error) | 1288 DEFINE_ERROR(RangeError, range_error) |
1289 DEFINE_ERROR(ReferenceError, reference_error) | 1289 DEFINE_ERROR(ReferenceError, reference_error) |
1290 DEFINE_ERROR(SyntaxError, syntax_error) | 1290 DEFINE_ERROR(SyntaxError, syntax_error) |
1291 DEFINE_ERROR(TypeError, type_error) | 1291 DEFINE_ERROR(TypeError, type_error) |
| 1292 DEFINE_ERROR(WasmCompileError, wasm_compile_error) |
| 1293 DEFINE_ERROR(WasmRuntimeError, wasm_runtime_error) |
1292 #undef DEFINE_ERROR | 1294 #undef DEFINE_ERROR |
1293 | 1295 |
1294 Handle<JSFunction> Factory::NewFunction(Handle<Map> map, | 1296 Handle<JSFunction> Factory::NewFunction(Handle<Map> map, |
1295 Handle<SharedFunctionInfo> info, | 1297 Handle<SharedFunctionInfo> info, |
1296 Handle<Object> context_or_undefined, | 1298 Handle<Object> context_or_undefined, |
1297 PretenureFlag pretenure) { | 1299 PretenureFlag pretenure) { |
1298 AllocationSpace space = pretenure == TENURED ? OLD_SPACE : NEW_SPACE; | 1300 AllocationSpace space = pretenure == TENURED ? OLD_SPACE : NEW_SPACE; |
1299 Handle<JSFunction> function = New<JSFunction>(map, space); | 1301 Handle<JSFunction> function = New<JSFunction>(map, space); |
1300 DCHECK(context_or_undefined->IsContext() || | 1302 DCHECK(context_or_undefined->IsContext() || |
1301 context_or_undefined->IsUndefined(isolate())); | 1303 context_or_undefined->IsUndefined(isolate())); |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2641 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 2643 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); |
2642 iterator->set_initial_next(*next); | 2644 iterator->set_initial_next(*next); |
2643 iterator->set_array(*array); | 2645 iterator->set_array(*array); |
2644 iterator->set_index(0); | 2646 iterator->set_index(0); |
2645 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 2647 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); |
2646 return iterator; | 2648 return iterator; |
2647 } | 2649 } |
2648 | 2650 |
2649 } // namespace internal | 2651 } // namespace internal |
2650 } // namespace v8 | 2652 } // namespace v8 |
OLD | NEW |