| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 Initialize(register_parameter_count, registers, | 70 Initialize(register_parameter_count, registers, |
| 71 deoptimization_handler, | 71 deoptimization_handler, |
| 72 register_param_representations, | 72 register_param_representations, |
| 73 hint_stack_parameter_count, | 73 hint_stack_parameter_count, |
| 74 function_mode); | 74 function_mode); |
| 75 stack_parameter_count_ = stack_parameter_count; | 75 stack_parameter_count_ = stack_parameter_count; |
| 76 handler_arguments_mode_ = handler_mode; | 76 handler_arguments_mode_ = handler_mode; |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 void CallInterfaceDescriptor::Initialize( |
| 81 int register_parameter_count, |
| 82 Register* registers, |
| 83 Representation* param_representations, |
| 84 PlatformCallInterfaceDescriptor* platform_descriptor) { |
| 85 // CallInterfaceDescriptor owns a copy of the registers array. |
| 86 register_param_count_ = register_parameter_count; |
| 87 register_params_.Reset(NewArray<Register>(register_parameter_count)); |
| 88 for (int i = 0; i < register_parameter_count; i++) { |
| 89 register_params_[i] = registers[i]; |
| 90 } |
| 91 |
| 92 // Also the register parameter representations. |
| 93 param_representations_.Reset( |
| 94 NewArray<Representation>(register_parameter_count)); |
| 95 for (int i = 0; i < register_parameter_count; i++) { |
| 96 param_representations_[i] = param_representations[i]; |
| 97 } |
| 98 |
| 99 platform_specific_descriptor_ = platform_descriptor; |
| 100 } |
| 101 |
| 102 |
| 80 bool CodeStub::FindCodeInCache(Code** code_out) { | 103 bool CodeStub::FindCodeInCache(Code** code_out) { |
| 81 UnseededNumberDictionary* stubs = isolate()->heap()->code_stubs(); | 104 UnseededNumberDictionary* stubs = isolate()->heap()->code_stubs(); |
| 82 int index = stubs->FindEntry(GetKey()); | 105 int index = stubs->FindEntry(GetKey()); |
| 83 if (index != UnseededNumberDictionary::kNotFound) { | 106 if (index != UnseededNumberDictionary::kNotFound) { |
| 84 *code_out = Code::cast(stubs->ValueAt(index)); | 107 *code_out = Code::cast(stubs->ValueAt(index)); |
| 85 return true; | 108 return true; |
| 86 } | 109 } |
| 87 return false; | 110 return false; |
| 88 } | 111 } |
| 89 | 112 |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 InstallDescriptor(isolate, &stub3); | 904 InstallDescriptor(isolate, &stub3); |
| 882 } | 905 } |
| 883 | 906 |
| 884 InternalArrayConstructorStub::InternalArrayConstructorStub( | 907 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 885 Isolate* isolate) : PlatformCodeStub(isolate) { | 908 Isolate* isolate) : PlatformCodeStub(isolate) { |
| 886 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 909 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 887 } | 910 } |
| 888 | 911 |
| 889 | 912 |
| 890 } } // namespace v8::internal | 913 } } // namespace v8::internal |
| OLD | NEW |