OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/builtins.h" | 5 #include "src/builtins.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/api-natives.h" | 9 #include "src/api-natives.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 4561 matching lines...) Loading... |
4572 g(&masm, builtin_desc->name, builtin_desc->extra_args); | 4572 g(&masm, builtin_desc->name, builtin_desc->extra_args); |
4573 // Move the code into the object heap. | 4573 // Move the code into the object heap. |
4574 CodeDesc desc; | 4574 CodeDesc desc; |
4575 masm.GetCode(&desc); | 4575 masm.GetCode(&desc); |
4576 Code::Flags flags = builtin_desc->flags; | 4576 Code::Flags flags = builtin_desc->flags; |
4577 return isolate->factory()->NewCode(desc, flags, masm.CodeObject()); | 4577 return isolate->factory()->NewCode(desc, flags, masm.CodeObject()); |
4578 } | 4578 } |
4579 | 4579 |
4580 Handle<Code> CodeStubAssemblerBuilder(Isolate* isolate, | 4580 Handle<Code> CodeStubAssemblerBuilder(Isolate* isolate, |
4581 BuiltinDesc const* builtin_desc) { | 4581 BuiltinDesc const* builtin_desc) { |
4582 Zone zone; | 4582 Zone zone(isolate->allocator()); |
4583 compiler::CodeStubAssembler assembler(isolate, &zone, builtin_desc->argc, | 4583 compiler::CodeStubAssembler assembler(isolate, &zone, builtin_desc->argc, |
4584 builtin_desc->flags, | 4584 builtin_desc->flags, |
4585 builtin_desc->s_name); | 4585 builtin_desc->s_name); |
4586 // Generate the code/adaptor. | 4586 // Generate the code/adaptor. |
4587 typedef void (*Generator)(compiler::CodeStubAssembler*); | 4587 typedef void (*Generator)(compiler::CodeStubAssembler*); |
4588 Generator g = FUNCTION_CAST<Generator>(builtin_desc->generator); | 4588 Generator g = FUNCTION_CAST<Generator>(builtin_desc->generator); |
4589 g(&assembler); | 4589 g(&assembler); |
4590 return assembler.GenerateCode(); | 4590 return assembler.GenerateCode(); |
4591 } | 4591 } |
4592 | 4592 |
(...skipping 174 matching lines...) Loading... |
4767 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) | 4767 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) |
4768 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 4768 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
4769 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 4769 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
4770 #undef DEFINE_BUILTIN_ACCESSOR_C | 4770 #undef DEFINE_BUILTIN_ACCESSOR_C |
4771 #undef DEFINE_BUILTIN_ACCESSOR_A | 4771 #undef DEFINE_BUILTIN_ACCESSOR_A |
4772 #undef DEFINE_BUILTIN_ACCESSOR_T | 4772 #undef DEFINE_BUILTIN_ACCESSOR_T |
4773 #undef DEFINE_BUILTIN_ACCESSOR_H | 4773 #undef DEFINE_BUILTIN_ACCESSOR_H |
4774 | 4774 |
4775 } // namespace internal | 4775 } // namespace internal |
4776 } // namespace v8 | 4776 } // namespace v8 |
OLD | NEW |