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-arguments.h" | 7 #include "src/api-arguments.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 5304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5315 return HandleApiCallAsFunctionOrConstructor(isolate, false, args); | 5315 return HandleApiCallAsFunctionOrConstructor(isolate, false, args); |
5316 } | 5316 } |
5317 | 5317 |
5318 | 5318 |
5319 // Handle calls to non-function objects created through the API. This delegate | 5319 // Handle calls to non-function objects created through the API. This delegate |
5320 // function is used when the call is a construct call. | 5320 // function is used when the call is a construct call. |
5321 BUILTIN(HandleApiCallAsConstructor) { | 5321 BUILTIN(HandleApiCallAsConstructor) { |
5322 return HandleApiCallAsFunctionOrConstructor(isolate, true, args); | 5322 return HandleApiCallAsFunctionOrConstructor(isolate, true, args); |
5323 } | 5323 } |
5324 | 5324 |
| 5325 namespace { |
5325 | 5326 |
5326 static void Generate_LoadIC_Miss(MacroAssembler* masm) { | 5327 void Generate_LoadIC_Miss(CodeStubAssembler* assembler) { |
5327 LoadIC::GenerateMiss(masm); | 5328 typedef compiler::Node Node; |
| 5329 |
| 5330 Node* receiver = assembler->Parameter(0); |
| 5331 Node* name = assembler->Parameter(1); |
| 5332 Node* slot = assembler->Parameter(2); |
| 5333 Node* vector = assembler->Parameter(3); |
| 5334 Node* context = assembler->Parameter(4); |
| 5335 |
| 5336 assembler->TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, |
| 5337 slot, vector); |
5328 } | 5338 } |
5329 | 5339 |
5330 | 5340 void Generate_LoadIC_Normal(MacroAssembler* masm) { |
5331 static void Generate_LoadIC_Normal(MacroAssembler* masm) { | |
5332 LoadIC::GenerateNormal(masm); | 5341 LoadIC::GenerateNormal(masm); |
5333 } | 5342 } |
5334 | 5343 |
5335 | 5344 void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) { |
5336 static void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) { | |
5337 NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt(masm); | 5345 NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt(masm); |
5338 } | 5346 } |
5339 | 5347 |
| 5348 void Generate_LoadIC_Slow(CodeStubAssembler* assembler) { |
| 5349 typedef compiler::Node Node; |
5340 | 5350 |
5341 static void Generate_LoadIC_Slow(MacroAssembler* masm) { | 5351 Node* receiver = assembler->Parameter(0); |
5342 LoadIC::GenerateRuntimeGetProperty(masm); | 5352 Node* name = assembler->Parameter(1); |
| 5353 // Node* slot = assembler->Parameter(2); |
| 5354 // Node* vector = assembler->Parameter(3); |
| 5355 Node* context = assembler->Parameter(4); |
| 5356 |
| 5357 assembler->TailCallRuntime(Runtime::kGetProperty, context, receiver, name); |
5343 } | 5358 } |
5344 | 5359 |
5345 | 5360 void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) { |
5346 static void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) { | |
5347 KeyedLoadIC::GenerateRuntimeGetProperty(masm); | 5361 KeyedLoadIC::GenerateRuntimeGetProperty(masm); |
5348 } | 5362 } |
5349 | 5363 |
5350 | 5364 void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) { |
5351 static void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) { | |
5352 KeyedLoadIC::GenerateMiss(masm); | 5365 KeyedLoadIC::GenerateMiss(masm); |
5353 } | 5366 } |
5354 | 5367 |
5355 | 5368 void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) { |
5356 static void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) { | |
5357 KeyedLoadIC::GenerateMegamorphic(masm); | 5369 KeyedLoadIC::GenerateMegamorphic(masm); |
5358 } | 5370 } |
5359 | 5371 |
5360 | 5372 void Generate_StoreIC_Miss(MacroAssembler* masm) { |
5361 static void Generate_StoreIC_Miss(MacroAssembler* masm) { | |
5362 StoreIC::GenerateMiss(masm); | 5373 StoreIC::GenerateMiss(masm); |
5363 } | 5374 } |
5364 | 5375 |
5365 | 5376 void Generate_StoreIC_Normal(MacroAssembler* masm) { |
5366 static void Generate_StoreIC_Normal(MacroAssembler* masm) { | |
5367 StoreIC::GenerateNormal(masm); | 5377 StoreIC::GenerateNormal(masm); |
5368 } | 5378 } |
5369 | 5379 |
5370 | 5380 void Generate_StoreIC_Slow(MacroAssembler* masm) { |
5371 static void Generate_StoreIC_Slow(MacroAssembler* masm) { | |
5372 NamedStoreHandlerCompiler::GenerateSlow(masm); | 5381 NamedStoreHandlerCompiler::GenerateSlow(masm); |
5373 } | 5382 } |
5374 | 5383 |
5375 | 5384 void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) { |
5376 static void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) { | |
5377 ElementHandlerCompiler::GenerateStoreSlow(masm); | 5385 ElementHandlerCompiler::GenerateStoreSlow(masm); |
5378 } | 5386 } |
5379 | 5387 |
5380 | 5388 void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { |
5381 static void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { | |
5382 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); | 5389 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); |
5383 } | 5390 } |
5384 | 5391 |
5385 static void Generate_StoreIC_Megamorphic(MacroAssembler* masm) { | 5392 void Generate_StoreIC_Megamorphic(MacroAssembler* masm) { |
5386 StoreIC::GenerateMegamorphic(masm); | 5393 StoreIC::GenerateMegamorphic(masm); |
5387 } | 5394 } |
5388 | 5395 |
5389 static void Generate_StoreIC_Megamorphic_Strict(MacroAssembler* masm) { | 5396 void Generate_StoreIC_Megamorphic_Strict(MacroAssembler* masm) { |
5390 StoreIC::GenerateMegamorphic(masm); | 5397 StoreIC::GenerateMegamorphic(masm); |
5391 } | 5398 } |
5392 | 5399 |
5393 | 5400 void Generate_KeyedStoreIC_Megamorphic(MacroAssembler* masm) { |
5394 static void Generate_KeyedStoreIC_Megamorphic(MacroAssembler* masm) { | |
5395 KeyedStoreIC::GenerateMegamorphic(masm, SLOPPY); | 5401 KeyedStoreIC::GenerateMegamorphic(masm, SLOPPY); |
5396 } | 5402 } |
5397 | 5403 |
5398 | 5404 void Generate_KeyedStoreIC_Megamorphic_Strict(MacroAssembler* masm) { |
5399 static void Generate_KeyedStoreIC_Megamorphic_Strict(MacroAssembler* masm) { | |
5400 KeyedStoreIC::GenerateMegamorphic(masm, STRICT); | 5405 KeyedStoreIC::GenerateMegamorphic(masm, STRICT); |
5401 } | 5406 } |
5402 | 5407 |
5403 | 5408 void Generate_KeyedStoreIC_Miss(MacroAssembler* masm) { |
5404 static void Generate_KeyedStoreIC_Miss(MacroAssembler* masm) { | |
5405 KeyedStoreIC::GenerateMiss(masm); | 5409 KeyedStoreIC::GenerateMiss(masm); |
5406 } | 5410 } |
5407 | 5411 |
5408 | 5412 void Generate_Return_DebugBreak(MacroAssembler* masm) { |
5409 static void Generate_Return_DebugBreak(MacroAssembler* masm) { | |
5410 DebugCodegen::GenerateDebugBreakStub(masm, | 5413 DebugCodegen::GenerateDebugBreakStub(masm, |
5411 DebugCodegen::SAVE_RESULT_REGISTER); | 5414 DebugCodegen::SAVE_RESULT_REGISTER); |
5412 } | 5415 } |
5413 | 5416 |
5414 | 5417 void Generate_Slot_DebugBreak(MacroAssembler* masm) { |
5415 static void Generate_Slot_DebugBreak(MacroAssembler* masm) { | |
5416 DebugCodegen::GenerateDebugBreakStub(masm, | 5418 DebugCodegen::GenerateDebugBreakStub(masm, |
5417 DebugCodegen::IGNORE_RESULT_REGISTER); | 5419 DebugCodegen::IGNORE_RESULT_REGISTER); |
5418 } | 5420 } |
5419 | 5421 |
5420 | 5422 void Generate_FrameDropper_LiveEdit(MacroAssembler* masm) { |
5421 static void Generate_FrameDropper_LiveEdit(MacroAssembler* masm) { | |
5422 DebugCodegen::GenerateFrameDropperLiveEdit(masm); | 5423 DebugCodegen::GenerateFrameDropperLiveEdit(masm); |
5423 } | 5424 } |
5424 | 5425 |
| 5426 } // namespace |
5425 | 5427 |
5426 Builtins::Builtins() : initialized_(false) { | 5428 Builtins::Builtins() : initialized_(false) { |
5427 memset(builtins_, 0, sizeof(builtins_[0]) * builtin_count); | 5429 memset(builtins_, 0, sizeof(builtins_[0]) * builtin_count); |
5428 memset(names_, 0, sizeof(names_[0]) * builtin_count); | 5430 memset(names_, 0, sizeof(names_[0]) * builtin_count); |
5429 } | 5431 } |
5430 | 5432 |
5431 | 5433 |
5432 Builtins::~Builtins() { | 5434 Builtins::~Builtins() { |
5433 } | 5435 } |
5434 | 5436 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5499 // stack. | 5501 // stack. |
5500 DCHECK(!masm.has_frame()); | 5502 DCHECK(!masm.has_frame()); |
5501 g(&masm, builtin_desc->name, builtin_desc->extra_args); | 5503 g(&masm, builtin_desc->name, builtin_desc->extra_args); |
5502 // Move the code into the object heap. | 5504 // Move the code into the object heap. |
5503 CodeDesc desc; | 5505 CodeDesc desc; |
5504 masm.GetCode(&desc); | 5506 masm.GetCode(&desc); |
5505 Code::Flags flags = builtin_desc->flags; | 5507 Code::Flags flags = builtin_desc->flags; |
5506 return isolate->factory()->NewCode(desc, flags, masm.CodeObject()); | 5508 return isolate->factory()->NewCode(desc, flags, masm.CodeObject()); |
5507 } | 5509 } |
5508 | 5510 |
5509 Handle<Code> CodeStubAssemblerBuilder(Isolate* isolate, | 5511 // Builder for builtins implemented in TurboFan with JS linkage. |
5510 BuiltinDesc const* builtin_desc) { | 5512 Handle<Code> CodeStubAssemblerBuilderJS(Isolate* isolate, |
| 5513 BuiltinDesc const* builtin_desc) { |
5511 Zone zone(isolate->allocator()); | 5514 Zone zone(isolate->allocator()); |
5512 CodeStubAssembler assembler(isolate, &zone, builtin_desc->argc, | 5515 CodeStubAssembler assembler(isolate, &zone, builtin_desc->argc, |
5513 builtin_desc->flags, builtin_desc->s_name); | 5516 builtin_desc->flags, builtin_desc->s_name); |
5514 // Generate the code/adaptor. | 5517 // Generate the code/adaptor. |
5515 typedef void (*Generator)(CodeStubAssembler*); | 5518 typedef void (*Generator)(CodeStubAssembler*); |
5516 Generator g = FUNCTION_CAST<Generator>(builtin_desc->generator); | 5519 Generator g = FUNCTION_CAST<Generator>(builtin_desc->generator); |
5517 g(&assembler); | 5520 g(&assembler); |
5518 return assembler.GenerateCode(); | 5521 return assembler.GenerateCode(); |
5519 } | 5522 } |
5520 | 5523 |
| 5524 // Builder for builtins implemented in TurboFan with CallStub linkage. |
| 5525 Handle<Code> CodeStubAssemblerBuilderCS(Isolate* isolate, |
| 5526 BuiltinDesc const* builtin_desc) { |
| 5527 Zone zone(isolate->allocator()); |
| 5528 // The interface descriptor with given key must be initialized at this point |
| 5529 // and this construction just queries the details from the descriptors table. |
| 5530 CallInterfaceDescriptor descriptor( |
| 5531 isolate, static_cast<CallDescriptors::Key>(builtin_desc->argc)); |
| 5532 // Ensure descriptor is already initialized. |
| 5533 DCHECK_NOT_NULL(descriptor.GetFunctionType()); |
| 5534 CodeStubAssembler assembler(isolate, &zone, descriptor, builtin_desc->flags, |
| 5535 builtin_desc->s_name); |
| 5536 // Generate the code/adaptor. |
| 5537 typedef void (*Generator)(CodeStubAssembler*); |
| 5538 Generator g = FUNCTION_CAST<Generator>(builtin_desc->generator); |
| 5539 g(&assembler); |
| 5540 return assembler.GenerateCode(); |
| 5541 } |
| 5542 |
5521 } // namespace | 5543 } // namespace |
5522 | 5544 |
5523 // Define array of pointers to generators and C builtin functions. | 5545 // Define array of pointers to generators and C builtin functions. |
5524 // We do this in a sort of roundabout way so that we can do the initialization | 5546 // We do this in a sort of roundabout way so that we can do the initialization |
5525 // within the lexical scope of Builtins:: and within a context where | 5547 // within the lexical scope of Builtins:: and within a context where |
5526 // Code::Flags names a non-abstract type. | 5548 // Code::Flags names a non-abstract type. |
5527 void Builtins::InitBuiltinFunctionTable() { | 5549 void Builtins::InitBuiltinFunctionTable() { |
5528 BuiltinDesc* functions = builtin_function_table.functions_; | 5550 BuiltinDesc* functions = builtin_function_table.functions_; |
5529 functions[builtin_count].builder = nullptr; | 5551 functions[builtin_count].builder = nullptr; |
5530 functions[builtin_count].generator = nullptr; | 5552 functions[builtin_count].generator = nullptr; |
(...skipping 20 matching lines...) Expand all Loading... |
5551 functions->generator = FUNCTION_ADDR(Generate_##aname); \ | 5573 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
5552 functions->c_code = NULL; \ | 5574 functions->c_code = NULL; \ |
5553 functions->s_name = #aname; \ | 5575 functions->s_name = #aname; \ |
5554 functions->name = k##aname; \ | 5576 functions->name = k##aname; \ |
5555 functions->flags = Code::ComputeFlags(Code::kind, extra); \ | 5577 functions->flags = Code::ComputeFlags(Code::kind, extra); \ |
5556 functions->extra_args = BuiltinExtraArguments::kNone; \ | 5578 functions->extra_args = BuiltinExtraArguments::kNone; \ |
5557 functions->argc = 0; \ | 5579 functions->argc = 0; \ |
5558 ++functions; | 5580 ++functions; |
5559 | 5581 |
5560 #define DEF_FUNCTION_PTR_T(aname, aargc) \ | 5582 #define DEF_FUNCTION_PTR_T(aname, aargc) \ |
5561 functions->builder = &CodeStubAssemblerBuilder; \ | 5583 functions->builder = &CodeStubAssemblerBuilderJS; \ |
5562 functions->generator = FUNCTION_ADDR(Generate_##aname); \ | 5584 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
5563 functions->c_code = NULL; \ | 5585 functions->c_code = NULL; \ |
5564 functions->s_name = #aname; \ | 5586 functions->s_name = #aname; \ |
5565 functions->name = k##aname; \ | 5587 functions->name = k##aname; \ |
5566 functions->flags = Code::ComputeFlags(Code::BUILTIN); \ | 5588 functions->flags = Code::ComputeFlags(Code::BUILTIN); \ |
5567 functions->extra_args = BuiltinExtraArguments::kNone; \ | 5589 functions->extra_args = BuiltinExtraArguments::kNone; \ |
5568 functions->argc = aargc; \ | 5590 functions->argc = aargc; \ |
5569 ++functions; | 5591 ++functions; |
5570 | 5592 |
| 5593 #define DEF_FUNCTION_PTR_S(aname, kind, extra, interface_descriptor) \ |
| 5594 functions->builder = &CodeStubAssemblerBuilderCS; \ |
| 5595 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
| 5596 functions->c_code = NULL; \ |
| 5597 functions->s_name = #aname; \ |
| 5598 functions->name = k##aname; \ |
| 5599 functions->flags = Code::ComputeFlags(Code::kind, extra); \ |
| 5600 functions->extra_args = BuiltinExtraArguments::kNone; \ |
| 5601 functions->argc = CallDescriptors::interface_descriptor; \ |
| 5602 ++functions; |
| 5603 |
5571 #define DEF_FUNCTION_PTR_H(aname, kind) \ | 5604 #define DEF_FUNCTION_PTR_H(aname, kind) \ |
5572 functions->builder = &MacroAssemblerBuilder; \ | 5605 functions->builder = &MacroAssemblerBuilder; \ |
5573 functions->generator = FUNCTION_ADDR(Generate_##aname); \ | 5606 functions->generator = FUNCTION_ADDR(Generate_##aname); \ |
5574 functions->c_code = NULL; \ | 5607 functions->c_code = NULL; \ |
5575 functions->s_name = #aname; \ | 5608 functions->s_name = #aname; \ |
5576 functions->name = k##aname; \ | 5609 functions->name = k##aname; \ |
5577 functions->flags = Code::ComputeHandlerFlags(Code::kind); \ | 5610 functions->flags = Code::ComputeHandlerFlags(Code::kind); \ |
5578 functions->extra_args = BuiltinExtraArguments::kNone; \ | 5611 functions->extra_args = BuiltinExtraArguments::kNone; \ |
5579 functions->argc = 0; \ | 5612 functions->argc = 0; \ |
5580 ++functions; | 5613 ++functions; |
5581 | 5614 |
5582 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) | 5615 BUILTIN_LIST_C(DEF_FUNCTION_PTR_C) |
5583 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) | 5616 BUILTIN_LIST_A(DEF_FUNCTION_PTR_A) |
5584 BUILTIN_LIST_T(DEF_FUNCTION_PTR_T) | 5617 BUILTIN_LIST_T(DEF_FUNCTION_PTR_T) |
| 5618 BUILTIN_LIST_S(DEF_FUNCTION_PTR_S) |
5585 BUILTIN_LIST_H(DEF_FUNCTION_PTR_H) | 5619 BUILTIN_LIST_H(DEF_FUNCTION_PTR_H) |
5586 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) | 5620 BUILTIN_LIST_DEBUG_A(DEF_FUNCTION_PTR_A) |
5587 | 5621 |
5588 #undef DEF_FUNCTION_PTR_C | 5622 #undef DEF_FUNCTION_PTR_C |
5589 #undef DEF_FUNCTION_PTR_A | 5623 #undef DEF_FUNCTION_PTR_A |
| 5624 #undef DEF_FUNCTION_PTR_T |
| 5625 #undef DEF_FUNCTION_PTR_S |
5590 #undef DEF_FUNCTION_PTR_H | 5626 #undef DEF_FUNCTION_PTR_H |
5591 #undef DEF_FUNCTION_PTR_T | |
5592 } | 5627 } |
5593 | 5628 |
5594 | 5629 |
5595 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { | 5630 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { |
5596 DCHECK(!initialized_); | 5631 DCHECK(!initialized_); |
5597 | 5632 |
5598 // Create a scope for the handles in the builtins. | 5633 // Create a scope for the handles in the builtins. |
5599 HandleScope scope(isolate); | 5634 HandleScope scope(isolate); |
5600 | 5635 |
| 5636 #define INITIALIZE_CALL_DESCRIPTOR(name, kind, extra, interface_descriptor) \ |
| 5637 { interface_descriptor##Descriptor descriptor(isolate); } |
| 5638 BUILTIN_LIST_S(INITIALIZE_CALL_DESCRIPTOR) |
| 5639 #undef INITIALIZE_CALL_DESCRIPTOR |
| 5640 |
5601 const BuiltinDesc* functions = builtin_function_table.functions(); | 5641 const BuiltinDesc* functions = builtin_function_table.functions(); |
5602 | 5642 |
5603 // Traverse the list of builtins and generate an adaptor in a | 5643 // Traverse the list of builtins and generate an adaptor in a |
5604 // separate code object for each one. | 5644 // separate code object for each one. |
5605 for (int i = 0; i < builtin_count; i++) { | 5645 for (int i = 0; i < builtin_count; i++) { |
5606 if (create_heap_objects) { | 5646 if (create_heap_objects) { |
5607 Handle<Code> code = (*functions[i].builder)(isolate, functions + i); | 5647 Handle<Code> code = (*functions[i].builder)(isolate, functions + i); |
5608 // Log the event and add the code to the builtins array. | 5648 // Log the event and add the code to the builtins array. |
5609 PROFILE(isolate, | 5649 PROFILE(isolate, |
5610 CodeCreateEvent(Logger::BUILTIN_TAG, AbstractCode::cast(*code), | 5650 CodeCreateEvent(Logger::BUILTIN_TAG, AbstractCode::cast(*code), |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5911 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, extra) \ | 5951 #define DEFINE_BUILTIN_ACCESSOR_A(name, kind, extra) \ |
5912 Handle<Code> Builtins::name() { \ | 5952 Handle<Code> Builtins::name() { \ |
5913 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##name)); \ | 5953 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##name)); \ |
5914 return Handle<Code>(code_address); \ | 5954 return Handle<Code>(code_address); \ |
5915 } | 5955 } |
5916 #define DEFINE_BUILTIN_ACCESSOR_T(name, argc) \ | 5956 #define DEFINE_BUILTIN_ACCESSOR_T(name, argc) \ |
5917 Handle<Code> Builtins::name() { \ | 5957 Handle<Code> Builtins::name() { \ |
5918 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##name)); \ | 5958 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##name)); \ |
5919 return Handle<Code>(code_address); \ | 5959 return Handle<Code>(code_address); \ |
5920 } | 5960 } |
| 5961 #define DEFINE_BUILTIN_ACCESSOR_S(name, kind, extra, interface_descriptor) \ |
| 5962 Handle<Code> Builtins::name() { \ |
| 5963 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##name)); \ |
| 5964 return Handle<Code>(code_address); \ |
| 5965 } |
5921 #define DEFINE_BUILTIN_ACCESSOR_H(name, kind) \ | 5966 #define DEFINE_BUILTIN_ACCESSOR_H(name, kind) \ |
5922 Handle<Code> Builtins::name() { \ | 5967 Handle<Code> Builtins::name() { \ |
5923 Code** code_address = \ | 5968 Code** code_address = \ |
5924 reinterpret_cast<Code**>(builtin_address(k##name)); \ | 5969 reinterpret_cast<Code**>(builtin_address(k##name)); \ |
5925 return Handle<Code>(code_address); \ | 5970 return Handle<Code>(code_address); \ |
5926 } | 5971 } |
5927 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 5972 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
5928 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 5973 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
5929 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) | 5974 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) |
| 5975 BUILTIN_LIST_S(DEFINE_BUILTIN_ACCESSOR_S) |
5930 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 5976 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
5931 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 5977 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
5932 #undef DEFINE_BUILTIN_ACCESSOR_C | 5978 #undef DEFINE_BUILTIN_ACCESSOR_C |
5933 #undef DEFINE_BUILTIN_ACCESSOR_A | 5979 #undef DEFINE_BUILTIN_ACCESSOR_A |
5934 #undef DEFINE_BUILTIN_ACCESSOR_T | 5980 #undef DEFINE_BUILTIN_ACCESSOR_T |
| 5981 #undef DEFINE_BUILTIN_ACCESSOR_S |
5935 #undef DEFINE_BUILTIN_ACCESSOR_H | 5982 #undef DEFINE_BUILTIN_ACCESSOR_H |
5936 | 5983 |
5937 } // namespace internal | 5984 } // namespace internal |
5938 } // namespace v8 | 5985 } // namespace v8 |
OLD | NEW |